From 2e5c25f0b9af317b9e28e4bfae077bb5f5e184bb Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Wed, 8 Jun 2022 17:41:52 +0800 Subject: [PATCH] =?UTF-8?q?=E9=82=80=E8=AF=B7=E6=88=90=E5=91=98=E3=80=81?= =?UTF-8?q?=E6=88=90=E5=91=98=E5=88=97=E8=A1=A8=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/modules/order.js | 4 + apis/modules/parner.js | 10 +- apis/request.js | 19 +- config/request.js | 2 +- libs/util.js | 4 + pages.json | 26 +- pages/addStaff/addStaff.vue | 2 +- pages/clients/clients.vue | 6 +- pages/login/login.vue | 29 +- pages/orders/orders.vue | 10 +- pages/qrcode/qrcode.vue | 67 +- pages/teams/teams.vue | 77 +- uni_modules/Sansnn-uQRCode/changelog.md | 44 + .../u-qrcode/gcanvas/bridge/bridge-weex.js | 241 ++ .../context-2d/FillStyleLinearGradient.js | 18 + .../gcanvas/context-2d/FillStylePattern.js | 8 + .../context-2d/FillStyleRadialGradient.js | 17 + .../gcanvas/context-2d/RenderingContext.js | 666 +++++ .../gcanvas/context-webgl/ActiveInfo.js | 11 + .../u-qrcode/gcanvas/context-webgl/Buffer.js | 21 + .../gcanvas/context-webgl/Framebuffer.js | 21 + .../u-qrcode/gcanvas/context-webgl/GLenum.js | 298 +++ .../gcanvas/context-webgl/GLmethod.js | 142 + .../u-qrcode/gcanvas/context-webgl/GLtype.js | 23 + .../u-qrcode/gcanvas/context-webgl/Program.js | 21 + .../gcanvas/context-webgl/Renderbuffer.js | 21 + .../gcanvas/context-webgl/RenderingContext.js | 1191 +++++++++ .../u-qrcode/gcanvas/context-webgl/Shader.js | 22 + .../context-webgl/ShaderPrecisionFormat.js | 11 + .../u-qrcode/gcanvas/context-webgl/Texture.js | 22 + .../gcanvas/context-webgl/UniformLocation.js | 22 + .../gcanvas/context-webgl/classUtils.js | 3 + .../components/u-qrcode/gcanvas/env/canvas.js | 74 + .../components/u-qrcode/gcanvas/env/image.js | 96 + .../components/u-qrcode/gcanvas/env/tool.js | 24 + .../components/u-qrcode/gcanvas/index.js | 39 + .../components/u-qrcode/u-qrcode.vue | 684 +++++ .../Sansnn-uQRCode/js_sdk/u-qrcode/license.md | 201 ++ .../Sansnn-uQRCode/js_sdk/u-qrcode/module.js | 2285 +++++++++++++++++ .../js_sdk/u-qrcode/package.json | 24 + .../Sansnn-uQRCode/js_sdk/u-qrcode/readme.md | 274 ++ .../js_sdk/u-qrcode/u-qrcode.js | 2285 +++++++++++++++++ uni_modules/Sansnn-uQRCode/package.json | 83 + uni_modules/Sansnn-uQRCode/readme.md | 274 ++ 44 files changed, 9338 insertions(+), 84 deletions(-) create mode 100644 uni_modules/Sansnn-uQRCode/changelog.md create mode 100644 uni_modules/Sansnn-uQRCode/components/u-qrcode/gcanvas/bridge/bridge-weex.js create mode 100644 uni_modules/Sansnn-uQRCode/components/u-qrcode/gcanvas/context-2d/FillStyleLinearGradient.js create mode 100644 uni_modules/Sansnn-uQRCode/components/u-qrcode/gcanvas/context-2d/FillStylePattern.js create mode 100644 uni_modules/Sansnn-uQRCode/components/u-qrcode/gcanvas/context-2d/FillStyleRadialGradient.js create mode 100644 uni_modules/Sansnn-uQRCode/components/u-qrcode/gcanvas/context-2d/RenderingContext.js create mode 100644 uni_modules/Sansnn-uQRCode/components/u-qrcode/gcanvas/context-webgl/ActiveInfo.js create mode 100644 uni_modules/Sansnn-uQRCode/components/u-qrcode/gcanvas/context-webgl/Buffer.js create mode 100644 uni_modules/Sansnn-uQRCode/components/u-qrcode/gcanvas/context-webgl/Framebuffer.js create mode 100644 uni_modules/Sansnn-uQRCode/components/u-qrcode/gcanvas/context-webgl/GLenum.js create mode 100644 uni_modules/Sansnn-uQRCode/components/u-qrcode/gcanvas/context-webgl/GLmethod.js create mode 100644 uni_modules/Sansnn-uQRCode/components/u-qrcode/gcanvas/context-webgl/GLtype.js create mode 100644 uni_modules/Sansnn-uQRCode/components/u-qrcode/gcanvas/context-webgl/Program.js create mode 100644 uni_modules/Sansnn-uQRCode/components/u-qrcode/gcanvas/context-webgl/Renderbuffer.js create mode 100644 uni_modules/Sansnn-uQRCode/components/u-qrcode/gcanvas/context-webgl/RenderingContext.js create mode 100644 uni_modules/Sansnn-uQRCode/components/u-qrcode/gcanvas/context-webgl/Shader.js create mode 100644 uni_modules/Sansnn-uQRCode/components/u-qrcode/gcanvas/context-webgl/ShaderPrecisionFormat.js create mode 100644 uni_modules/Sansnn-uQRCode/components/u-qrcode/gcanvas/context-webgl/Texture.js create mode 100644 uni_modules/Sansnn-uQRCode/components/u-qrcode/gcanvas/context-webgl/UniformLocation.js create mode 100644 uni_modules/Sansnn-uQRCode/components/u-qrcode/gcanvas/context-webgl/classUtils.js create mode 100644 uni_modules/Sansnn-uQRCode/components/u-qrcode/gcanvas/env/canvas.js create mode 100644 uni_modules/Sansnn-uQRCode/components/u-qrcode/gcanvas/env/image.js create mode 100644 uni_modules/Sansnn-uQRCode/components/u-qrcode/gcanvas/env/tool.js create mode 100644 uni_modules/Sansnn-uQRCode/components/u-qrcode/gcanvas/index.js create mode 100644 uni_modules/Sansnn-uQRCode/components/u-qrcode/u-qrcode.vue create mode 100644 uni_modules/Sansnn-uQRCode/js_sdk/u-qrcode/license.md create mode 100644 uni_modules/Sansnn-uQRCode/js_sdk/u-qrcode/module.js create mode 100644 uni_modules/Sansnn-uQRCode/js_sdk/u-qrcode/package.json create mode 100644 uni_modules/Sansnn-uQRCode/js_sdk/u-qrcode/readme.md create mode 100644 uni_modules/Sansnn-uQRCode/js_sdk/u-qrcode/u-qrcode.js create mode 100644 uni_modules/Sansnn-uQRCode/package.json create mode 100644 uni_modules/Sansnn-uQRCode/readme.md diff --git a/apis/modules/order.js b/apis/modules/order.js index ee4b22f..1016137 100644 --- a/apis/modules/order.js +++ b/apis/modules/order.js @@ -25,6 +25,10 @@ export const list = (data) => { return post('nakadai/applets/order/getOrderBasedOnBusinessManagerId', data) } +export const all = (data) => { + return post('nakadai/applets/order/allTeamOrders', data) +} + export const del = (data) => { return post('nakadai/nakadai/order/delete', data) } \ No newline at end of file diff --git a/apis/modules/parner.js b/apis/modules/parner.js index 5f6581e..bf2f122 100644 --- a/apis/modules/parner.js +++ b/apis/modules/parner.js @@ -6,13 +6,9 @@ export const savePartnerAccount = (data) => { } export const teamList = (data) => { - return get('nakadai/partner-team/teamList', data) + return post('nakadai/partnerAccount/partnerAccountList', data) } -export const generateInvitationCode = (data) => { - return post('nakadai/partnerAccount/generateInvitationCode', data) -} - -export const generationQrCode = (data) => { - return get('nakadai/partnerAccount/generationQrCode ', data) +export const generateInvitationCode = accountId => { + return post(`nakadai/partnerAccount/generateInvitationCode?accountId=${accountId}`) } \ No newline at end of file diff --git a/apis/request.js b/apis/request.js index 01d9e70..ea73144 100644 --- a/apis/request.js +++ b/apis/request.js @@ -12,8 +12,8 @@ const request = options => { }) } const header = Object.assign({}, config.headers, { - // token: uni.getStorageSync('token') - token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNjU0NTY5OTA1LCJleHAiOjE2NTQ2MTMxMDUsImFjY291bnRJZCI6IjQ1MiJ9.IwVDQSpfYctr3ScaBiwXApNiSFjfwVbivt_uLCEPiW0' + token: uni.getStorageSync('token') + // token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNjU0NTY5OTA1LCJleHAiOjE2NTQ2MTMxMDUsImFjY291bnRJZCI6IjQ1MiJ9.IwVDQSpfYctr3ScaBiwXApNiSFjfwVbivt_uLCEPiW0' }) return new Promise((resolve, reject)=>{ const { url } = options @@ -23,13 +23,18 @@ const request = options => { method: options.method || 'GET', // 请求类型,默认为GET data: options.data || {}, // 请求参数,默认空对象 success: ({ data }) => { + const { status, message } = data // 状态判断,根据后台定义并提示 - if (data.status === 200) { + if (status === 200) { resolve(data) - } else if (data.status == 401) { + } else if (status == 401) { // 登录过期 + uni.removeStorageSync('token') + uni.removeStorageSync('userName') + uni.removeStorageSync('avatar') + uni.removeStorageSync('sessionKey') uni.showToast({ - title: data.message, + title: message, icon: 'none' }) setTimeout(() => { @@ -38,9 +43,11 @@ const request = options => { }) }, 1500) reject(data) + } else if (!status) { + resolve(data) } else { uni.showToast({ - title: data.message, + title: message, icon: 'none' }) reject(data) diff --git a/config/request.js b/config/request.js index 24cd55b..c3aa89f 100644 --- a/config/request.js +++ b/config/request.js @@ -5,7 +5,7 @@ */ export default { - baseURL: 'http://192.168.31.151:9000/', + baseURL: 'http://192.168.31.137:9000/', headers: { 'Content-Type': 'application/json;charset=UTF-8' }, diff --git a/libs/util.js b/libs/util.js index 0889fb9..82c5a0e 100644 --- a/libs/util.js +++ b/libs/util.js @@ -22,6 +22,10 @@ export default { handleNaN(val) { return isNaN(val) ? 0 : val }, + // 小于10,返回0+传入值 + preZero(val) { + return val < 10 ? '0' + val : val + }, //返回格式化时间,传参例如:"yyyy-MM-dd hh:mm:ss" formatDate(date, fmt = 'yyyy-MM-dd hh:mm:ss') { var date = date ? date : new Date() diff --git a/pages.json b/pages.json index aee1f88..95f57d5 100644 --- a/pages.json +++ b/pages.json @@ -9,18 +9,26 @@ } }, { - "path" : "pages/invite/invite", + "path" : "pages/index/index", "style" : { - "navigationBarTitleText": "加入团队", + "navigationBarTitleText": "", "enablePullDownRefresh": false } }, { - "path" : "pages/index/index", + "path" : "pages/qrcode/qrcode", "style" : { - "navigationBarTitleText": "", + "navigationBarTitleText": "邀请加入", + "enablePullDownRefresh": false + } + }, + { + "path" : "pages/invite/invite", + "style" : + { + "navigationBarTitleText": "加入团队", "enablePullDownRefresh": false } }, @@ -96,14 +104,6 @@ "enablePullDownRefresh": false } }, - { - "path" : "pages/qrcode/qrcode", - "style" : - { - "navigationBarTitleText": "邀请加入", - "enablePullDownRefresh": false - } - }, { "path" : "pages/send/send", "style" : @@ -133,7 +133,7 @@ "style" : { "navigationBarTitleText": "团队", - "enablePullDownRefresh": false + "enablePullDownRefresh": true } }, { diff --git a/pages/addStaff/addStaff.vue b/pages/addStaff/addStaff.vue index 7efc6c2..c45aee5 100644 --- a/pages/addStaff/addStaff.vue +++ b/pages/addStaff/addStaff.vue @@ -2,7 +2,7 @@ - +