diff --git a/src/components/paymentMethod.vue b/src/components/paymentMethod.vue index 579220e..8ac2009 100644 --- a/src/components/paymentMethod.vue +++ b/src/components/paymentMethod.vue @@ -14,7 +14,7 @@ - + @@ -46,8 +46,7 @@ export default { }, }, methods:{ - onSwitchChange(data){ - data.status = data.status === 1 ? 0 : 1; + onSwitchChange(){ this.$emit('confirm', this.list) }, onEnd() { diff --git a/src/components/site/addSiteStep/step1.vue b/src/components/site/addSiteStep/step1.vue index cee02ec..38c2396 100644 --- a/src/components/site/addSiteStep/step1.vue +++ b/src/components/site/addSiteStep/step1.vue @@ -43,7 +43,7 @@

销售方向

- +
@@ -118,6 +118,9 @@ export default { domain: [ { required: true, message: '请设置站点域名', trigger: 'blur' } ], + site_type: [ + { required: true, message: '请选择站点类型', trigger: 'blur' } + ], }, channel_options: [ @@ -237,13 +240,16 @@ export default { }).then(response => { if(response.status && response.data.uid){ that.formData.uid = response.data.uid - this.$emit('handelSiteInfo', that.formData) + that.formData.domain_type = that.domainType + that.formData.domain_prefix = that.domainPrefix + that.formData.domain_name = that.domainName + that.$emit('handelSiteInfo', that.formData) - if(this.formData.sale_channel === '2'){ + if(that.formData.sale_channel === '2'){ //自用站点无需设置收款方式 - this.$emit('handelStep', 3) + that.$emit('handelStep', 3) }else{ - this.$emit('handelStep', 2) + that.$emit('handelStep', 2) } return true; } diff --git a/src/components/site/addSiteStep/step2.vue b/src/components/site/addSiteStep/step2.vue index f1baa7e..d4eea0e 100644 --- a/src/components/site/addSiteStep/step2.vue +++ b/src/components/site/addSiteStep/step2.vue @@ -276,7 +276,7 @@
- 跳过 + 去首页 下一步
@@ -332,7 +332,7 @@ export default { bindWxpayId: 0, selectWxpay: null, - bindAlipayId: 10079, + bindAlipayId: null, selectAlipay: null, bindTaobaoId: 0, selectTaobao: null, @@ -365,6 +365,11 @@ export default { return false; } + if(this.siteInfo.sale_channel === '2'){ + this.$emit('handelStep', 3) + return false; + } + this.getSitePayIndex() this.getPayList() this.getAddablePays() @@ -410,7 +415,9 @@ export default { }, // 获取支付列表 getPayList() { - this.$http('POST', '/agentnew/ajax_get_pay_list', {},{ + this.$http('POST', '/agentnew/ajax_get_pay_list', { + uid: this.siteInfo.uid + },{ headers:{ 'Auth': this.token } @@ -503,10 +510,8 @@ export default { changeSelectAlipay(item) { this.bindAlipayId = item.payid; this.selectAlipay = item; - console.log(this.bindWxpayId, 'bindWxpayId'); this.selectedItem = { ...item }; - console.log(this.selectedItem, 'this.selectedItem===='); }, changeSelectTaobao(item) { this.bindTaobaoId = item.payid; @@ -536,19 +541,28 @@ export default { this.getAddablePays() }, jumpStep(){ - this.$emit('handelStep', 3) + this.$router.push('/') }, nextStep() { var data = { uid: this.siteInfo.uid, open_processs: 4, - pay_config: { - 0: this.bindTaobaoId, - 2: this.bindWxpayId, - 3: this.bindAlipayId, - 4: this.bindJdId, - 11: this.bindPddId, - }, + pay_config: {}, + } + if(this.siteInfo.sale_channel === '0'){ + if(this.isJd && this.bindJdId) data.pay_config = { 4: this.bindJdId } + if(!this.isJd && this.bindTaobaoId) data.pay_config = { 0: this.bindTaobaoId } + } + if(this.siteInfo.sale_channel === '1'){ + if(this.bindWxpayId) data.pay_config = { 2: this.bindWxpayId } + if(this.bindAlipayId) data.pay_config = { 3: this.bindAlipayId } + } + if(this.siteInfo.sale_channel === '3'){ + if(this.bindPddId) data.pay_config = { 11: this.bindPddId } + } + if(Object.keys(data.pay_config).length === 0) { + this.$Message.error('请绑定收款方式'); + return false } this.$http('POST', '/agentnew/ajax_update_site_pay', data, { diff --git a/src/components/site/addSiteStep/step3.vue b/src/components/site/addSiteStep/step3.vue index c98df49..388cf24 100644 --- a/src/components/site/addSiteStep/step3.vue +++ b/src/components/site/addSiteStep/step3.vue @@ -12,13 +12,13 @@
- - + + @@ -55,14 +55,13 @@ -