-
-
售价管理
-
供货价格:3.5元/篇
+
+
+
-
-
+
+
+
+
+
起售价格(选填)
+
超过设定字符,按照正常售价收取
+
+
+
+
+
+
+ 用户需支付
+
+
+
+
+
+
+
+
+
+ 重置
+ 保存
+
+
+
+
+
+
+
+
+ {{ serviceAddInfo.shop_name }}支付管理
+
+
+
+
+
+
+
+
+
起售价格(选填)
+
超过设定字符,按照正常售价收取
+
+
+
+
+
+
+ 用户需支付
+
+
+
+
+
+
+
+
+
+ 重置
+ 保存
-
@@ -43,6 +197,9 @@
import GuipButton from "@/components/GuipButton.vue";
import GuipInput from "@/components/GuipInput.vue";
import GuipSelect from "@/components/GuipSelect.vue";
+import bindGoods from "@/components/bindGoods.vue";
+import GuipDialog from "@/components/GuipDialog.vue";
+import PromptText from "@/components/PromptText.vue";
export default {
name: 'priceSet',
@@ -55,92 +212,241 @@ export default {
components: {
GuipSelect,
GuipInput,
- GuipButton
+ GuipButton,
+ PromptText,
+ bindGoods,
+ GuipDialog
},
data(){
return {
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTI2NDY1NDUsIm5iZiI6MTc1MjY0NjU0NSwiZXhwIjoxNzU1MjM4NTQ1LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.G-Is-x9qPMiV_urOlDPQVRjfAIozySxL5EK2k82d46k',
info:{},
- //添加按钮样式
- saveBtnStyleObj: {
- width: '144px',
- height: '46px',
- borderRadius: '4px',
- background: '#006AFF',
- },
- options: [{
- value: '选项1',
- label1: '黄金hhhhhh',
- id1: '1',
- id2: '啊11哈哈',
- label: '黄金糕'
- }, {
- value: '选项2',
- id1: '12',
- id2: '啊22哈哈',
- label1: '双皮奶hhhhhhhhh',
- label: '双皮奶'
- }, {
- value: '选项3',
- id1: '13',
- id2: '啊33哈哈',
- label1: '蚵仔煎hhhhhhhhh',
- label: '蚵仔煎'
- }, {
- value: '选项4',
- id1: '14',
- id2: '啊444哈哈',
- label1: '双皮奶hhhhhhhhh',
- label: '龙须面'
- }, {
- value: '选项5',
- id1: '155',
- id2: '啊55哈哈',
- label1: '双皮奶hhhhhhhhh',
- label: '北京烤鸭'
- }],
- form: {
- username: '',
- language: '',
- domain_set: '',
- domainSuffix: '11',
- domainSuffix1: '.chachongz.com',
- card: '1',
- input1: '跨年的烟火,绽放天空',
- input2: '',
- input3: '',
- },
+ uid: 0,
+ type: 0,
+ serviceAddInfo:{},
+ service_unit:'',
+ bindList: [],
+ showBind: false,
+ pati: '',
+ pageCode: '',
+ dialogDelBindConfim: false,
}
},
mounted() {
this.info = JSON.parse(JSON.stringify(this.serviceInfo))
+ if(Object.keys(this.info).length>0){
+ this.uid = this.info.uid
+ this.type = this.info.type
+ this.getServiceAddInfo()
+ this.getServiceBindGoods()
+ }
},
methods:{
- saveConfirm() {
- let obj = {}
- obj.uid = this.info.uid
- obj.type = this.info.type
- obj.logo_bgcolor = this.tabColor.replace('#','')
- obj.link_btn_color = this.themeColor.replace('#','')
- obj.selected_nav_bgcolor = this.navColor.replace('#','')
-
+ //获得要添加的服务信息
+ getServiceAddInfo() {
+ const that = this
+ that.$http('POST', '/agentnew/ajax_get_service_add_info', {
+ uid: that.uid,
+ type: that.type,
+ }, {
+ headers: {
+ 'Auth': this.token
+ }
+ }).then(response => {
+ if (response.status) {
+ that.$nextTick(() => {
+ that.serviceAddInfo = response.data
+ that.service_unit = that.serviceAddInfo.unit
+ //拼多多渠道查询商品所需参数初始化
+ if (that.serviceAddInfo.shop_name === '拼多多') this.initPddParam(that.uid)
+ })
+ return true
+ }
+ that.$message.error(response.info);
+ }).catch(error => {
+ console.error(error, 'error')
+ })
+ },
+ //查询绑定的宝贝
+ getServiceBindGoods() {
const that = this
- this.$http('POST', '/agentnew/ajax_update_service_style', obj,{
- headers:{
+ that.$http('POST', '/agentnew/ajax_get_service_bind_goods', {
+ uid: that.uid,
+ type: that.type,
+ }, {
+ headers: {
'Auth': this.token
}
}).then(response => {
- if(response.status){
+ if (response.status && response.data) {
+ that.$nextTick(() => {
+ that.bindList = response.data
+ })
+ }
+ }).catch(error => {
+ console.error(error, 'error')
+ })
+ },
+ handleUnitName(){
+ this.serviceAddInfo.unit_name = this.serviceAddInfo.set_units[this.service_unit]
+ },
+ resetPrice() {
+ this.info.price = ''
+ this.info.unit_num = ''
+ this.info.b_unit_price = ''
+ this.info.b_unit_num = ''
+ },
+ savePrice() {
+ const that = this
+ //非字符计费
+ if(that.service_unit !== '0') {
+ that.info.unit_num = 1
+ that.info.base_unit_num = ''
+ that.info.base_unit_price = ''
+ }
+ this.$http('POST', "/agentnew/ajax_set_service_price", {
+ uid: that.uid,
+ type: that.type,
+ unit: that.service_unit,
+ unit_num: that.info.unit_num,
+ unit_price: that.info.price,
+ b_unit_num: that.info.base_unit_num,
+ b_unit_price: that.info.base_unit_price,
+ }, {
+ headers: {
+ 'Auth': this.token
+ }
+ }).then(response => {
+ if (response.status) {
that.$message.success('保存成功');
+ return true;
+ }
+ that.$message.error(response.info);
+ }).catch(error => {
+ console.error(error, 'error')
+ })
+ },
+ resetShopPrice() {
+ this.info.unit_piece = ''
+ this.info.unit_num = ''
+ this.info.b_unit_piece = ''
+ this.info.b_unit_num = ''
+ },
+ saveShopPrice() {
+ const that = this
+ //非字符计费 单位默认为 1
+ //非字符计费
+ if(that.service_unit !== '0') {
+ that.info.unit_num = 1
+ that.info.base_unit_num = ''
+ that.info.base_unit_piece = ''
+ }
+ this.$http('POST', "/agentnew/ajax_set_service_price", {
+ uid: that.uid,
+ type: that.type,
+ unit: that.service_unit,
+ unit_num: that.info.unit_num,
+ unit_piece: that.info.unit_piece,
+ b_unit_num: that.info.base_unit_num,
+ b_unit_piece: that.info.base_unit_piece,
+ }, {
+ headers: {
+ 'Auth': this.token
+ }
+ }).then(response => {
+ if (response.status) {
+ that.$message.success('保存成功');
+ return true;
+ }
+ that.$message.error(response.info);
+ }).catch(error => {
+ console.error(error, 'error')
+ })
+ },
+ //------绑定相关 start------
+ bindGoods() {
+ this.showBind = true
+ },
+ handleBind(bindRes) {
+ this.showBind = false
+ if (bindRes) this.getServiceBindGoods()
+ },
+ async getPddPageCode(uid) {
+ const that = this
+ return await that.$http('POST', '/agentnew/ajax_get_pdd_page_code', {
+ uid: uid,
+ }, {
+ headers: {
+ 'Auth': this.token
+ }
+ }).then(response => {
+ return response.data
+ }).catch(error => {
+ console.error(error, 'error')
+ })
+ },
+ async initPddParam(uid) {
+ if (typeof window.PDD_OPEN_init === 'function') {
+ this.pageCode = await this.getPddPageCode(uid)
- let color_info = {}
- color_info.logo_bgcolor = obj.logo_bgcolor
- color_info.link_btn_color = obj.link_btn_color
- color_info.selected_nav_bgcolor = obj.selected_nav_bgcolor
- that.info.color_info = color_info
-
- that.$emit('saveEvent', that.info)
+ await window.PDD_OPEN_init({ code: this.pageCode })
+ this.pati = await window.PDD_OPEN_getPati()
+ } else {
+ console.error('PDD_OPEN_init 不存在,SDK 未正确加载');
+ }
+ },
+ handleDelBindClick(row, index) {
+ this.dialogDelBindConfim = true
+ this.delRow.index = index
+ this.delRow.row = row
+ },
+ handleDelBindCancel() {
+ this.dialogDelBindConfim = false
+ },
+ handleDelBindConfirm() {
+ const that = this
+ this.dialogDelBindConfim = false
+ this.$http('POST', '/agentnew/ajax_del_bind_service_goods', {
+ uid: that.uid,
+ type: that.type,
+ numiid: that.delRow.row.num_iid,
+ skuid: that.delRow.row.sku_id,
+ paytype: that.delRow.row.pay_type,
+ }, {
+ headers: {
+ 'Auth': this.token
+ }
+ }).then(response => {
+ if (response.status) {
+ that.$message.success('删除成功');
+ this.$nextTick(() => {
+ that.bindList.splice(that.delRow.index, 1);
+ })
+ return true;
+ }
+ that.$message.error(response.info);
+ }).catch(error => {
+ console.error(error, 'error')
+ })
+ },
+ handleDefaultConfirm(id) {
+ const that = this
+ this.$http('POST', '/agentnew/ajax_default_bind_setting', {
+ uid: that.uid,
+ type: that.type,
+ id: id,
+ }, {
+ headers: {
+ 'Auth': this.token
+ }
+ }).then(response => {
+ if (response.status) {
+ that.$message.success('设置成功');
+ that.bindList.forEach((item) => {
+ item.is_default = '0'
+ if (item.id === id) item.is_default = '1'
+ });
return true;
}
that.$message.error(response.info);
@@ -148,27 +454,126 @@ export default {
console.error(error, 'error')
})
},
+ //------绑定相关 end------
}
}
\ No newline at end of file
diff --git a/src/components/site/serviceSetting/reportSeoSet.vue b/src/components/site/serviceSetting/reportSeoSet.vue
index 5a3db23..0c74482 100644
--- a/src/components/site/serviceSetting/reportSeoSet.vue
+++ b/src/components/site/serviceSetting/reportSeoSet.vue
@@ -11,7 +11,7 @@
-
diff --git a/src/components/site/serviceSetting/showSet.vue b/src/components/site/serviceSetting/showSet.vue
index 1bbc807..be7f320 100644
--- a/src/components/site/serviceSetting/showSet.vue
+++ b/src/components/site/serviceSetting/showSet.vue
@@ -14,12 +14,12 @@
-
-
diff --git a/src/components/site/serviceSetting/submitSeoSet.vue b/src/components/site/serviceSetting/submitSeoSet.vue
index 74b8892..8ef984f 100644
--- a/src/components/site/serviceSetting/submitSeoSet.vue
+++ b/src/components/site/serviceSetting/submitSeoSet.vue
@@ -11,7 +11,7 @@
-
diff --git a/src/router/index.js b/src/router/index.js
index 17221f1..8fdeb75 100755
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -52,6 +52,16 @@ const routes = [{
}
},
{
+ path: '/agent/supplyList',
+ name: '首页',
+ component: () => import( /* webpackChunkName: "register" */ '../views/agent/supplyList.vue'),
+ isFirst: true, //是否属于一级路由
+ meta: {
+ title: '首页', //面包屑名称(此页面确认不需要放置在面包屑可以不添加此属性;如果获取不到title 会自动 获取 name 作为面包屑名称)
+ hideBreadcrumb: true // 是否隐藏面包屑
+ }
+ },
+ {
path: '/register',
name: 'register',
// this generates a separate chunk (about.[hash].js) for this route
diff --git a/src/views/agent/home.vue b/src/views/agent/home.vue
index b550874..c11b84d 100644
--- a/src/views/agent/home.vue
+++ b/src/views/agent/home.vue
@@ -8,11 +8,11 @@
查看更多
-
-
![]()
+
+
-
{{ item.label }}
-
{{ item.desc }}
+
{{ item.title }}
+
{{ item.content }}
@@ -57,18 +57,19 @@
供货价格
-
+
-
![]()
-
{{ classification_name }}
+
![]()
+
{{ classifyId2Name[classify_id] }}
详情
-
-
{{ veritem.name }}
-
+
+
{{ ver2info[verid].name }}
+
+
{{ type2name[type] }}
{{ supplyPriceList[type].price }}元 / {{ supplyPriceList[type].unit_format }}
@@ -129,11 +130,11 @@
联系客服
@@ -158,8 +159,10 @@ export default {
// 表格加载
tableLoading: true,
type2name:[],
- serviceClassifications: [],
- serviceClassificationServices: [],
+ classifyId2Name: [],
+ classifyId2Vers: [],
+ ver2types: [],
+ ver2info: [],
supplyPriceList: [],
serviceList: [],
@@ -168,6 +171,7 @@ export default {
expireServices: [],
walletList: [],
+ noticeList: [],
isShowSpec: false,
@@ -215,6 +219,7 @@ export default {
this.getSaleStats()
this.getExpireServices()
this.getWalletList()
+ this.getNoticeList()
},
methods: {
getSupplyServiceList() {
@@ -231,9 +236,11 @@ export default {
this.tableLoading = false
this.$nextTick(() => {
that.serviceList = response.data.list
+ this.classifyId2Name = response.data.classifyid2name;
+ this.classifyId2Vers = response.data.classifyid2vers;
+ this.ver2types = response.data.ver2types;
+ this.ver2info = response.data.ver2info;
this.type2name = response.data.type2name;
- this.serviceClassifications = response.data.service_classification;
- this.serviceClassificationServices = response.data.service_classification_services;
this.supplyPriceList = response.data.supply_price;
})
}).catch(error => {
@@ -285,6 +292,21 @@ export default {
console.error(error, 'error')
})
},
+ getNoticeList(){
+ this.$http('POST', '/agentnew/ajax_get_notice_list', {
+
+ },{
+ headers:{
+ 'Auth': this.token
+ }
+ }).then(response => {
+ this.$nextTick(() => {
+ this.noticeList = response.data
+ })
+ }).catch(error => {
+ console.error(error, 'error')
+ })
+ },
lookTaoBaoExpire() {
// 查看淘宝账号
location.href = '/agent/payList'
@@ -331,6 +353,10 @@ a {
}
+.faq {
+ color: #8A9099;
+}
+
.home-wrap {
padding: 12px;
@@ -508,8 +534,12 @@ a {
}
}
- .item-list {
+ .mt-16 {
margin-top: 16px;
+ }
+
+ .item-list {
+ // margin-top: 16px;
text-align: left;
line-height: 18px;
diff --git a/src/views/agent/siteBaseSetting.vue b/src/views/agent/siteBaseSetting.vue
index b7cde36..be9e2d6 100644
--- a/src/views/agent/siteBaseSetting.vue
+++ b/src/views/agent/siteBaseSetting.vue
@@ -73,18 +73,21 @@
+
-
+
{{ selectWxpay.short_name }} {{ selectWxpay.account }}
- 请选择
+ 暂无收款账号,稍后配置
+ 未绑定微信收款
+
@@ -111,28 +114,6 @@
-
-
-
- {{ selectWxpay.short_name }} {{ selectWxpay.account }}
- 请选择
-
-
-
-
-
绑定新微信收款
-
需要使用您公司的微信支付
-
需在微信商户平台-产品中心开通Native支付
-
-
- 前往绑定
-
-
-
-
@@ -140,12 +121,12 @@
-
+
{{ selectAlipay.short_name }} {{ selectAlipay.account }}
- 请选择
+ 暂无收款账号,稍后配置
+ 未绑定支付宝收款
@@ -172,38 +153,22 @@
-
-
- {{ selectAlipay.short_name }} {{ selectAlipay.account }}
- 请选择
-
-
-
-
-
绑定新支付宝收款
-
需要使用您公司的支付宝支付
-
需在支付宝商户平台-产品中心开通Native支付
-
-
- 前往绑定
-
-
-
-
+
+
-
+ :options_null="!jdList.length"
+ @change="changeSelectJindong" >
{{ selectJd.short_name }} {{ selectJd.account }}
- 请选择
+ 暂无收款账号,稍后配置
+ 未绑定京东店铺
@@ -230,42 +195,25 @@
-
-
-
- {{ selectJd.short_name }} {{ selectJd.account }}
- 请选择
-
-
-
-
-
绑定新京东店铺
-
如未购买"快乐论文检测服务"服务或已过期,会跳转到购买服务页面。
-
-
- 前往绑定
-
-
-
-
+
+
-
+ :options_null="!taobaoList.length"
+ @change="changeSelectTaobao" >
{{ selectTaobao.short_name }} {{ selectTaobao.account }}
- 请选择
+ 暂无收款账号,稍后配置
+ 未绑定店铺
@@ -292,39 +240,22 @@
-
-
-
- {{ selectTaobao.short_name }} {{ selectTaobao.account }}
- 请选择
-
-
-
-
-
绑定新淘宝/天猫店铺
-
如未购买"快乐帮手"服务或已过期,会跳转到购买服务页面
-
-
- 前往绑定
-
-
-
-
+
+
-
+ :options_null="!pddList.length"
+ @change="changeSelectPdd" >
{{ selectPdd.short_name }} {{ selectPdd.account }}
- 请选择
+ 暂无收款账号,稍后配置
+ 未绑定拼多多店铺
@@ -351,27 +282,6 @@
-
-
-
- {{ selectPdd.short_name }} {{ selectPdd.account }}
- 请选择
-
-
-
-
-
绑定新拼多多店铺
-
如未购买"快乐帮手"服务或已过期,会跳转到购买服务页面。
-
-
- 前往绑定
-
-
-
-
@@ -478,9 +388,6 @@ export default {
domainTypes: [],
domainPrefix: '',
siteDomain: '',
-
- options_weixin_null: {},
- select_placeholder_weixin: '暂无收款账号,稍后配置',
}
},
computed: {
@@ -688,63 +595,52 @@ export default {
cancleUpdateSiteInfo() {
this.getSiteInfo();
},
- changeNormalWeixin() {
-
- },
- changeSelectWeixin(item, flag) {
- if (flag) {
- this.select_placeholder_weixin = this.options_weixin_null.desc;
- return
+ changeSelectWeixin(item) {
+ console.log(item, 'item')
+ if(this.bindWxpayId === item.payid){
+ this.bindWxpayId = 0
+ this.selectWxpay = null
+ return true
}
+
this.bindWxpayId = item.payid;
this.selectWxpay = item;
- console.log(this.bindWxpayId, 'bindWxpayId');
- console.log(this.selectWxpay, 'selectWxpay');
-
- this.selectedItem = { ...item };
- console.log(this.selectedItem, 'this.selectedItem====');
},
- changeSelectAlipay(item, flag) {
- if (flag) {
- this.select_placeholder_weixin = this.options_weixin_null.desc;
- return
+ changeSelectAlipay(item) {
+ if(this.bindAlipayId === item.payid){
+ this.bindAlipayId = 0
+ this.selectAlipay = null
+ return true
}
this.bindAlipayId = item.payid;
this.selectAlipay = item;
- console.log(this.bindWxpayId, 'bindWxpayId');
-
- this.selectedItem = { ...item };
- console.log(this.selectedItem, 'this.selectedItem====');
},
- changeSelectTaobao(item, flag) {
- if (flag) {
- this.select_placeholder_weixin = this.options_weixin_null.desc;
- return
+ changeSelectTaobao(item) {
+ if(this.bindTaobaoId === item.payid){
+ this.bindTaobaoId = 0
+ this.selectTaobao = null
+ return true
}
this.bindTaobaoId = item.payid;
this.selectTaobao = item;
-
- this.selectedItem = { ...item };
},
- changeSelectJindong(item, flag) {
- if (flag) {
- this.select_placeholder_weixin = this.options_weixin_null.desc;
- return
+ changeSelectJindong(item) {
+ if(this.bindJdId === item.payid){
+ this.bindJdId = 0
+ this.selectJd = null
+ return true
}
this.bindJdId = item.payid;
this.selectJd = item;
-
- this.selectedItem = { ...item };
},
- changeSelectPdd(item, flag) {
- if (flag) {
- this.select_placeholder_weixin = this.options_weixin_null.desc;
- return
+ changeSelectPdd(item) {
+ if(this.bindPddId === item.payid){
+ this.bindPddId = 0
+ this.selectPdd = null
+ return true
}
this.bindPddId = item.payid;
this.selectPdd = item;
-
- this.selectedItem = { ...item };
},
// 销售渠道
domainTypeChange(type) {
diff --git a/src/views/agent/siteServiceAdd.vue b/src/views/agent/siteServiceAdd.vue
index a433fb9..b8f167f 100644
--- a/src/views/agent/siteServiceAdd.vue
+++ b/src/views/agent/siteServiceAdd.vue
@@ -1,7 +1,7 @@
-
+
收起
@@ -19,17 +19,27 @@
-
+
-

+
{{ serviceAddInfo.ver_name }}_{{ serviceAddInfo.type_name }}
-
+
+
+
+
+
+
@@ -39,45 +49,33 @@
v-if="serviceAddInfo.supply_price">供货价:{{ serviceAddInfo.supply_price }}{{ serviceAddInfo.supply_price_warning }}
-
-
-
-
-
-
-
-
+
+
-
-
-
+
@@ -112,7 +110,8 @@
{{ serviceAddInfo.shop_name }}支付管理
-
+ 供货价:{{ serviceAddInfo.supply_price }}{{ serviceAddInfo.supply_price_warning }}
@@ -121,29 +120,27 @@
售价管理
-
-
+
+
-
-
-
+
@@ -174,7 +171,7 @@
-
+
关联电商商品
@@ -211,7 +208,7 @@
-
@@ -263,14 +260,16 @@ export default {
type: 0,
prodid: 0,
serviceAddInfo: {},
+ service_unit:'',
+ service_status: false,
serviceInfo: {},
bindList: [],
alertShow: true,
menuList: {},
siteAddUrl: '/agent/siteAdd',
showBind: false,
- pati: '',
- pageCode: '',
+ pdd_pati: '',
+ pdd_pagecode: '',
dialogDelBindConfim: false,
delRow: {},
dialogDelServiceConfim: false,
@@ -324,6 +323,7 @@ export default {
},
//获得要添加的服务信息
getServiceAddInfo() {
+ this.serviceAddInfo = {}
const that = this
that.$http('POST', '/agentnew/ajax_get_service_add_info', {
uid: that.uid,
@@ -336,6 +336,7 @@ export default {
if (response.status) {
that.$nextTick(() => {
that.serviceAddInfo = response.data
+ that.service_unit = that.serviceAddInfo.unit
//拼多多渠道查询商品所需参数初始化
if (that.serviceAddInfo.shop_name === '拼多多') this.initPddParam(that.uid)
//查询是否添加了此服务
@@ -363,21 +364,15 @@ export default {
}
}).then(response => {
that.$nextTick(() => {
- //设置默认计费方式
- that.serviceInfo.unit = that.serviceAddInfo.unit
//默认未开启
- that.serviceInfo.status = false
- })
- if (response.status && response.data) {
- that.$nextTick(() => {
+ if (response.status && response.data) {
that.serviceInfo = response.data.service_info
- that.serviceInfo.status = true
+ that.service_status = true
+
+ that.getServiceBindGoods()
+ }
+ })
- console.log(that.serviceInfo,'ccc')
- })
- that.getServiceBindGoods()
- }
- console.log(that.serviceInfo,'aaa')
}).catch(error => {
console.error(error, 'error')
})
@@ -402,6 +397,9 @@ export default {
console.error(error, 'error')
})
},
+ handleUnitName(){
+ this.serviceAddInfo.unit_name = this.serviceAddInfo.set_units[this.service_unit]
+ },
handleDelServiceClick() {
this.dialogDelServiceConfim = true
},
@@ -423,6 +421,7 @@ export default {
that.$message.success('删除成功');
this.$nextTick(() => {
that.serviceInfo = {}
+ that.service_status = false;
that.setMenuList(that.type, false)
})
return true;
@@ -440,9 +439,16 @@ export default {
},
savePrice() {
const that = this
+ //非字符计费
+ if(that.service_unit !== '0') {
+ that.serviceInfo.unit_num = 1
+ that.serviceInfo.base_unit_num = ''
+ that.serviceInfo.base_unit_price = ''
+ }
this.$http('POST', "/agentnew/ajax_set_service_price", {
uid: that.uid,
type: that.type,
+ unit: that.service_unit,
unit_num: that.serviceInfo.unit_num,
unit_price: that.serviceInfo.price,
b_unit_num: that.serviceInfo.base_unit_num,
@@ -453,8 +459,8 @@ export default {
}
}).then(response => {
if (response.status) {
- if (that.serviceInfo.status === false) {
- that.serviceInfo.status = true
+ if (that.service_status === false) {
+ that.service_status = true
that.setMenuList(that.type, true)
}
that.$message.success('保存成功');
@@ -473,9 +479,18 @@ export default {
},
saveShopPrice() {
const that = this
+ //非字符计费 单位默认为 1
+ //非字符计费
+ if(that.service_unit !== '0') {
+ that.serviceInfo.unit_num = 1
+ that.serviceInfo.base_unit_num = ''
+ that.serviceInfo.base_unit_piece = ''
+ }
+ console.log(that.serviceInfo,'ddd')
this.$http('POST', "/agentnew/ajax_set_service_price", {
uid: that.uid,
type: that.type,
+ unit: that.service_unit,
unit_num: that.serviceInfo.unit_num,
unit_piece: that.serviceInfo.unit_piece,
b_unit_num: that.serviceInfo.base_unit_num,
@@ -486,8 +501,8 @@ export default {
}
}).then(response => {
if (response.status) {
- if (that.serviceInfo.status === false) {
- that.serviceInfo.status = true
+ if (that.service_status === false) {
+ that.service_status = true
that.setMenuList(that.type, true)
}
that.$message.success('保存成功');
@@ -539,10 +554,10 @@ export default {
},
async initPddParam(uid) {
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 })
- this.pati = await window.PDD_OPEN_getPati()
+ await window.PDD_OPEN_init({ code: this.pdd_pagecode })
+ this.pdd_pati = await window.PDD_OPEN_getPati()
} else {
console.error('PDD_OPEN_init 不存在,SDK 未正确加载');
}
@@ -607,7 +622,20 @@ export default {
},
//------绑定相关 end------
jumpStep() {
- this.$router.push(this.siteAddUrl + '?uid=' + this.uid)
+ const that = this
+ this.$http('POST', '/agentnew/ajax_get_not_finished_site', {},{
+ headers:{
+ 'Auth': this.token
+ }
+ }).then(response => {
+ if(Object.keys(response.data).length>0){
+ that.$router.push('/agent/siteAdd')
+ } else {
+ that.$router.push('/agent/siteServiceList?uid=' + that.uid)
+ }
+ }).catch(error => {
+ console.error(error, 'error')
+ })
},
}
}
diff --git a/src/views/agent/siteServiceList.vue b/src/views/agent/siteServiceList.vue
index cc360eb..2e245e7 100644
--- a/src/views/agent/siteServiceList.vue
+++ b/src/views/agent/siteServiceList.vue
@@ -13,10 +13,8 @@
批量删除
-
@@ -190,6 +188,8 @@ export default {
uid:0,
//站点简称
siteShortName: "",
+ //添加按钮
+ addProd: {},
// 站点列表
serviceList: [],
//支付方式
@@ -255,10 +255,15 @@ export default {
}
}).then(response => {
this.tableLoading = false
- this.$nextTick(() => {
- that.serviceList = response.data.service_list
- store.commit('SET_BREADRIGHTTEXT', response.data.site_short_name);
- })
+ if(response.status){
+ that.$nextTick(() => {
+ that.addProd = response.data.add_proids
+ store.commit('SET_BREADRIGHTTEXT', response.data.site_short_name);
+ if(response.data.service_list){
+ that.serviceList = response.data.service_list
+ }
+ })
+ }
}).catch(error => {
console.error(error, 'error')
})
diff --git a/src/views/agent/supplyList.vue b/src/views/agent/supplyList.vue
index 25bbb3f..3fcaebf 100644
--- a/src/views/agent/supplyList.vue
+++ b/src/views/agent/supplyList.vue
@@ -3,24 +3,53 @@
-
-
+
+
+
{{ classifyId2Name[classify_id] }}
+
+
+
+
-
-
-
-
站点信息
-
-
-
+
+
+
+
![]()
+
{{ ver2info[verid].name }}
+
官方接口
+
{{ salePolicy[ver2info[verid].sale_policy] }}
+
{{ salePolicy[ver2info[verid].sale_policy] }}
+
{{ salePolicy[ver2info[verid].sale_policy] }}
+
+
{{ ver2info[verid].desc }}
+
+
+
{{ type2name[type] }}
+
+
+
+ {{ type2info[type].introduce }}
+
+
+
+
¥{{ supplyPriceList[type].price }} / {{ supplyPriceList[type].unit_format }}
-
-
+
+
+
+
+
+ {{ ver2info[verid].desc }}
+
+
+
¥{{ supplyPriceList[ver2types[verid][0]].price }} / {{ supplyPriceList[ver2types[verid][0]].unit_format }}
-
+
@@ -30,6 +59,7 @@
import store from '@/store';
import { mapState } from 'vuex';
import PromptText from '@/components/PromptText.vue';
+import GuipToolTip from '@/components/GuipToolTip.vue';
export default {
// 站点设置
@@ -37,17 +67,20 @@ export default {
props: [''],
components: {
PromptText,
+ GuipToolTip,
},
data() {
return {
// AUTH
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTI2NDY1NDUsIm5iZiI6MTc1MjY0NjU0NSwiZXhwIjoxNzU1MjM4NTQ1LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.G-Is-x9qPMiV_urOlDPQVRjfAIozySxL5EK2k82d46k',
- // 表格加载
- tableLoading: true,
type2name:[],
- serviceClassifications: [],
- serviceClassificationServices: [],
+ classifyId2Name: [],
+ classifyId2Vers: [],
+ ver2types: [],
+ ver2info: [],
+ type2info: [],
supplyPriceList: [],
+ salePolicy: [],
}
},
computed: {
@@ -60,38 +93,39 @@ export default {
mounted() {
store.commit('SET_PAGETITLE', '基本设置');
- this.getSiteInfo();
- this.getPayList();
- this.getAddablePays();
+ this.getSupplyServiceList();
},
methods: {
- // 获取可添加的收款方式
+ scrollToAnchor(ver) {
+ this.$nextTick(() => {
+ const element = document.getElementById('ver_'+ver);
+ if (element) {
+ element.scrollIntoView({ behavior: 'smooth' });
+ }
+ });
+ },
getSupplyServiceList() {
+ this.$http('POST', '/agentnew/ajax_get_supply_services', {
- this.tableLoading = true
- const that = this
- that.serviceList = []
- this.$http('POST', '/agentnew/ajax_get_supply_services', {
-
- },{
- headers:{
- 'Auth': this.token
- }
- }).then(response => {
- this.tableLoading = false
- this.$nextTick(() => {
- that.serviceList = response.data.list
- this.type2name = response.data.type2name;
- this.serviceClassifications = response.data.service_classification;
- this.serviceClassificationServices = response.data.service_classification_services;
- this.supplyPriceList = response.data.supply_price;
- console.log(this.supplyPriceList[2].price)
- console.log(this.supplyPriceList[2].unit_format)
- })
- }).catch(error => {
- console.error(error, 'error')
+ },{
+ headers:{
+ 'Auth': this.token
+ }
+ }).then(response => {
+ this.$nextTick(() => {
+ this.classifyId2Name = response.data.classifyid2name;
+ this.classifyId2Vers = response.data.classifyid2vers;
+ this.ver2types = response.data.ver2types;
+ this.ver2info = response.data.ver2info;
+ this.type2name = response.data.type2name;
+ this.type2info = response.data.type2info;
+ this.supplyPriceList = response.data.supply_price;
+ this.salePolicy = response.data.sale_policy;
})
- },
+ }).catch(error => {
+ console.error(error, 'error')
+ })
+ },
}
}
@@ -100,129 +134,318 @@ export default {
padding: 20px 48px;
}
-.pageheader {
+.classify {
display: flex;
- justify-content: space-between;
- /* 关键属性 */
- align-items: center;
- margin: 16px 0px 16px 0px;
+ margin-bottom: 20px;
+ margin-top: 20px;
}
-.pagetitle {
+.classify-title {
+ font-family: Microsoft YaHei UI;
+ font-size: 20px;
+ font-weight: bold;
+ line-height: 26px;
+ letter-spacing: 0.08em;
+ color: #1E2226;
+}
+
+.ver-wrap {
+ width: 100%;
+ /* 自动布局 */
+ display: flex;
+ flex-direction: column;
+ gap: 10px;
+ z-index: 0;
+ background: #FFFFFF;
+ margin-bottom: 10px;
+}
+.ver {
+ padding: 20px;
+}
+.ver-title-wrap {
+ height: 30px;
+ /* 自动布局 */
+ display: flex;
+ justify-content: space-flex-start;
+ align-items: center;
+ padding: 0px;
+ align-self: stretch;
+ z-index: 0;
+}
+.ver-title {
+ /* body/body 1_bold */
+ font-family: Microsoft YaHei UI;
font-size: 16px;
font-weight: bold;
line-height: normal;
+ text-align: justify; /* 浏览器可能不支持 */
letter-spacing: 0.08em;
+ /* text/text_1 */
color: #1E2226;
- margin-top: 8px;
}
-.siteMessage {
+.ver-icon {
+ height: 30px;
+ width: 30px;
+}
+
+.ver-anchor-point {
+ /* 自动布局子元素 */
+ height: 28px;
+ /* 自动布局 */
+ display: flex;
+ align-items: center;
+ padding: 4px 10px;
+ gap: 4px;
+ z-index: 0;
+ border-radius: 100px;
+ /* text/text_white_1 */
+ background: #FFFFFF;
+ box-sizing: border-box;
+ /* main/main_stardard */
+}
+.ver-anchor-point:hover {
+ border: 1px solid #006AFF;
+}
+.anchor {
+ text-decoration: none;
+ /* body/body 2_regular */
+ font-family: Microsoft YaHei UI;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: normal;
+ text-align: justify; /* 浏览器可能不支持 */
+ letter-spacing: 0.08em;
+ /* text/text_4 */
+ color: #8A9099;
+}
+
+.ver-desc {
+ /* body/body 2_regular */
+ font-family: Microsoft YaHei UI;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: normal;
+ text-align: justify; /* 浏览器可能不支持 */
+ letter-spacing: 0.08em;
+ color: #8A8C99;
+ margin-top: 10px;
+ margin-bottom: 20px;
+}
+
+.ver-single {
+ font-family: Microsoft YaHei UI;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: normal;
+ //text-align: justify; /* 浏览器可能不支持 */
+ letter-spacing: 0.08em;
+ color: #8A8C99;
+ margin-top: 10px;
+}
+
+.ver-single-desc {
+ font-family: Microsoft YaHei UI;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: normal;
+ text-align: justify; /* 浏览器可能不支持 */
+ letter-spacing: 0.08em;
+ color: #8A8C99;
+ width: 600px;
+ height: 18px;
+ display: -webkit-box;
+ -webkit-line-clamp: 1;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.ver-services-wrap {
+ width: 100%;
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
+ justify-items: flex-start;
+ gap: 14px 14px;
+
+ padding: 0px;
+}
+
+.ver-service {
+ width: 270px;
border-radius: 4px;
- transition: all .5s;
- border: 1px solid transparent;
+ background: #FFFFFF;
+ box-sizing: border-box;
+ /* middle/middle_line_1 */
+ border: 1px solid #DFE2E6;
+ padding: 14px 10px;
+ display: flex;
+ flex-direction: column;
}
-.combo-formItem {
- ::v-deep {
- .form-item-bottom {
- position: relative;
- }
- .select-trigger {
- background: #F6F7FA;
- border-color: transparent;
- }
+.service-title {
+ /* body/body 2_regular */
+ font-family: Microsoft YaHei UI;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: normal;
+ text-align: justify; /* 浏览器可能不支持 */
+ letter-spacing: 0.08em;
+ /* text/text_1 */
+ color: #1E2226;
+ height: 18px;
+}
- .is-open .select-trigger {
- border-color: #006AFF;
- }
+.service-desc {
+ font-family: Microsoft YaHei UI;
+ font-size: 12px;
+ font-weight: normal;
+ line-height: 17px;
+ text-align: justify; /* 浏览器可能不支持 */
+ letter-spacing: 0.03em;
+ /* text/text_4 */
+ color: #8A9099;
+ margin-top: 14px;
+ margin-bottom: 14px;
+ flex: 1;
+ height:34px;
+ overflow: hidden;
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
- .el-input__inner {
- border-radius: 2px 0 0 2px;
- }
- }
- .self-drop-wrap {
- position: absolute;
- z-index: 1;
- width: 100%;
- }
- .appendDrop {
- height: 38px;
- align-items: center;
- border-radius: 0 2px 2px 0;
- border: 1px solid #DFE2E6;
- border-left-color: transparent;
- justify-content: center;
- box-sizing: border-box;
- padding: 0 30px 0 12px;
- text-overflow: ellipsis;
- white-space: nowrap;
- overflow: hidden;
- &:hover {
- border: 1px solid #006AFF;
- }
- }
+.service-price {
+ /* 自动布局子元素 */
+ height: 20px;
+ /* 自动布局 */
+ display: flex;
+ align-items: flex-end;
+ padding: 0px;
+ gap: 2px;
+ z-index: 1;
+}
+.price {
+ font-family: Microsoft YaHei UI;
+ font-size: 20px;
+ font-weight: normal;
+ line-height: 20px;
+ text-align: center;
+ letter-spacing: normal;
+ /* text/text_1 */
+ color: #1E2226;
}
-.addStore {
- margin-top: 12px;
- // border-radius: 4px;
- // opacity: 1;
- // /* text/text_white_2 */
- // border: 1px dashed #BABDC2;
- // padding: 15px 20px;
- // color: #626573;
- // justify-content: center;
- // img {
- // margin-right: 12px;
- // }
+.unit {
+ font-family: Microsoft YaHei UI;
+ font-size: 12px;
+ font-weight: normal;
+ line-height: 16px;
+ text-align: right;
+ letter-spacing: 0.08em;
+ /* text/text_4 */
+ color: #8A9099;
}
+.status-item {
+ height: 22px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ gap: 6px;
+ z-index: 0;
+ padding: 2px 10px;
+ border-radius: 4px;
-.site-setting-wrap {
- width: 100%;
+}
- .siteMessage5_desc {
- border-radius: 4px;
- /* middle/middle_blue_1 */
- background: #F2F7FF;
- /* middle/middle_blue_3 */
- border: 1px solid #BFDAFF;
- padding: 8px 13px;
- margin-bottom: 32px;
-
- img {
- margin-right: 8px;
- }
+.divgreen {
+ background: rgba(239, 255, 224, 0.5);
+ box-sizing: border-box;
+ border: 1px solid rgba(0, 194, 97, 0.6);
+}
- }
+.fontgreen {
+ font-family: Microsoft YaHei UI;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: normal;
+ text-align: center;
+ letter-spacing: 0.08em;
+ color: #0DAF49;
+}
+
+.divblue {
+ background: #F2F7FF;
+ box-sizing: border-box;
+ border: 1px solid #BFDAFF;
+}
+
+.fontblue {
+ font-family: Microsoft YaHei UI;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: normal;
+ text-align: center;
+ letter-spacing: 0.08em;
+ color: #006AFF;
+}
+
+.divred {
+ background: #FFF1F0;
+ box-sizing: border-box;
+ border: 1px solid #FFA39E;
+}
+
+.fontred {
+ font-family: Microsoft YaHei UI;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: normal;
+ text-align: center;
+ letter-spacing: 0.08em;
+ color: #FF4D4F;
}
-#siteMessage2 {
- margin: 12px 0;
+.divgray {
+ background: #F6F7FA;
+ box-sizing: border-box;
+ border: 1px solid #DFE2E6;
}
-.domain-wrap {
- .domain-item {
- margin-bottom: 10px;
- }
+.fontgray {
+ color: #626573;
+}
+.divorange {
+ background: #FFFBF2;
+ box-sizing: border-box;
+ border: 1px solid rgba(251, 131, 45, 0.38);
+}
- .domain-item p:last-child {
- padding-left: 23px;
- color: #8A9099;
- }
+.fontorange {
+ color: #FB832D;
+}
- p {
- text-align: left;
- line-height: 18px;
- margin-bottom: 8px;
- }
+.divpurple {
+ background: #F9F2FF;
+ box-sizing: border-box;
+ border: 1px solid rgba(126, 118, 253, 0.28);
+}
+
+.fontpurple {
+ color: #6258FF;
+}
- .domain-box {
- display: flex;
- flex-direction: column;
- justify-content: flex-start;
- }
+.mr-8 {
+ margin-right: 8px;
+}
+.mr-12 {
+ margin-right: 12px;
+}
+.mr-20 {
+ margin-right: 20px;
}
\ No newline at end of file