|
|
@ -1,8 +1,9 @@ |
|
|
|
<template> |
|
|
|
<div class="pb80 ml12 mr12"> |
|
|
|
<div class="serviceAdd-wrap"> |
|
|
|
<div class="ml12 mr12 overFlow-wrap"> |
|
|
|
<PromptText text="如何添加服务?" :type="1" class="add-info"> |
|
|
|
<template #next_desc> |
|
|
|
<div class="alert-more flex gap12" :class="alertShow? '' : 'alert-more-hide'" @click="handleAlert"> |
|
|
|
<div class="alert-more flex gap12" :class="alertShow ? '' : 'alert-more-hide'" @click="handleAlert"> |
|
|
|
<div v-if="alertShow">收起</div> |
|
|
|
<div v-else>展开</div> |
|
|
|
<img src="@/assets/site/show_and_hide.png" alt=""> |
|
|
@ -10,7 +11,8 @@ |
|
|
|
</template> |
|
|
|
<template #desc> |
|
|
|
<div class="alert-more-info mt12" v-show="alertShow"> |
|
|
|
<div class="flex mb10 gap10">1.点击左侧导航进入设置页,开启所需服务(<img src="@/assets/site/open_success_menu.svg" alt="">图标表示已开启)。</div> |
|
|
|
<div class="flex mb10 gap10">1.点击左侧导航进入设置页,开启所需服务(<img src="@/assets/site/open_success_menu.svg" |
|
|
|
alt="">图标表示已开启)。</div> |
|
|
|
<div class="flex mb10 gap10">2.可开启多个服务。</div> |
|
|
|
<div class="flex gap10">3.全部开启后,点击底部 [添加完成] 。</div> |
|
|
|
</div> |
|
|
@ -20,7 +22,7 @@ |
|
|
|
<div class="service-title flex-between" v-if="serviceAddInfo"> |
|
|
|
<div class="service-name flex gap12"> |
|
|
|
<img src="@/assets/site/step_success.png" alt=""> |
|
|
|
<span>{{serviceAddInfo.ver_name}}_{{serviceAddInfo.type_name}}</span> |
|
|
|
<span>{{ serviceAddInfo.ver_name }}_{{ serviceAddInfo.type_name }}</span> |
|
|
|
</div> |
|
|
|
<div class="service-status" v-if="serviceInfo.status"> |
|
|
|
<span class="service-status-close" @click="handleDelServiceClick">关闭服务</span> |
|
|
@ -33,13 +35,16 @@ |
|
|
|
<el-form class="el-row demo-ruleForm" ref="formRef"> |
|
|
|
<div class="price-top"> |
|
|
|
<span class="title">网页支付与售价</span> |
|
|
|
<span class="desc" v-if="serviceAddInfo.supply_price">供货价:{{serviceAddInfo.supply_price}}{{serviceAddInfo.supply_price_warning}}</span> |
|
|
|
<span class="desc" |
|
|
|
v-if="serviceAddInfo.supply_price">供货价:{{ serviceAddInfo.supply_price }}{{ serviceAddInfo.supply_price_warning }}</span> |
|
|
|
</div> |
|
|
|
|
|
|
|
<PromptText v-if="serviceAddInfo.prompt.title" :text='serviceAddInfo.prompt.title' :type="1" class="mb12"> |
|
|
|
<PromptText v-if="serviceAddInfo.prompt.title" :text='serviceAddInfo.prompt.title' :type="1" |
|
|
|
class="mb12"> |
|
|
|
<template #desc v-if="serviceAddInfo.prompt.content"> |
|
|
|
<div class="alert-more-info mt12"> |
|
|
|
<div class="flex mb10" v-for="item in serviceAddInfo.prompt.content" :key="item">{{item}}</div> |
|
|
|
<div class="flex mb10" v-for="item in serviceAddInfo.prompt.content" :key="item"> |
|
|
|
{{ item }}</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</PromptText> |
|
|
@ -51,19 +56,24 @@ |
|
|
|
</div> |
|
|
|
<div class="flex-between"> |
|
|
|
<div class="short-width"> |
|
|
|
<GuipSelect width="100%" v-model="serviceInfo.unit" placeholder="选择计费方式" :options="serviceAddInfo.set_units"/> |
|
|
|
<GuipSelect width="100%" v-model="serviceInfo.unit" placeholder="选择计费方式" |
|
|
|
:options="serviceAddInfo.set_units" /> |
|
|
|
</div> |
|
|
|
<div class="short-width" v-if="serviceInfo.unit>0"> |
|
|
|
<GuipInput v-if="serviceInfo.unit === '1'" v-model="serviceInfo.price" width="100%" ref="GuipInput" unit="元/篇"></GuipInput> |
|
|
|
<GuipInput v-if="serviceInfo.unit === '2'" v-model="serviceInfo.price" width="100%" ref="GuipInput" unit="元/页"></GuipInput> |
|
|
|
<div class="short-width" v-if="serviceInfo.unit > 0"> |
|
|
|
<GuipInput v-if="serviceInfo.unit === '1'" v-model="serviceInfo.price" width="100%" |
|
|
|
ref="GuipInput" unit="元/篇"></GuipInput> |
|
|
|
<GuipInput v-if="serviceInfo.unit === '2'" v-model="serviceInfo.price" width="100%" |
|
|
|
ref="GuipInput" unit="元/页"></GuipInput> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="flex-between mt12" v-if="serviceInfo.unit === '0'"> |
|
|
|
<div class="short-width"> |
|
|
|
<GuipInput width="100%" v-model="serviceInfo.price" ref="GuipInput" unit="元"></GuipInput> |
|
|
|
<GuipInput width="100%" v-model="serviceInfo.price" ref="GuipInput" unit="元"> |
|
|
|
</GuipInput> |
|
|
|
</div> |
|
|
|
<div class="short-width"> |
|
|
|
<GuipInput width="100%" v-model="serviceInfo.unit_num" ref="GuipInput" unit="字符"></GuipInput> |
|
|
|
<GuipInput width="100%" v-model="serviceInfo.unit_num" ref="GuipInput" unit="字符"> |
|
|
|
</GuipInput> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -76,13 +86,15 @@ |
|
|
|
</div> |
|
|
|
<div class="flex-between"> |
|
|
|
<div class="third-width"> |
|
|
|
<GuipInput width="100%" v-model="serviceInfo.base_unit_num" ref="GuipInput" unit="字符内"></GuipInput> |
|
|
|
<GuipInput width="100%" v-model="serviceInfo.base_unit_num" ref="GuipInput" |
|
|
|
unit="字符内"></GuipInput> |
|
|
|
</div> |
|
|
|
<div class="w85"> |
|
|
|
用户需支付 |
|
|
|
</div> |
|
|
|
<div class="third-width"> |
|
|
|
<GuipInput width="100%" v-model="serviceInfo.base_unit_price" ref="GuipInput" unit="元"></GuipInput> |
|
|
|
<GuipInput width="100%" v-model="serviceInfo.base_unit_price" ref="GuipInput" |
|
|
|
unit="元"></GuipInput> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -99,7 +111,7 @@ |
|
|
|
<div class="flex-common mb12 price-set" v-if="serviceAddInfo.shop_price_set"> |
|
|
|
<el-form class="el-row demo-ruleForm" ref="formRef"> |
|
|
|
<div class="price-top"> |
|
|
|
<span class="title">{{serviceAddInfo.shop_name}}支付管理</span> |
|
|
|
<span class="title">{{ serviceAddInfo.shop_name }}支付管理</span> |
|
|
|
<span class="desc"></span> |
|
|
|
</div> |
|
|
|
|
|
|
@ -110,19 +122,24 @@ |
|
|
|
</div> |
|
|
|
<div class="flex-between"> |
|
|
|
<div class="short-width"> |
|
|
|
<GuipSelect width="100%" v-model="serviceInfo.unit" placeholder="选择计费方式" :options="serviceAddInfo.set_units"/> |
|
|
|
<GuipSelect width="100%" v-model="serviceInfo.unit" placeholder="选择计费方式" |
|
|
|
:options="serviceAddInfo.set_units" /> |
|
|
|
</div> |
|
|
|
<div class="short-width" v-if="serviceInfo.unit>0"> |
|
|
|
<GuipInput v-if="serviceInfo.unit === '1'" v-model="serviceAddInfo.unit_piece" width="100%" ref="GuipInput" unit="件/篇"></GuipInput> |
|
|
|
<GuipInput v-if="serviceInfo.unit === '2'" v-model="serviceAddInfo.unit_piece" width="100%" ref="GuipInput" unit="件/页"></GuipInput> |
|
|
|
<div class="short-width" v-if="serviceInfo.unit > 0"> |
|
|
|
<GuipInput v-if="serviceInfo.unit === '1'" v-model="serviceAddInfo.unit_piece" |
|
|
|
width="100%" ref="GuipInput" unit="件/篇"></GuipInput> |
|
|
|
<GuipInput v-if="serviceInfo.unit === '2'" v-model="serviceAddInfo.unit_piece" |
|
|
|
width="100%" ref="GuipInput" unit="件/页"></GuipInput> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="flex-between mt12" v-if="serviceInfo.unit === '0'"> |
|
|
|
<div class="short-width"> |
|
|
|
<GuipInput width="100%" v-model="serviceInfo.unit_piece" ref="GuipInput" unit="件"></GuipInput> |
|
|
|
<GuipInput width="100%" v-model="serviceInfo.unit_piece" ref="GuipInput" unit="件"> |
|
|
|
</GuipInput> |
|
|
|
</div> |
|
|
|
<div class="short-width"> |
|
|
|
<GuipInput width="100%" v-model="serviceInfo.unit_num" ref="GuipInput" unit="字符"></GuipInput> |
|
|
|
<GuipInput width="100%" v-model="serviceInfo.unit_num" ref="GuipInput" unit="字符"> |
|
|
|
</GuipInput> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -135,13 +152,15 @@ |
|
|
|
</div> |
|
|
|
<div class="flex-between"> |
|
|
|
<div class="third-width"> |
|
|
|
<GuipInput width="100%" v-model="serviceInfo.base_unit_num" ref="GuipInput" unit="字符内"></GuipInput> |
|
|
|
<GuipInput width="100%" v-model="serviceInfo.base_unit_num" ref="GuipInput" |
|
|
|
unit="字符内"></GuipInput> |
|
|
|
</div> |
|
|
|
<div class="w85"> |
|
|
|
用户需支付 |
|
|
|
</div> |
|
|
|
<div class="third-width"> |
|
|
|
<GuipInput width="100%" v-model="serviceInfo.base_unit_piece" ref="GuipInput" unit="件"></GuipInput> |
|
|
|
<GuipInput width="100%" v-model="serviceInfo.base_unit_piece" ref="GuipInput" |
|
|
|
unit="件"></GuipInput> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -159,7 +178,7 @@ |
|
|
|
<el-form class="el-row demo-ruleForm" ref="formRef"> |
|
|
|
<div class="price-top"> |
|
|
|
<span class="title">关联电商商品</span> |
|
|
|
<span class="desc">必须关联,且确保服务与{{serviceAddInfo.shop_name}}电商商品一致</span> |
|
|
|
<span class="desc">必须关联,且确保服务与{{ serviceAddInfo.shop_name }}电商商品一致</span> |
|
|
|
</div> |
|
|
|
<div class="flex-wrap" @click="bindGoods"> |
|
|
|
<div class="flex-left bind-button gap12"> |
|
|
@ -169,17 +188,22 @@ |
|
|
|
</div> |
|
|
|
<div class="bind-list" v-if="bindList"> |
|
|
|
<div class="bind-item" v-for="(row, key) in bindList" :key="key"> |
|
|
|
<img :src="row.pic_url?row.pic_url:require('@/assets/site/invalid.png')" alt=""> |
|
|
|
<img :src="row.pic_url ? row.pic_url : require('@/assets/site/invalid.png')" alt=""> |
|
|
|
<div class="bind-goods-info"> |
|
|
|
<div class="bind-goods-title"><el-link :href="row.link" target="_blank">{{row.title}}</el-link></div> |
|
|
|
<div class="bind-goods-title"><el-link :href="row.link" |
|
|
|
target="_blank">{{ row.title }}</el-link> |
|
|
|
</div> |
|
|
|
<div class="flex-between gap12"> |
|
|
|
<div class="flex gap12"> |
|
|
|
<span v-if="row.price">¥{{row.price}}</span> |
|
|
|
<span v-if="row.sec_title">{{row.sec_title}}</span> |
|
|
|
<span v-if="row.price">¥{{ row.price }}</span> |
|
|
|
<span v-if="row.sec_title">{{ row.sec_title }}</span> |
|
|
|
</div> |
|
|
|
<div class="flex gap12"> |
|
|
|
<span class="bind-btn bind-delete" @click="handleDelBindClick(row, key)">删除</span> |
|
|
|
<span class="bind-btn" :class="row.is_default === '1' ? 'bind-default-active' : 'bind-default' " @click="handleDefaultConfirm(row.id)">默认商品</span> |
|
|
|
<span class="bind-btn bind-delete" |
|
|
|
@click="handleDelBindClick(row, key)">删除</span> |
|
|
|
<span class="bind-btn" |
|
|
|
:class="row.is_default === '1' ? 'bind-default-active' : 'bind-default'" |
|
|
|
@click="handleDefaultConfirm(row.id)">默认商品</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -187,23 +211,28 @@ |
|
|
|
</div> |
|
|
|
</el-form> |
|
|
|
|
|
|
|
<bindGoods :showBind="showBind" :uid="uid" :type="type" :pati="pati" :pageCode="pageCode" @handleBind="handleBind"></bindGoods> |
|
|
|
<bindGoods :showBind="showBind" :uid="uid" :type="type" :pati="pati" :pageCode="pageCode" |
|
|
|
@handleBind="handleBind"> |
|
|
|
</bindGoods> |
|
|
|
|
|
|
|
<GuipDialog :dialogVisible="dialogDelBindConfim" title="提示" :show-close-button="false" @confirm="handleDelBindConfirm" |
|
|
|
@cancel="handleDelBindCancel"> |
|
|
|
<GuipDialog :dialogVisible="dialogDelBindConfim" title="提示" :show-close-button="false" |
|
|
|
@confirm="handleDelBindConfirm" @cancel="handleDelBindCancel"> |
|
|
|
您确定要删除吗?删除后所有绑定都会删除 |
|
|
|
</GuipDialog> |
|
|
|
</div> |
|
|
|
|
|
|
|
<GuipDialog :dialogVisible="dialogDelServiceConfim" title="提示" :show-close-button="false" @confirm="handleDelServiceConfirm" |
|
|
|
@cancel="handleDelServiceCancel"> |
|
|
|
<GuipDialog :dialogVisible="dialogDelServiceConfim" title="提示" :show-close-button="false" |
|
|
|
@confirm="handleDelServiceConfirm" @cancel="handleDelServiceCancel"> |
|
|
|
确定要移除服务吗? |
|
|
|
</GuipDialog> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div class="register-btns"> |
|
|
|
<GuipButton type="primary" :btnstyle="{ width: '144px', height: '46px' }" @click="jumpStep">添加完成</GuipButton> |
|
|
|
<GuipButton type="primary" :btnstyle="{ width: '144px', height: '46px' }" @click="jumpStep">添加完成 |
|
|
|
</GuipButton> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import store from '@/store'; |
|
|
@ -233,11 +262,11 @@ export default { |
|
|
|
uid: 0, |
|
|
|
type: 0, |
|
|
|
prodid: 0, |
|
|
|
serviceAddInfo:{}, |
|
|
|
serviceAddInfo: {}, |
|
|
|
serviceInfo: {}, |
|
|
|
bindList: [], |
|
|
|
alertShow: true, |
|
|
|
menuList:{}, |
|
|
|
menuList: {}, |
|
|
|
siteAddUrl: '/agent/siteAdd', |
|
|
|
showBind: false, |
|
|
|
pati: '', |
|
|
@ -271,11 +300,11 @@ export default { |
|
|
|
this.getAddServiceList(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
handleAlert(){ |
|
|
|
handleAlert() { |
|
|
|
this.alertShow = !this.alertShow |
|
|
|
}, |
|
|
|
//获得左侧菜单导航 |
|
|
|
getAddServiceList(){ |
|
|
|
getAddServiceList() { |
|
|
|
const that = this |
|
|
|
that.$http('POST', '/agentnew/ajax_get_service_add_list', { |
|
|
|
uid: that.uid, |
|
|
@ -304,11 +333,11 @@ export default { |
|
|
|
'Auth': this.token |
|
|
|
} |
|
|
|
}).then(response => { |
|
|
|
if(response.status){ |
|
|
|
if (response.status) { |
|
|
|
that.$nextTick(() => { |
|
|
|
that.serviceAddInfo = response.data |
|
|
|
//拼多多渠道查询商品所需参数初始化 |
|
|
|
if(that.serviceAddInfo.shop_name === '拼多多') this.initPddParam(that.uid) |
|
|
|
if (that.serviceAddInfo.shop_name === '拼多多') this.initPddParam(that.uid) |
|
|
|
//设置默认计费方式 |
|
|
|
that.serviceInfo.unit = that.serviceAddInfo.unit |
|
|
|
//查询是否添加了此服务 |
|
|
@ -324,7 +353,7 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
//查询是否添加了此服务 |
|
|
|
getServiceInfo(){ |
|
|
|
getServiceInfo() { |
|
|
|
const that = this |
|
|
|
that.serviceInfo = {} |
|
|
|
that.$http('POST', '/agentnew/ajax_get_service_info', { |
|
|
@ -336,7 +365,7 @@ export default { |
|
|
|
} |
|
|
|
}).then(response => { |
|
|
|
that.serviceInfo.status = false |
|
|
|
if(response.status && response.data){ |
|
|
|
if (response.status && response.data) { |
|
|
|
that.$nextTick(() => { |
|
|
|
that.serviceInfo = response.data.service_info |
|
|
|
that.serviceInfo.status = true |
|
|
@ -348,7 +377,7 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
//查询绑定的宝贝 |
|
|
|
getServiceBindGoods(){ |
|
|
|
getServiceBindGoods() { |
|
|
|
const that = this |
|
|
|
that.$http('POST', '/agentnew/ajax_get_service_bind_goods', { |
|
|
|
uid: that.uid, |
|
|
@ -358,7 +387,7 @@ export default { |
|
|
|
'Auth': this.token |
|
|
|
} |
|
|
|
}).then(response => { |
|
|
|
if(response.status && response.data){ |
|
|
|
if (response.status && response.data) { |
|
|
|
that.$nextTick(() => { |
|
|
|
that.bindList = response.data |
|
|
|
}) |
|
|
@ -370,21 +399,21 @@ export default { |
|
|
|
handleDelServiceClick() { |
|
|
|
this.dialogDelServiceConfim = true |
|
|
|
}, |
|
|
|
handleDelServiceCancel(){ |
|
|
|
handleDelServiceCancel() { |
|
|
|
this.dialogDelServiceConfim = false |
|
|
|
}, |
|
|
|
handleDelServiceConfirm(){ |
|
|
|
handleDelServiceConfirm() { |
|
|
|
const that = this |
|
|
|
this.dialogDelServiceConfim = false |
|
|
|
this.$http('POST', '/agentnew/ajax_del_service', { |
|
|
|
uid: that.uid, |
|
|
|
type: that.type, |
|
|
|
},{ |
|
|
|
headers:{ |
|
|
|
}, { |
|
|
|
headers: { |
|
|
|
'Auth': this.token |
|
|
|
} |
|
|
|
}).then(response => { |
|
|
|
if(response.status){ |
|
|
|
if (response.status) { |
|
|
|
that.$message.success('删除成功'); |
|
|
|
this.$nextTick(() => { |
|
|
|
that.serviceInfo = {} |
|
|
@ -397,13 +426,13 @@ export default { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
}, |
|
|
|
resetPrice(){ |
|
|
|
resetPrice() { |
|
|
|
this.serviceInfo.price = '' |
|
|
|
this.serviceInfo.unit_num = '' |
|
|
|
this.serviceInfo.b_unit_price = '' |
|
|
|
this.serviceInfo.b_unit_num = '' |
|
|
|
}, |
|
|
|
savePrice(){ |
|
|
|
savePrice() { |
|
|
|
const that = this |
|
|
|
this.$http('POST', "/agentnew/ajax_set_service_price", { |
|
|
|
uid: that.uid, |
|
|
@ -412,13 +441,13 @@ export default { |
|
|
|
unit_price: that.serviceInfo.price, |
|
|
|
b_unit_num: that.serviceInfo.base_unit_num, |
|
|
|
b_unit_price: that.serviceInfo.base_unit_price, |
|
|
|
},{ |
|
|
|
headers:{ |
|
|
|
}, { |
|
|
|
headers: { |
|
|
|
'Auth': this.token |
|
|
|
} |
|
|
|
}).then(response => { |
|
|
|
if(response.status){ |
|
|
|
if(that.serviceInfo.status === false){ |
|
|
|
if (response.status) { |
|
|
|
if (that.serviceInfo.status === false) { |
|
|
|
that.serviceInfo.status = true |
|
|
|
that.setMenuList(that.type, true) |
|
|
|
} |
|
|
@ -430,13 +459,13 @@ export default { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
}, |
|
|
|
resetShopPrice(){ |
|
|
|
resetShopPrice() { |
|
|
|
this.serviceInfo.unit_piece = '' |
|
|
|
this.serviceInfo.unit_num = '' |
|
|
|
this.serviceInfo.b_unit_piece = '' |
|
|
|
this.serviceInfo.b_unit_num = '' |
|
|
|
}, |
|
|
|
saveShopPrice(){ |
|
|
|
saveShopPrice() { |
|
|
|
const that = this |
|
|
|
this.$http('POST', "/agentnew/ajax_set_service_price", { |
|
|
|
uid: that.uid, |
|
|
@ -445,13 +474,13 @@ export default { |
|
|
|
unit_piece: that.serviceInfo.unit_piece, |
|
|
|
b_unit_num: that.serviceInfo.base_unit_num, |
|
|
|
b_unit_piece: that.serviceInfo.base_unit_piece, |
|
|
|
},{ |
|
|
|
headers:{ |
|
|
|
}, { |
|
|
|
headers: { |
|
|
|
'Auth': this.token |
|
|
|
} |
|
|
|
}).then(response => { |
|
|
|
if(response.status){ |
|
|
|
if(that.serviceInfo.status === false){ |
|
|
|
if (response.status) { |
|
|
|
if (that.serviceInfo.status === false) { |
|
|
|
that.serviceInfo.status = true |
|
|
|
that.setMenuList(that.type, true) |
|
|
|
} |
|
|
@ -463,32 +492,32 @@ export default { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
}, |
|
|
|
setMenuList(type, status){ |
|
|
|
setMenuList(type, status) { |
|
|
|
Object.values(this.menuList).forEach((item) => { |
|
|
|
let ver_select = false |
|
|
|
item.list.forEach((item1) => { |
|
|
|
if(item1.type === type) item1.is_select = status |
|
|
|
if(item1.is_select === true) ver_select = true |
|
|
|
if (item1.type === type) item1.is_select = status |
|
|
|
if (item1.is_select === true) ver_select = true |
|
|
|
}) |
|
|
|
|
|
|
|
if(ver_select) item.is_select = true |
|
|
|
if (ver_select) item.is_select = true |
|
|
|
}) |
|
|
|
store.commit('SET_SECOND_MENU', this.menuList); |
|
|
|
}, |
|
|
|
//------绑定相关 start------ |
|
|
|
bindGoods(){ |
|
|
|
bindGoods() { |
|
|
|
this.showBind = true |
|
|
|
}, |
|
|
|
handleBind(bindRes){ |
|
|
|
handleBind(bindRes) { |
|
|
|
this.showBind = false |
|
|
|
if(bindRes) this.getServiceBindGoods() |
|
|
|
if (bindRes) this.getServiceBindGoods() |
|
|
|
}, |
|
|
|
loadPddSDK(){ |
|
|
|
loadPddSDK() { |
|
|
|
const script = document.createElement('script'); |
|
|
|
script.src = 'https://pfile.pddpic.com/galerie-go/open_sdk/pc.202102201613.js'; |
|
|
|
document.head.appendChild(script); |
|
|
|
}, |
|
|
|
async getPddPageCode(uid){ |
|
|
|
async getPddPageCode(uid) { |
|
|
|
const that = this |
|
|
|
return await that.$http('POST', '/agentnew/ajax_get_pdd_page_code', { |
|
|
|
uid: uid, |
|
|
@ -506,7 +535,7 @@ export default { |
|
|
|
if (typeof window.PDD_OPEN_init === 'function') { |
|
|
|
this.pageCode = await this.getPddPageCode(uid) |
|
|
|
|
|
|
|
await window.PDD_OPEN_init({code: this.pageCode}) |
|
|
|
await window.PDD_OPEN_init({ code: this.pageCode }) |
|
|
|
this.pati = await window.PDD_OPEN_getPati() |
|
|
|
} else { |
|
|
|
console.error('PDD_OPEN_init 不存在,SDK 未正确加载'); |
|
|
@ -517,10 +546,10 @@ export default { |
|
|
|
this.delRow.index = index |
|
|
|
this.delRow.row = row |
|
|
|
}, |
|
|
|
handleDelBindCancel(){ |
|
|
|
handleDelBindCancel() { |
|
|
|
this.dialogDelBindConfim = false |
|
|
|
}, |
|
|
|
handleDelBindConfirm(){ |
|
|
|
handleDelBindConfirm() { |
|
|
|
const that = this |
|
|
|
this.dialogDelBindConfim = false |
|
|
|
this.$http('POST', '/agentnew/ajax_del_bind_service_goods', { |
|
|
@ -529,12 +558,12 @@ export default { |
|
|
|
numiid: that.delRow.row.num_iid, |
|
|
|
skuid: that.delRow.row.sku_id, |
|
|
|
paytype: that.delRow.row.pay_type, |
|
|
|
},{ |
|
|
|
headers:{ |
|
|
|
}, { |
|
|
|
headers: { |
|
|
|
'Auth': this.token |
|
|
|
} |
|
|
|
}).then(response => { |
|
|
|
if(response.status){ |
|
|
|
if (response.status) { |
|
|
|
that.$message.success('删除成功'); |
|
|
|
this.$nextTick(() => { |
|
|
|
that.bindList.splice(that.delRow.index, 1); |
|
|
@ -546,18 +575,18 @@ export default { |
|
|
|
console.error(error, 'error') |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleDefaultConfirm(id){ |
|
|
|
handleDefaultConfirm(id) { |
|
|
|
const that = this |
|
|
|
this.$http('POST', '/agentnew/ajax_default_bind_setting', { |
|
|
|
uid: that.uid, |
|
|
|
type: that.type, |
|
|
|
id: id, |
|
|
|
},{ |
|
|
|
headers:{ |
|
|
|
}, { |
|
|
|
headers: { |
|
|
|
'Auth': this.token |
|
|
|
} |
|
|
|
}).then(response => { |
|
|
|
if(response.status){ |
|
|
|
if (response.status) { |
|
|
|
that.$message.success('设置成功'); |
|
|
|
that.bindList.forEach((item) => { |
|
|
|
item.is_default = '0' |
|
|
@ -571,53 +600,69 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
//------绑定相关 end------ |
|
|
|
jumpStep(){ |
|
|
|
jumpStep() { |
|
|
|
this.$router.push(this.siteAddUrl + '?uid=' + this.uid) |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
|
|
.pb80{ |
|
|
|
.serviceAdd-wrap{ |
|
|
|
height: 100%; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
.overFlow-wrap{ |
|
|
|
flex: 1; |
|
|
|
overflow-y: auto; |
|
|
|
} |
|
|
|
} |
|
|
|
.pb80 { |
|
|
|
padding-bottom: 80px; |
|
|
|
} |
|
|
|
.ml12{ |
|
|
|
|
|
|
|
.ml12 { |
|
|
|
margin-left: 12px; |
|
|
|
} |
|
|
|
|
|
|
|
.mr12{ |
|
|
|
.mr12 { |
|
|
|
margin-right: 12px; |
|
|
|
} |
|
|
|
|
|
|
|
.mb10{ |
|
|
|
.mb10 { |
|
|
|
margin-bottom: 10px; |
|
|
|
} |
|
|
|
|
|
|
|
.w85{ |
|
|
|
.w85 { |
|
|
|
width: 85px; |
|
|
|
} |
|
|
|
|
|
|
|
.add-info{ |
|
|
|
.alert-more{ |
|
|
|
.add-info { |
|
|
|
.alert-more { |
|
|
|
color: #006AFF; |
|
|
|
letter-spacing: 0.08em; |
|
|
|
cursor:pointer; |
|
|
|
user-select: none; /* 标准语法 */ |
|
|
|
-webkit-user-select: none; /* Safari */ |
|
|
|
-moz-user-select: none; /* Firefox */ |
|
|
|
-ms-user-select: none; /* IE/Edge */ |
|
|
|
} |
|
|
|
.alert-more-hide{ |
|
|
|
img{ |
|
|
|
cursor: pointer; |
|
|
|
user-select: none; |
|
|
|
/* 标准语法 */ |
|
|
|
-webkit-user-select: none; |
|
|
|
/* Safari */ |
|
|
|
-moz-user-select: none; |
|
|
|
/* Firefox */ |
|
|
|
-ms-user-select: none; |
|
|
|
/* IE/Edge */ |
|
|
|
} |
|
|
|
|
|
|
|
.alert-more-hide { |
|
|
|
img { |
|
|
|
transform: rotate(180deg); |
|
|
|
} |
|
|
|
} |
|
|
|
.alert-more-info{ |
|
|
|
|
|
|
|
.alert-more-info { |
|
|
|
color: #1E2226; |
|
|
|
letter-spacing: 0.08em; |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .prompt-desc{ |
|
|
|
::v-deep .prompt-desc { |
|
|
|
font-size: 14px; |
|
|
|
font-weight: bold; |
|
|
|
color: #1E2226; |
|
|
@ -625,18 +670,18 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.service-title{ |
|
|
|
.service-title { |
|
|
|
margin: 20px 0; |
|
|
|
letter-spacing: 0.08em; |
|
|
|
|
|
|
|
.service-name{ |
|
|
|
.service-name { |
|
|
|
font-size: 16px; |
|
|
|
font-weight: bold; |
|
|
|
color: #1E2226; |
|
|
|
} |
|
|
|
|
|
|
|
.service-status { |
|
|
|
.service-status-desc{ |
|
|
|
.service-status-desc { |
|
|
|
border-radius: 4px; |
|
|
|
border: 1px solid rgba(0, 194, 97, 0.6); |
|
|
|
color: #0DAF49; |
|
|
@ -647,7 +692,8 @@ export default { |
|
|
|
background-size: 16px 16px; |
|
|
|
margin-right: 12px; |
|
|
|
} |
|
|
|
.service-status-close{ |
|
|
|
|
|
|
|
.service-status-close { |
|
|
|
cursor: pointer; |
|
|
|
color: #8A9099; |
|
|
|
background-image: url(@/assets/site/form_close.svg); |
|
|
@ -659,37 +705,41 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.price-set{ |
|
|
|
.price-set { |
|
|
|
letter-spacing: 0.08em; |
|
|
|
.price-top{ |
|
|
|
|
|
|
|
.price-top { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
margin-bottom: 16px; |
|
|
|
.title{ |
|
|
|
|
|
|
|
.title { |
|
|
|
font-size: 14px; |
|
|
|
font-weight: bold; |
|
|
|
color: #1E2226; |
|
|
|
} |
|
|
|
.desc{ |
|
|
|
|
|
|
|
.desc { |
|
|
|
font-size: 14px; |
|
|
|
color: #626573; |
|
|
|
margin-left: 12px; |
|
|
|
} |
|
|
|
} |
|
|
|
.el-form-item{ |
|
|
|
|
|
|
|
.el-form-item { |
|
|
|
margin-bottom: 0; |
|
|
|
} |
|
|
|
|
|
|
|
.third-width{ |
|
|
|
.third-width { |
|
|
|
width: calc((100% - 109px) / 2); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.service-opt{ |
|
|
|
.service-opt { |
|
|
|
justify-content: right; |
|
|
|
} |
|
|
|
|
|
|
|
.bind-button{ |
|
|
|
.bind-button { |
|
|
|
padding: 15px 20px; |
|
|
|
border-radius: 4px; |
|
|
|
border: 1px dashed #BABDC2; |
|
|
@ -697,7 +747,7 @@ export default { |
|
|
|
align-items: center; |
|
|
|
} |
|
|
|
|
|
|
|
.bind-list{ |
|
|
|
.bind-list { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
justify-content: space-between; |
|
|
@ -706,7 +756,7 @@ export default { |
|
|
|
flex-wrap: wrap; |
|
|
|
margin-top: 32px; |
|
|
|
|
|
|
|
.bind-item{ |
|
|
|
.bind-item { |
|
|
|
display: flex; |
|
|
|
gap: 22px; |
|
|
|
justify-content: space-between; |
|
|
@ -717,35 +767,37 @@ export default { |
|
|
|
padding: 16px; |
|
|
|
color: #626573; |
|
|
|
|
|
|
|
img{ |
|
|
|
img { |
|
|
|
width: 80px; |
|
|
|
height: 80px; |
|
|
|
border-radius: 4px; |
|
|
|
} |
|
|
|
|
|
|
|
.bind-goods-info{ |
|
|
|
.bind-goods-info { |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
justify-content: space-between; |
|
|
|
width: calc(100% - 80px); |
|
|
|
|
|
|
|
.bind-goods-title{ |
|
|
|
.bind-goods-title { |
|
|
|
text-align: left; |
|
|
|
a{ |
|
|
|
|
|
|
|
a { |
|
|
|
color: #1E2226; |
|
|
|
} |
|
|
|
a:hover{ |
|
|
|
|
|
|
|
a:hover { |
|
|
|
color: #006AFF; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
span{ |
|
|
|
span { |
|
|
|
white-space: nowrap; |
|
|
|
overflow: hidden; |
|
|
|
text-overflow: ellipsis; |
|
|
|
} |
|
|
|
|
|
|
|
.bind-btn{ |
|
|
|
.bind-btn { |
|
|
|
cursor: pointer; |
|
|
|
background-repeat: no-repeat; |
|
|
|
background-position: 0 50%; |
|
|
@ -753,17 +805,17 @@ export default { |
|
|
|
padding: 2px 0 2px 22px; |
|
|
|
} |
|
|
|
|
|
|
|
.bind-delete{ |
|
|
|
.bind-delete { |
|
|
|
color: #626573; |
|
|
|
background-image: url(@/assets/site/delete.svg); |
|
|
|
} |
|
|
|
|
|
|
|
.bind-default{ |
|
|
|
.bind-default { |
|
|
|
color: #626573; |
|
|
|
background-image: url(@/assets/site/star-icon.svg); |
|
|
|
} |
|
|
|
|
|
|
|
.bind-default-active{ |
|
|
|
.bind-default-active { |
|
|
|
color: #006AFF; |
|
|
|
background-image: url(@/assets/site/star-active-icon.svg); |
|
|
|
} |
|
|
@ -773,9 +825,9 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
.register-btns { |
|
|
|
position: fixed; |
|
|
|
left: 0; |
|
|
|
bottom: 0; |
|
|
|
// position: absolute; |
|
|
|
// left: 0; |
|
|
|
// bottom: 0; |
|
|
|
width: 100%; |
|
|
|
display: flex; |
|
|
|
flex-direction: row; |
|
|
@ -785,6 +837,7 @@ export default { |
|
|
|
/* 蓝色阴影_常规 */ |
|
|
|
box-shadow: 0px 4px 16px 0px rgba(17, 55, 143, 0.12); |
|
|
|
z-index: 999; |
|
|
|
|
|
|
|
button:nth-child(1) { |
|
|
|
margin-right: 56px; |
|
|
|
} |
|
|
|