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 @@