diff --git a/common/js/request.js b/common/js/request.js index 42496ee..663bcbf 100644 --- a/common/js/request.js +++ b/common/js/request.js @@ -13,8 +13,8 @@ export default { }) let userInfo = _this.getCurUserInfo(); // request 触发前拼接 url - // args.url = 'https://www.opsoul.com' + args.url; - args.url = 'http://127.0.0.1:80' + args.url; + args.url = 'https://www.opsoul.com' + args.url; + // args.url = 'http://127.0.0.1:80' + args.url; // args.url = 'http://192.168.2.42:80' + args.url; if (!args.data) { diff --git a/components/vertify/vertify-worker-type.vue b/components/vertify/vertify-worker-type.vue index 94ca91d..cab18fc 100644 --- a/components/vertify/vertify-worker-type.vue +++ b/components/vertify/vertify-worker-type.vue @@ -44,10 +44,17 @@ }); if (res && res.code === 0) { this.hideModal(); + let curUserInfo = this.$request.getCurUserInfo(); if (typeCode === 1) { - uni.navigateTo({ - url: '/pages/index/index?menuCode=supplyChainPage' - }) + if (curUserInfo && curUserInfo.storeStatus == 1) { + uni.navigateTo({ + url: '/pages/index/index?menuCode=supplyChainPage' + }) + } else { + uni.navigateTo({ + url: '/pages/my/apply-shop' + }) + } } else if (typeCode === 0) { uni.navigateTo({ url: '/pages/my/master-settled-info' diff --git a/pages.json b/pages.json index 234eca9..3c8267d 100644 --- a/pages.json +++ b/pages.json @@ -58,6 +58,8 @@ "path": "master-settled-info" }, { "path": "certification" + }, { + "path": "apply-shop" }] }], "globalStyle": { diff --git a/pages/demand-center/accept-demand-center.vue b/pages/demand-center/accept-demand-center.vue index 414af5b..c45890f 100644 --- a/pages/demand-center/accept-demand-center.vue +++ b/pages/demand-center/accept-demand-center.vue @@ -268,7 +268,8 @@ categoryMultiIndex: [0, 0, 0], chosenCategory: [], bankCard: null, - certifyInfo: null + certifyInfo: null, + hasNotice: false } }, onShow() { @@ -295,14 +296,17 @@ // 查询实名信息 let certifyInfoRes = await this.$request.getWorkerCertify(); this.certifyInfo = certifyInfoRes.data; - if ((!this.bankCard || !this.bankCard.bankNum) && this.curUserInfo.status != -1) { + + let res = true; + if (!this.bankCard || !this.bankCard.bankNum) { this.$refs.vertifyBankBind.showModal(); - return false; - } else if (!this.certifyInfo || !this.certifyInfo.workerCertificationId) { - this.$refs.vertifyCertify.showModal(); - return false; + res = false; } - return true; + if (!this.certifyInfo || this.certifyInfo.status !== 1) { + this.$refs.vertifyCertify.showModal(); + res = false; + } + return res; }, async loadMasterOrderPage(params = {}) { params.pageSize = this.$globalData.initPageSize; @@ -511,24 +515,23 @@ }) }, async takeTask(e, task) { - let checkRes = await this.checkBankAndCertify(); - if (!checkRes) { - return; + if (!this.hasNotice) { + let checkRes = await this.checkBankAndCertify(); + this.hasNotice = true; + if (!checkRes) { + return; + } } - if (this.curUserInfo.status !== 0 || this.curUserInfo.type !== 0) { - // 未认证需提示前往认证 - e.currentTarget.dataset.modal = e.currentTarget.dataset.certifyModal; - } else { - // 已认证可直接接单 - let res = await this.$request.updateOrder({ - workerId: this.curUserInfo.workerId, - id: task.orderMasterId - }); - if (res && res.code === 0) { - e.currentTarget.dataset.modal = e.currentTarget.dataset.takeModal; - this.reloadMasterOrderPage(); - } + // 已认证可直接接单 + let res = await this.$request.updateOrder({ + workerId: this.curUserInfo.workerId, + id: task.orderMasterId, + orderStatus: 1 + }); + if (res && res.code === 0) { + e.currentTarget.dataset.modal = e.currentTarget.dataset.takeModal; + this.reloadMasterOrderPage(); } this.showModal(e, task); }, diff --git a/pages/demand-center/demand-detail.vue b/pages/demand-center/demand-detail.vue index 0d8fdcc..11e1879 100644 --- a/pages/demand-center/demand-detail.vue +++ b/pages/demand-center/demand-detail.vue @@ -81,6 +81,9 @@ + + + @@ -100,7 +103,10 @@ showTakeSuccessModal: false, specColumnHeaders: ['商品规格', '购买量'], specValFields: ['standardName', 'standardNum'], - curUserInfo: {} + curUserInfo: {}, + bankCard: null, + certifyInfo: null, + hasNotice: false } }, onLoad(options) { @@ -119,20 +125,45 @@ this.order = servDetailRes.data; this.takeCertify = await this.$api.data('takeCertify'); }, + async checkBankAndCertify() { + // 查询账户绑定信息 + let bankCardRes = await this.$request.getBindBankCardByWorkerId({ + workerId: this.curUserInfo.workerId + }); + this.bankCard = bankCardRes.data; + // 查询实名信息 + let certifyInfoRes = await this.$request.getWorkerCertify(); + this.certifyInfo = certifyInfoRes.data; + + let res = true; + if (!this.bankCard || !this.bankCard.bankNum) { + this.$refs.vertifyBankBind.showModal(); + res = false; + } + if (!this.certifyInfo || this.certifyInfo.status !== 1) { + this.$refs.vertifyCertify.showModal(); + res = false; + } + return res; + }, async takeTask(e) { - if (this.curUserInfo.status !== 0 || this.curUserInfo.type !== 0) { - // 未认证需提示前往认证 - e.currentTarget.dataset.modal = e.currentTarget.dataset.certifyModal; - } else { - // 已认证可直接接单 - let res = await this.$request.updateOrder({ - workerId: this.curUserInfo.workerId, - id: this.order.orderMasterId - }); - if (res && res.code === 0) { - e.currentTarget.dataset.modal = e.currentTarget.dataset.takeModal; + if (!this.hasNotice) { + let checkRes = await this.checkBankAndCertify(); + this.hasNotice = true; + if (!checkRes) { + return; } } + + // 已认证可直接接单 + let res = await this.$request.updateOrder({ + workerId: this.curUserInfo.workerId, + id: this.order.orderMasterId, + orderStatus: 1 + }); + if (res && res.code === 0) { + e.currentTarget.dataset.modal = e.currentTarget.dataset.takeModal; + } this.showModal(e); }, showModal(e) { diff --git a/pages/index/index-home.vue b/pages/index/index-home.vue index 79f8a42..7b88411 100644 --- a/pages/index/index-home.vue +++ b/pages/index/index-home.vue @@ -5,7 +5,7 @@ - @@ -167,6 +167,9 @@ this.loadData(); }, methods: { + test() { + + }, async authLogin() { // 更新缓存中的userInfo // let res = await this.$request.storageExistUser(); diff --git a/pages/my/apply-shop.vue b/pages/my/apply-shop.vue new file mode 100644 index 0000000..5bc3516 --- /dev/null +++ b/pages/my/apply-shop.vue @@ -0,0 +1,327 @@ + + + + + diff --git a/pages/order-manage/order-manage.vue b/pages/order-manage/order-manage.vue index 7edbd1a..d63dd86 100644 --- a/pages/order-manage/order-manage.vue +++ b/pages/order-manage/order-manage.vue @@ -725,7 +725,7 @@ // 查询实名信息 let certifyInfoRes = await this.$request.getWorkerCertify(); this.certifyInfo = certifyInfoRes.data; - if ((!this.bankCard || !this.bankCard.bankNum) && this.curUserInfo.status != -1) { + if (!this.bankCard || !this.bankCard.bankNum) { this.$refs.vertifyBankBind.showModal(); return false; } else if (!this.certifyInfo || !this.certifyInfo.workerCertificationId) { diff --git a/style/blue/blue-topic.css b/style/blue/blue-topic.css index 5a9bef1..93fe61c 100644 --- a/style/blue/blue-topic.css +++ b/style/blue/blue-topic.css @@ -55,8 +55,13 @@ radio.main-color.checked .uni-radio-input { .bg-white.text-main-color { color: #0081ff; background-color: #ffffff; +} + +.border-main-color { + border-color: #0081ff !important; +} + +.cu-avatar.bg-main-color { + background-color: #0081ff; + color: #ffffff; } - -.border-main-color { - border-color: #0081ff !important; -} \ No newline at end of file