diff --git a/src/api/modules/common.js b/src/api/modules/common.js index 930cbe0..0d5c907 100644 --- a/src/api/modules/common.js +++ b/src/api/modules/common.js @@ -15,7 +15,7 @@ export const password = (password, newPassword) => { // 退出登录 export const logout = () => { return $http({ - url: '/auth/logout', + url: '/merchant-api/auth/logout', method: 'post', data: $http.adornData() }) diff --git a/src/views/modules/bank-card/popup/add-or-update.vue b/src/views/modules/bank-card/popup/add-or-update.vue index 17f1a18..0fa56a6 100644 --- a/src/views/modules/bank-card/popup/add-or-update.vue +++ b/src/views/modules/bank-card/popup/add-or-update.vue @@ -9,7 +9,47 @@ > @@ -486,7 +635,7 @@ export default { bankLicense: "", handIdCardFront: "", handIdCardBack: "", - bankAcctType: "", + bankAcctType: 1, licenseNumber: "", }; this.$refs.modal.resetFields(); @@ -500,8 +649,7 @@ export default { }, init(row) {}, handleChange(e) { - console.log(e); - // this.modalData.prov = e.join("-"); + this.modalData.prov = e.join("-"); }, handleAvatarSuccess(res) { console.log(res); @@ -527,42 +675,112 @@ export default { console.log(res); this.modalData.handIdCardBack = res.data; }, + handleChange(e) { + if (e == 1) { + this.modalData = { + linkId: JSON.parse(sessionStorage.getItem("userInfo")).managerId + ? JSON.parse(sessionStorage.getItem("userInfo")).managerId + : JSON.parse(sessionStorage.getItem("userInfo")).merchantId, + bankType: "", + name: "", + prov: "", + area: "", + socialCreditCode: "", + socialCreditCodeExpires: "", + businessScope: "", + legalPerson: "", + legalCertId: "", + legalCertIdExpires: "", + legalMp: "", + address: "", + bankCode: "", + cardNo: "", + cardName: "", + licensePicture: "", + idCardFront: "", + idCardBack: "", + bankLicense: "", + handIdCardFront: "", + handIdCardBack: "", + bankAcctType: 1, + licenseNumber: "", + }; + console.log(e); + } else { + this.modalData = { + linkId: JSON.parse(sessionStorage.getItem("userInfo")).managerId + ? JSON.parse(sessionStorage.getItem("userInfo")).managerId + : JSON.parse(sessionStorage.getItem("userInfo")).merchantId, + bankType: "", + cardId: "", + cardName: "", + certId: "", + telNo: "", + idCardFront: "", + idCardBack: "", + bankAcctType: 2, + }; + } + }, }, computed: { modalHandles() { - return [ - { - label: "取消", - handle: () => { - this.toggle(); + if (this.modalData.bankAcctType == 1) { + return [ + { + label: "取消", + handle: () => { + this.toggle(); + }, }, - }, - { - label: "上一步", - type: "primary", - disabled: () => this.process == 1, - handle: () => { - console.log(this.modalData); - this.process = 1; + { + label: "上一步", + type: "primary", + disabled: () => this.process == 1, + handle: () => { + console.log(this.modalData); + this.process = 1; + }, }, - }, - { - label: this.process == 1 ? "下一步" : "确认添加", - type: "primary", - handle: () => { - if (this.process == 1) { - this.process = 2; - } else { + { + label: this.process == 1 ? "下一步" : "确认添加", + type: "primary", + handle: () => { + if (this.process == 1) { + this.process = 2; + } else { + console.log(this.modalData); + this.$api.mer_admin.bankCardAdd(this.modalData).then((res) => { + console.log(res); + this.$emit("queryList"); + this.toggle(); + }); + } + }, + }, + ]; + } else { + return [ + { + label: "取消", + handle: () => { + this.toggle(); + }, + }, + { + label: "确认添加", + type: "primary", + handle: () => { console.log(this.modalData); this.$api.mer_admin.bankCardAdd(this.modalData).then((res) => { console.log(res); this.$emit("queryList"); this.toggle(); }); - } + }, }, - }, - ]; + ]; + } }, }, asyncComputed: {}, diff --git a/src/views/modules/product/index.vue b/src/views/modules/product/index.vue index 928ce5d..bf23e1a 100644 --- a/src/views/modules/product/index.vue +++ b/src/views/modules/product/index.vue @@ -288,6 +288,8 @@ export default { width: "340px", render: ({ row }) => { let edit = () => { + console.log(row); + this.$refs.addOrUpdate.toggle(row).update(); }; let priceAdjustment = () => { diff --git a/src/views/modules/product/popup/add-or-update.vue b/src/views/modules/product/popup/add-or-update.vue index fc0c9f1..0fdf68a 100644 --- a/src/views/modules/product/popup/add-or-update.vue +++ b/src/views/modules/product/popup/add-or-update.vue @@ -208,6 +208,8 @@ export default { }); this.isAdd = true; + console.log('112233'); + }, update: () => { this.modalConfig.title = "编辑商品";