Browse Source

站点绑定收款方式

master
rainbro 9 hours ago
parent
commit
7f975b3531
  1. 64
      src/components/pay/addPay.vue
  2. 30
      src/views/agent/siteBaseSetting.vue

64
src/components/pay/addPay.vue

@ -148,6 +148,26 @@ export default {
type: String, type: String,
default: '' default: ''
}, },
// url
taobaoAuthUrl: {
type: String,
default: ''
},
// url
pddAuthUrl: {
type: String,
default: ''
},
// url
jdAuthUrl: {
type: String,
default: ''
},
//
isExistSelfSupplys: {
type: Boolean,
default: false
},
}, },
components: { components: {
GuipInput, GuipInput,
@ -186,8 +206,7 @@ export default {
// //
addPayconfirmText: '确定', addPayconfirmText: '确定',
// url
taobaoAuthUrl: '',
// //
company_short_name: '', company_short_name: '',
// //
@ -198,20 +217,14 @@ export default {
appid: '', appid: '',
// //
alipay_account: '', alipay_account: '',
//
isExistSelfSupplys: false,
// //
receive_payment_account: '', receive_payment_account: '',
// //
receive_payment_name: '', receive_payment_name: '',
// 0 1 // 0 1
isPayPublic: '0', isPayPublic: '0',
// url
pddAuthUrl: '',
// //
pdd_shop_name: '', pdd_shop_name: '',
// url
jdAuthUrl: '',
// localSiteInfo: { ...this.siteInfo } // localSiteInfo: { ...this.siteInfo }
} }
@ -221,7 +234,6 @@ export default {
}, },
mounted() { mounted() {
// store.commit('SET_PAGETITLE', '广'); // store.commit('SET_PAGETITLE', '广');
this.getAddablePays()
}, },
methods: { methods: {
updateDialogByPayType() { updateDialogByPayType() {
@ -256,38 +268,6 @@ export default {
this.pdd_shop_name = ''; this.pdd_shop_name = '';
this.isPayPublic = '0'; // this.isPayPublic = '0'; //
}, },
//
getAddablePays() {
this.$http('POST', '/agentnew/ajax_get_addable_pays', {
// : ,
},{
headers:{
'Auth': this.token
}
}).then(response => {
this.tableLoading = false
this.$nextTick(() => {
if(response.data[PAY_TYPE_TAOBAO]) {
this.taobaoAuthUrl = response.data[PAY_TYPE_TAOBAO].authurl
}
if (response.data[PAY_TYPE_ALIPAY]) {
this.isExistSelfSupplys = response.data[PAY_TYPE_ALIPAY].is_exist_self_supplys
}
if (response.data[PAY_TYPE_PDD]) {
this.pddAuthUrl = response.data[PAY_TYPE_PDD].authurl
}
if (response.data[PAY_TYPE_JINGDONG]) {
this.jdAuthUrl = response.data[PAY_TYPE_JINGDONG].authurl
}
})
}).catch(error => {
console.error(error, 'error')
})
},
// ---start // ---start
showAddPaymentMethodDialog(type, type_desc) { showAddPaymentMethodDialog(type, type_desc) {
console.log(type, 'type'); console.log(type, 'type');
@ -409,7 +389,7 @@ export default {
}, },
authToken(newVal) { authToken(newVal) {
this.token = newVal; this.token = newVal;
} },
} }
} }

30
src/views/agent/siteBaseSetting.vue

@ -402,7 +402,8 @@
</div> </div>
</div> </div>
<addPay :payType="addPayType" :visible="isShowAddPay" @update:visible="handleEvent" :authToken="authToken"></addPay> <addPay :payType="addPayType" :visible="isShowAddPay" @update:visible="handleEvent" :authToken="authToken"
:taobaoAuthUrl="taobaoAuthUrl" :isExistSelfSupplys="isExistSelfSupplys" :pddAuthUrl="pddAuthUrl" :jdAuthUrl="jdAuthUrl"></addPay>
</div> </div>
</template> </template>
<script> <script>
@ -481,6 +482,17 @@ export default {
authToken: '', authToken: '',
addablePays: [], addablePays: [],
// url
taobaoAuthUrl: '',
//
isExistSelfSupplys: false,
// url
pddAuthUrl: '',
//
pdd_shop_name: '',
// url
jdAuthUrl: '',
domainOptions: [ domainOptions: [
{ {
value: '.chachongz.com', value: '.chachongz.com',
@ -539,6 +551,22 @@ export default {
}).then(response => { }).then(response => {
this.$nextTick(() => { this.$nextTick(() => {
this.addablePays = response.data this.addablePays = response.data
if(response.data[PAY_TYPE_TAOBAO]) {
this.taobaoAuthUrl = response.data[PAY_TYPE_TAOBAO].authurl
}
if (response.data[PAY_TYPE_ALIPAY]) {
this.isExistSelfSupplys = response.data[PAY_TYPE_ALIPAY].is_exist_self_supplys
}
if (response.data[PAY_TYPE_PDD]) {
this.pddAuthUrl = response.data[PAY_TYPE_PDD].authurl
}
if (response.data[PAY_TYPE_JINGDONG]) {
this.jdAuthUrl = response.data[PAY_TYPE_JINGDONG].authurl
}
}) })
}).catch(error => { }).catch(error => {
console.error(error, 'error') console.error(error, 'error')

Loading…
Cancel
Save