Browse Source

收款方式回显

pull/105/head
pengda 3 weeks ago
parent
commit
954365355f
  1. 25
      src/components/pay/addPay.vue
  2. 28
      src/components/site/addSiteStep/step2.vue
  3. 24
      src/views/agent/siteBaseSetting.vue

25
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) {

28
src/components/site/addSiteStep/step2.vue

@ -270,7 +270,7 @@
</el-form>
</template>
<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>
</div>
@ -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('/')

24
src/views/agent/siteBaseSetting.vue

@ -290,7 +290,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>
@ -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

Loading…
Cancel
Save