From c02dc1ac5aa4ef70581054d436556318c338f529 Mon Sep 17 00:00:00 2001 From: donqi Date: Fri, 12 Aug 2022 22:21:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=BF=90=E8=90=A5=E5=95=86?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=EF=BC=8C=E4=BA=8C=E7=BB=B4=E7=A0=81=E5=88=86?= =?UTF-8?q?=E4=BA=AB=E7=94=B3=E8=AF=B7=E8=B7=B3=E8=BD=AC=E8=87=B3=E8=BF=90?= =?UTF-8?q?=E8=90=A5=E5=95=86=E7=94=B3=E8=AF=B7(=E5=88=86=E9=94=80?= =?UTF-8?q?=E7=94=B3=E8=AF=B7`)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/js/request.js | 32 ++++++ pages.json | 2 + pages/index/my-home.vue | 44 ++++---- pages/my/apply-operator.vue | 195 ++++++++++++++++++++++++++---------- pages/my/my-team-member.vue | 77 +++++++++++--- 5 files changed, 267 insertions(+), 83 deletions(-) diff --git a/common/js/request.js b/common/js/request.js index 264348a..4192d5a 100644 --- a/common/js/request.js +++ b/common/js/request.js @@ -258,6 +258,10 @@ export default { getCurUserInfo() { let userProfile = uni.getStorageSync('userProfile'); return userProfile; + }, + async refreshCurUserCache() { + let newUserInfo = await this.getCurUserNoCache(); + uni.setStorageSync('userProfile', newUserInfo); }, async getCurUserNoCache() { let userInfo = this.getCurUserInfo(); @@ -525,5 +529,33 @@ export default { data: params }) return res[1].data; + }, + async sendVertifyCode(params = {}) { + let res = await uni.request({ + url: '/tool/sms/send', + method: 'POST', + data: params + }) + return res[1].data; + }, + async addCustomerPlace(params = {}) { + let res = await uni.request({ + url: '/customer/place/app/add', + method: 'POST', + data: params + }) + return res[1].data; + }, + async qryCustomerList(params = {}) { + let res = await uni.request({ + url: '/customer/app/list', + method: 'POST', + data: params, + header: { + pageNum: params.pageNum, + pageSize: params.pageSize + } + }) + return res[1].data; } } diff --git a/pages.json b/pages.json index 50883bd..34acd43 100644 --- a/pages.json +++ b/pages.json @@ -32,6 +32,8 @@ "path": "my-address" }, { "path": "edit-address" + }, { + "path": "apply-operator" }, { "path": "my-team-member" }, { diff --git a/pages/index/my-home.vue b/pages/index/my-home.vue index e887374..d72fe65 100644 --- a/pages/index/my-home.vue +++ b/pages/index/my-home.vue @@ -228,7 +228,7 @@ - 运营商申请 - + - --> + @@ -367,26 +367,34 @@ }); }, showApplyOperator() { - uni.navigateTo({ - url: '/pages/my/apply-operator' - }) + this.curUserInfo = this.$request.getCurUserInfo(); + // 判断当前用户的是否已提交分销资格申请 + if (this.curUserInfo.placeStatus == 0) { + uni.navigateTo({ + url: '/pages/my/apply-operator' + }) + } else if (this.curUserInfo.placeStatus == 2) { + uni.navigateTo({ + url: '/pages/my/my-team-member' + }) + } else { + uni.showToast({ + icon: 'none', + title: '申请审核中' + }) + } }, async showAppInviteQrcode() { + this.curUserInfo = this.$request.getCurUserInfo(); // 判断当前用户的是否已通过分销资格审核 if (this.curUserInfo.placeStatus == 1) { uni.showToast({ icon: 'none', - title: '审核中' + title: '申请审核中' }) } else if (this.curUserInfo.placeStatus != 2) { - await this.$request.updateUser({ - customerId: this.curUserInfo.customerId, - placeStatus: 1 - }); - this.curUserInfo = this.$request.getCurUserInfo(); - uni.showToast({ - icon: 'none', - title: '已提交进行分销审核' + uni.navigateTo({ + url: '/pages/my/apply-operator' }) } else { // 判断是否有绑定银行信息 diff --git a/pages/my/apply-operator.vue b/pages/my/apply-operator.vue index c34ed10..7e72e28 100644 --- a/pages/my/apply-operator.vue +++ b/pages/my/apply-operator.vue @@ -55,21 +55,28 @@
- 您的姓名 + 您的姓名* - 注册电话 - + 注册电话* + + + + 申请城市* + + + {{formData.area && formData.area.length ? formData.area[0].areaName + '-' + formData.area[1].areaName : '请选择'}} + + - - 申请城市 - - - - 验证码 - - + + 验证码* + + 发送验证码 + + 已发送({{countDownNum}}) + 关联信息 @@ -77,7 +84,7 @@ - 合同同意书链接 @@ -95,48 +102,120 @@