diff --git a/common/js/request.js b/common/js/request.js index c7ae812..4a28a3e 100644 --- a/common/js/request.js +++ b/common/js/request.js @@ -11,9 +11,9 @@ export default { title: '加载中' }) // request 触发前拼接 url - args.url = 'https://www.opsoul.com:8881' + args.url; - // args.url = 'http://192.168.2.42:80' + args.url; - // args.url = 'http://127.0.0.1:80' + args.url; + // args.url = 'https://www.opsoul.com:8881' + args.url; + // args.url = 'http://192.168.2.60:80' + args.url; + args.url = 'http://127.0.0.1:80' + args.url; if (args.data && Object.prototype && Object.prototype.toString.call(args.data) === '[object Object]') { args.data.deptId = globalData.deptId; args.data.from = globalData.from; diff --git a/components/custom-bar/module-bar.vue b/components/custom-bar/module-bar.vue index 3c011e1..ee647a0 100644 --- a/components/custom-bar/module-bar.vue +++ b/components/custom-bar/module-bar.vue @@ -52,6 +52,12 @@ this.$emit('getCurPageInfo', { curPageCode: cur }); + }, + navChangeByCode(curPageCode, isChangeFocus) { + this.curPageCode = isChangeFocus ? curPageCode : this.curPageCode; + this.$emit('getCurPageInfo', { + curPageCode: curPageCode + }); } } } diff --git a/pages/index/index.vue b/pages/index/index.vue index 0329fbd..48696b9 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -93,14 +93,22 @@ inParam: null } }, - onLoad(option) { - if (option && option.scene) { - let paraStr = decodeURIComponent(option.scene); - let kvStrArr = paraStr.split("&"); - kvStrArr.forEach((kvStr) => { - let kvArr = kvStr.split("="); - option[kvArr[0]] = kvArr[1]; - }); + async onLoad(option) { + this.moduleBarInfos = await this.$api.data('moduleBarInfos'); + if (option) { + // 跳转逻辑 + if (option.menuCode) { + this.changeCurPageCode(option.menuCode); + return; + } + if (option.scene) { + let paraStr = decodeURIComponent(option.scene); + let kvStrArr = paraStr.split("&"); + kvStrArr.forEach((kvStr) => { + let kvArr = kvStr.split("="); + option[kvArr[0]] = kvArr[1]; + }); + } } this.inParam = option; this.loadData(option); @@ -131,7 +139,6 @@ }, methods: { async loadData(option) { - this.moduleBarInfos = await this.$api.data('moduleBarInfos'); this.curUserInfo = this.$request.getCurUserInfo(); // 更新分销人信息 if (option && option.distributor) { @@ -150,6 +157,13 @@ this.inParam = null; } } + }, + changeCurPageCode(targetPageCode) { + // #ifdef MP + this.$nextTick(() => { + this.$refs.moduleBar.navChangeByCode(targetPageCode, true); + }) + // #endif }, reloadForwardPage() { if (this.inByShare) { diff --git a/pages/index/my-home.vue b/pages/index/my-home.vue index a688f29..5fc0883 100644 --- a/pages/index/my-home.vue +++ b/pages/index/my-home.vue @@ -393,56 +393,47 @@ url: '/pages/my/my-address' }); }, - showApplyOperator() { + async showApplyOperator() { this.curUserInfo = this.$request.getCurUserInfo(); // 判断当前用户的是否已提交分销资格申请 if (this.curUserInfo.placeStatus == 0) { uni.navigateTo({ url: '/pages/my/apply-operator' }) + } else if (this.curUserInfo.placeStatus == 1) { + uni.showToast({ + icon: 'none', + title: '申请审核中' + }) } 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: '申请审核中' - }) - } else if (this.curUserInfo.placeStatus != 2) { - uni.navigateTo({ - url: '/pages/my/apply-operator' - }) - } else { // 判断是否有绑定银行信息 let res = await this.$request.getBindBankCardByCustomerId({ customerId: this.curUserInfo.customerId - }); + }) let bindBankCardInfo = res.data; if (bindBankCardInfo && bindBankCardInfo.bankNum) { - // 分销资格审核通过,可进行二维码分享 - let res = await this.$request.getUnlimitedWxacode({ - scene: "distributor=" + this.curUserInfo.customerId - }); - this.appQrcode = res.data; - this.appShareQrcodeModal = true; + // 分销资格审核通过 + uni.navigateTo({ + url: '/pages/my/my-team-member' + }) } else { + // 跳转到银行卡绑定页面 uni.navigateTo({ url: '/pages/my/withdraw' }) } } }, + async showAppInviteQrcode() { + this.curUserInfo = this.$request.getCurUserInfo(); + let res = await this.$request.getUnlimitedWxacode({ + scene: "distributor=" + this.curUserInfo.customerId, + //FIXME: 只适用于体验版,正式版需要去掉 + env_version: 'trial' + }); + this.appQrcode = res.data; + this.appShareQrcodeModal = true; + }, showPage(pageUrl) { if (pageUrl) { uni.navigateTo({ diff --git a/pages/my/my-order.vue b/pages/my/my-order.vue index 3cbe0d6..712afa8 100644 --- a/pages/my/my-order.vue +++ b/pages/my/my-order.vue @@ -46,7 +46,7 @@ 实付款{{shopOrder.payMoney}} 需付款{{shopOrder.payMoney + shopOrder.changeMoney}} + class="text-price text-red text-lg text-bold">{{Math.round((shopOrder.payMoney + shopOrder.changeMoney) * 100) / 100}} 您有报价/加价申请待付款中...... diff --git a/pages/order/order-detail.vue b/pages/order/order-detail.vue index aa8c3ba..a224568 100644 --- a/pages/order/order-detail.vue +++ b/pages/order/order-detail.vue @@ -296,7 +296,7 @@ } else if (this.formInfo.payWay == '1') { // 上门支付则不拉起微信支付窗口,直接跳转至提示导航页面 uni.navigateTo({ - url: '/pages/order/pay-result?customTip=下单成功,待上门支付' + url: '/pages/order/pay-result?customTip=您选择上门到付款,师傅/服务人员上门后会让您付款,请配合!可从对方出示的系统二维码或你订单中的“付款”键支付!' }) return; } diff --git a/pages/order/pay-result.vue b/pages/order/pay-result.vue index 354d08a..43b9ab1 100644 --- a/pages/order/pay-result.vue +++ b/pages/order/pay-result.vue @@ -80,7 +80,8 @@ } } uni.navigateTo({ - url: '/pages/my/my-order?tabInfo=' + encodeURIComponent(JSON.stringify(params)) + // url: '/pages/my/my-order?tabInfo=' + encodeURIComponent(JSON.stringify(params)) + url: '/pages/index/index?menuCode=myPage' }) } },