|
|
@ -68,6 +68,20 @@ |
|
|
|
<GroupFormBtns @cancel="cancelClick" @confirm="updateSiteDomain()" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div class="siteMessage flex-common" id="siteMessage2"> |
|
|
|
<h3>销售渠道</h3> |
|
|
|
<el-form ref="domainFormRef"> |
|
|
|
<div class="flex-wrap"> |
|
|
|
<div class="flex-left"> |
|
|
|
<div class="flex mt12"> |
|
|
|
<GuipRadio v-model="saleChannel" :options="saleChannels" prop="key" label-key="name" value-key="channel" @change="changeSaleChannel" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-form> |
|
|
|
<GroupFormBtns @cancel="cancelClick" @confirm="updateSaleChannel()" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div class="siteMessage flex-common" id="siteMessage3"> |
|
|
|
<h3>收款方式<span>至少需要配置1种收款方式</span></h3> |
|
|
|
<el-form ref="formRef"> |
|
|
@ -290,7 +304,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<addPay :payType="addPayType" :visible="isShowAddPay" @update:visible="handleEvent" |
|
|
|
<addPay :payType="addPayType" :visible="isShowAddPay" @update:visible="handleEvent" @update:data="handleUpdateEvent" |
|
|
|
:taobaoAuthUrl="taobaoAuthUrl" :isExistSelfSupplys="isExistSelfSupplys" :pddAuthUrl="pddAuthUrl" :jdAuthUrl="jdAuthUrl"></addPay> |
|
|
|
</div> |
|
|
|
</template> |
|
|
@ -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, '---'); |
|
|
|
}, |
|
|
@ -690,6 +712,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 |
|
|
@ -739,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') |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|