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 => { }).then(response => {
this.$nextTick(() => { this.$nextTick(() => {
if (response.status) { if (response.status) {
this.init(); this.init(response.data);
this.$Message.success(response.info); this.$Message.success(response.info);
} else { } else {
@ -308,13 +308,12 @@ export default {
}).then(response => { }).then(response => {
this.$nextTick(() => { this.$nextTick(() => {
if (response.status) { if (response.status) {
this.init(response.data.payid);
if (this.isPayPublic == 1) { if (this.isPayPublic == 1) {
this.init();
this.$Message.success(response.info); this.$Message.success(response.info);
} else { } else {
window.open(response.data.authurl, '_blank'); window.open(response.data.authurl, '_blank');
} }
} else { } else {
this.$Message.error(response.info); this.$Message.error(response.info);
} }
@ -328,7 +327,7 @@ export default {
}).then(response => { }).then(response => {
this.$nextTick(() => { this.$nextTick(() => {
if (response.status) { if (response.status) {
this.init(); this.init(response.data);
this.$Message.success(response.info); this.$Message.success(response.info);
} else { } else {
this.$Message.error(response.info); this.$Message.error(response.info);
@ -356,10 +355,24 @@ export default {
handleClick(tab, event) { handleClick(tab, event) {
console.log(tab, event); console.log(tab, event);
}, },
init() { init(payid) {
this.addPayDialogVisible = false; this.addPayDialogVisible = false;
this.$emit('update:visible', false); this.$emit('update:visible', false);
this.resetForm(); // 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: { },watch: {
visible(newVal) { visible(newVal) {

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

@ -270,7 +270,7 @@
</el-form> </el-form>
</template> </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> :taobaoAuthUrl="taobaoAuthUrl" :isExistSelfSupplys="isExistSelfSupplys" :pddAuthUrl="pddAuthUrl" :jdAuthUrl="jdAuthUrl"></addPay>
</div> </div>
</div> </div>
@ -534,8 +534,30 @@ export default {
}, },
handleEvent(data) { handleEvent(data) {
this.isShowAddPay = data this.isShowAddPay = data
// this.getPayList() this.getPayList()
// this.getAddablePays() 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(){ jumpStep(){
this.$router.push('/') this.$router.push('/')

24
src/views/agent/siteBaseSetting.vue

@ -290,7 +290,7 @@
</div> </div>
</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> :taobaoAuthUrl="taobaoAuthUrl" :isExistSelfSupplys="isExistSelfSupplys" :pddAuthUrl="pddAuthUrl" :jdAuthUrl="jdAuthUrl"></addPay>
</div> </div>
</template> </template>
@ -690,6 +690,28 @@ export default {
handleEvent(data) { handleEvent(data) {
this.isShowAddPay = 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) { handleEvent2(data) {
this.siteDomain = data.prefix + data.domain; this.siteDomain = data.prefix + data.domain;
this.domainPrefix = data.prefix this.domainPrefix = data.prefix

Loading…
Cancel
Save