Browse Source

拼多多绑定优化

pull/97/head
pengda 1 month ago
parent
commit
3b5bbed39a
  1. 3
      src/components/bindGoods.vue
  2. 9
      src/components/site/addSiteStep/step2.vue
  3. 12
      src/views/agent/siteServiceAdd.vue

3
src/components/bindGoods.vue

@ -102,7 +102,8 @@ export default {
item.selected = false item.selected = false
if(item.skus){ if(item.skus){
Object.entries(item.skus).forEach(([key, val]) => { Object.entries(item.skus).forEach(([key, val]) => {
item.skus[key] = `${val.title}${val.price}`; item.skus[key] = val.title
if(val.price) item.skus[key] = `${val.title}${val.price}`;
}); });
} }
}); });

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

@ -157,7 +157,7 @@
<el-form ref="formRef" v-if="siteInfo.sale_channel === '3'"> <el-form ref="formRef" v-if="siteInfo.sale_channel === '3'">
<div class="flex-wrap"> <div class="flex-wrap">
<div class="flex-left"> <div class="flex-left">
<div class="shopadd-wrap" v-if="pddList.length"> <div class="shopadd-wrap" v-if="!pddList.length">
<p class="shopadd-title">店铺授权</p> <p class="shopadd-title">店铺授权</p>
<div class="flex-between shopadd-area"> <div class="flex-between shopadd-area">
<div> <div>
@ -548,9 +548,10 @@ export default {
this.isShowAddPay = true; this.isShowAddPay = true;
this.authToken = this.token; this.authToken = this.token;
}, },
handleEvent() { handleEvent(data) {
this.getPayList() this.isShowAddPay = data
this.getAddablePays() // this.getPayList()
// this.getAddablePays()
}, },
jumpStep(){ jumpStep(){
this.$router.push('/') this.$router.push('/')

12
src/views/agent/siteServiceAdd.vue

@ -208,7 +208,7 @@
</div> </div>
</el-form> </el-form>
<bindGoods :showBind="showBind" :uid="uid" :type="type" :pati="pati" :pageCode="pageCode" <bindGoods :showBind="showBind" :uid="uid" :type="type" :pdd_pati="pdd_pati" :pdd_pagecode="pdd_pagecode"
@handleBind="handleBind"> @handleBind="handleBind">
</bindGoods> </bindGoods>
@ -268,8 +268,8 @@ export default {
menuList: {}, menuList: {},
siteAddUrl: '/agent/siteAdd', siteAddUrl: '/agent/siteAdd',
showBind: false, showBind: false,
pati: '', pdd_pati: '',
pageCode: '', pdd_pagecode: '',
dialogDelBindConfim: false, dialogDelBindConfim: false,
delRow: {}, delRow: {},
dialogDelServiceConfim: false, dialogDelServiceConfim: false,
@ -554,10 +554,10 @@ export default {
}, },
async initPddParam(uid) { async initPddParam(uid) {
if (typeof window.PDD_OPEN_init === 'function') { if (typeof window.PDD_OPEN_init === 'function') {
this.pageCode = await this.getPddPageCode(uid) this.pdd_pagecode = await this.getPddPageCode(uid)
await window.PDD_OPEN_init({ code: this.pageCode }) await window.PDD_OPEN_init({ code: this.pdd_pagecode })
this.pati = await window.PDD_OPEN_getPati() this.pdd_pati = await window.PDD_OPEN_getPati()
} else { } else {
console.error('PDD_OPEN_init 不存在,SDK 未正确加载'); console.error('PDD_OPEN_init 不存在,SDK 未正确加载');
} }

Loading…
Cancel
Save