From 954365355ff338cad2e43cb492d05a19ec3ca056 Mon Sep 17 00:00:00 2001 From: pengda <1111@qq.com> Date: Mon, 11 Aug 2025 11:03:59 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=94=B6=E6=AC=BE=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=E5=9B=9E=E6=98=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/pay/addPay.vue | 25 +++++++++++++++++++------ src/components/site/addSiteStep/step2.vue | 28 +++++++++++++++++++++++++--- src/views/agent/siteBaseSetting.vue | 24 +++++++++++++++++++++++- 3 files changed, 67 insertions(+), 10 deletions(-) diff --git a/src/components/pay/addPay.vue b/src/components/pay/addPay.vue index 2dca743..23a9e8d 100644 --- a/src/components/pay/addPay.vue +++ b/src/components/pay/addPay.vue @@ -287,7 +287,7 @@ export default { }).then(response => { this.$nextTick(() => { if (response.status) { - this.init(); + this.init(response.data); this.$Message.success(response.info); } else { @@ -308,13 +308,12 @@ export default { }).then(response => { this.$nextTick(() => { if (response.status) { + this.init(response.data.payid); if (this.isPayPublic == 1) { - this.init(); this.$Message.success(response.info); } else { - window.open(response.data.authurl, '_blank'); + window.open(response.data.authurl, '_blank'); } - } else { this.$Message.error(response.info); } @@ -328,7 +327,7 @@ export default { }).then(response => { this.$nextTick(() => { if (response.status) { - this.init(); + this.init(response.data); this.$Message.success(response.info); } else { this.$Message.error(response.info); @@ -356,10 +355,24 @@ export default { handleClick(tab, event) { console.log(tab, event); }, - init() { + init(payid) { this.addPayDialogVisible = false; this.$emit('update:visible', false); this.resetForm(); // 重置表单 + + if(payid){ + this.$http('POST', '/agentnew/ajax_get_payinfo', { + payid: payid, + }).then(response => { + this.$nextTick(() => { + if (response.status) { + this.$emit('update:data', response.data); + } + }) + }).catch(error => { + console.error(error, 'error') + }) + } }, },watch: { visible(newVal) { diff --git a/src/components/site/addSiteStep/step2.vue b/src/components/site/addSiteStep/step2.vue index 5aad894..bba2d9d 100644 --- a/src/components/site/addSiteStep/step2.vue +++ b/src/components/site/addSiteStep/step2.vue @@ -270,7 +270,7 @@ - @@ -534,8 +534,30 @@ export default { }, handleEvent(data) { this.isShowAddPay = data - // this.getPayList() - // this.getAddablePays() + this.getPayList() + this.getAddablePays() + }, + handleUpdateEvent(data) { + if (data.type == this.payTypeWeixin) { + this.bindWxpayId = data.payid + this.selectWxpay = data + } + if (data.type == this.payTypeAlipay) { + this.bindAlipayId = data.payid + this.selectAlipay = data + } + if (data.type == this.payTypeTaoBao) { + this.bindTaobaoId = data.payid + this.selectTaobao = data + } + if (data.type == this.payTypePdd) { + this.bindPddId = data.payid + this.selectPdd = data + } + if (data.type == this.payTypeJingdong) { + this.bindJdId = data.payid + this.selectJd = data + } }, jumpStep(){ this.$router.push('/') diff --git a/src/views/agent/siteBaseSetting.vue b/src/views/agent/siteBaseSetting.vue index 8865169..f6c7e1e 100644 --- a/src/views/agent/siteBaseSetting.vue +++ b/src/views/agent/siteBaseSetting.vue @@ -290,7 +290,7 @@ - @@ -690,6 +690,28 @@ export default { handleEvent(data) { this.isShowAddPay = data }, + handleUpdateEvent(data){ + if (data.type == this.payTypeWeixin) { + this.bindWxpayId = data.payid + this.selectWxpay = data + } + if (data.type == this.payTypeAlipay) { + this.bindAlipayId = data.payid + this.selectAlipay = data + } + if (data.type == this.payTypeTaoBao) { + this.bindTaobaoId = data.payid + this.selectTaobao = data + } + if (data.type == this.payTypePdd) { + this.bindPddId = data.payid + this.selectPdd = data + } + if (data.type == this.payTypeJingdong) { + this.bindJdId = data.payid + this.selectJd = data + } + }, handleEvent2(data) { this.siteDomain = data.prefix + data.domain; this.domainPrefix = data.prefix From 6bc59e61693f385abf29b40a1ed8873bf0467e6c Mon Sep 17 00:00:00 2001 From: zq <136432190602163.com> Date: Mon, 11 Aug 2025 14:11:47 +0800 Subject: [PATCH 2/4] =?UTF-8?q?radio-value=E5=80=BC=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/GuipRadio.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/GuipRadio.vue b/src/components/GuipRadio.vue index 5249497..e937587 100644 --- a/src/components/GuipRadio.vue +++ b/src/components/GuipRadio.vue @@ -149,7 +149,11 @@ export default { return option.key; } - return option[this.valueKey] || option; + // 明确检查 valueKey 是否存在 + if (typeof option === 'object' && this.valueKey in option) { + return option[this.valueKey]; + } + return option; }, // 判断选项是否禁用 isDisabled(key) { From 932fb779d1ff63c64d4f5ad84cf2cf94e9314a18 Mon Sep 17 00:00:00 2001 From: rainbro <33367671@qq.com> Date: Mon, 11 Aug 2025 14:14:57 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E9=94=80=E5=94=AE=E6=B8=A0=E9=81=93?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/agent/siteBaseSetting.vue | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/views/agent/siteBaseSetting.vue b/src/views/agent/siteBaseSetting.vue index f6c7e1e..a14aeb2 100644 --- a/src/views/agent/siteBaseSetting.vue +++ b/src/views/agent/siteBaseSetting.vue @@ -68,6 +68,20 @@ +
+

销售渠道

+ +
+
+
+ +
+
+
+
+ + +

收款方式至少需要配置1种收款方式

@@ -394,6 +408,9 @@ export default { { required: true, message: '请设置站点域名', trigger: [] } ], }, + + saleChannels: [], + saleChannel: 0, } }, computed: { @@ -516,6 +533,8 @@ export default { this.siteDomain = response.data.domain; this.domainPrefix = response.data.domain_prefix this.domainName = response.data.domain_name + this.saleChannels = response.data.sale_channels; + this.saleChannel = Number(response.data.sale_channel); if ( response.data && @@ -643,6 +662,9 @@ export default { domainChange(){ this.domainData.domainPrefix = this.domainPrefix }, + changeSaleChannel(data) { + console.log(data, 'changeSaleChannel'); + }, onSwitchChange(data) { console.log(data, '---'); }, @@ -761,6 +783,24 @@ export default { }) } + }, + updateSaleChannel() { + this.$http('POST', '/agentnew/ajax_update_site_sale_channel', { + uid: this.$route.query.uid, + sale_channel: this.saleChannel, + }).then(response => { + this.$nextTick(() => { + if (response.status) { + this.$Message.success(response.info); + this.getSiteInfo(); + } else { + this.$Message.error(response.info); + } + }) + }).catch(error => { + console.error(error, 'error') + }) + } } From 82f3f22ac428bb58f884bd5d493053e28d6a407c Mon Sep 17 00:00:00 2001 From: zq <136432190602163.com> Date: Mon, 11 Aug 2025 14:15:49 +0800 Subject: [PATCH 4/4] =?UTF-8?q?radio-label=E5=80=BC=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/GuipRadio.vue | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/components/GuipRadio.vue b/src/components/GuipRadio.vue index e937587..07702ec 100644 --- a/src/components/GuipRadio.vue +++ b/src/components/GuipRadio.vue @@ -138,10 +138,16 @@ export default { // 当前选项是否选中 const isSelected = this.getValue(option) === this.selectedValue; - // 选中状态下优先返回selectedLabel,其次返回labelKey指定的属性 - return isSelected && option[this.selectedLabelKey] - ? option[this.selectedLabelKey] - : option[this.labelKey] || option; + // 选中状态下优先返回 selectedLabel + if (isSelected && option[this.selectedLabelKey]) { + return option[this.selectedLabelKey]; + } + + // 明确检查 labelKey 是否存在 + if (typeof option === 'object' && this.labelKey in option) { + return option[this.labelKey]; + } + return option; }, getValue(option) { // 处理对象格式的选项