diff --git a/src/components/site/addSiteStep/step1.vue b/src/components/site/addSiteStep/step1.vue index 41091bc..38c2396 100644 --- a/src/components/site/addSiteStep/step1.vue +++ b/src/components/site/addSiteStep/step1.vue @@ -240,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 fd8b993..3de312f 100644 --- a/src/components/site/addSiteStep/step2.vue +++ b/src/components/site/addSiteStep/step2.vue @@ -544,31 +544,27 @@ export default { this.$router.push('/') }, nextStep() { - if(this.siteInfo.sale_channel === '0' && !this.bindTaobaoId && !this.bindJdId){ - this.$Message.error('请绑定收款方式'); - return false + var data = { + uid: this.siteInfo.uid, + open_processs: 4, + pay_config: {}, } - if(this.siteInfo.sale_channel === '1' && !this.bindWxpayId && !this.bindAlipayId){ - this.$Message.error('请绑定收款方式'); - return false + 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 === '3' && !this.bindPddId){ + 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 } - 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, - }, - } - this.$http('POST', '/agentnew/ajax_update_site_pay', data, { headers: { 'Auth': this.token diff --git a/src/components/site/addSiteStep/step3.vue b/src/components/site/addSiteStep/step3.vue index f74e292..388cf24 100644 --- a/src/components/site/addSiteStep/step3.vue +++ b/src/components/site/addSiteStep/step3.vue @@ -12,13 +12,13 @@