From 87bce27bd3c0e635387d462ff8311f29007a7cd9 Mon Sep 17 00:00:00 2001 From: donqi Date: Sat, 25 Jun 2022 17:31:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=88=E5=82=85=E5=9C=88=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/js/data.js | 2 +- common/js/request.js | 21 +- .../common-card/horizontal-name-card.vue | 4 +- components/custom-bar/load-status-bar.vue | 2 +- components/default-toast/bg-toast.vue | 32 ++ pages/index/index.vue | 9 +- pages/index/msg-home.vue | 1 + pages/index/worker-home.vue | 335 ++++++++++++++---- pages/product/shop-detail.vue | 212 +++++++++-- 9 files changed, 499 insertions(+), 119 deletions(-) create mode 100644 components/default-toast/bg-toast.vue diff --git a/common/js/data.js b/common/js/data.js index 2dec41f..b3655d9 100644 --- a/common/js/data.js +++ b/common/js/data.js @@ -156,7 +156,7 @@ const moduleBarInfos = [{ cuIcon: 'message', pageCode: 'msgPage', name: '消息', - countTag: 100 + // countTag: 100 }, { id: 5, cuIcon: 'my', diff --git a/common/js/request.js b/common/js/request.js index e9c7772..eced635 100644 --- a/common/js/request.js +++ b/common/js/request.js @@ -10,9 +10,9 @@ export default { title: '加载中' }) // request 触发前拼接 url - args.url = 'https://www.opsoul.com' + args.url; + // args.url = 'https://www.opsoul.com' + args.url; // args.url = 'http://192.168.2.42:80' + args.url; - // args.url = 'http://127.0.0.1:80' + args.url; + args.url = 'http://127.0.0.1:80' + args.url; if (args.data) { args.data.deptId = globalData.deptId; args.data.from = globalData.from; @@ -192,7 +192,14 @@ export default { return res[1].data; }, async storagePhoneIntoUserInfo(code) { - let phoneRes = await this.qryUserPhone(code) + let phoneRes = await this.qryUserPhone(code); + if (phoneRes && phoneRes.msg === '获取手机号码异常') { + uni.showToast({ + icon: 'none', + title: '请先确认登录微信号是否已绑定手机号' + }) + return false; + } if (phoneRes && phoneRes.data) { let userInfo = this.getCurUserInfo(); this.updateUserPhone({ @@ -404,5 +411,13 @@ export default { data: params }) return res[1].data; + }, + async getWorkerList(params = {}) { + let res = await uni.request({ + url: '/worker/list', + method: 'POST', + data: params + }) + return res[1].data; }, } diff --git a/components/common-card/horizontal-name-card.vue b/components/common-card/horizontal-name-card.vue index a8a16b7..0c73a59 100644 --- a/components/common-card/horizontal-name-card.vue +++ b/components/common-card/horizontal-name-card.vue @@ -1,7 +1,9 @@