Browse Source

Merge branch 'master' of gitea.intra.yunpaper.com:zhangqi/kuailelunwen_new_houtai into zq-perSliderMenu

pull/103/head
zq 4 months ago
parent
commit
4e264a8584
  1. 1
      src/assets/site/tpl_customize_big.svg
  2. 2
      src/components/SetLeftMenu.vue
  3. 30
      src/components/domainBind.vue
  4. 11
      src/components/paymentMethod.vue
  5. 77
      src/components/site/addSiteStep/step1.vue
  6. 19
      src/components/site/addSiteStep/step3.vue
  7. 42
      src/components/site/serviceSetting/domainSet.vue
  8. 39
      src/components/site/serviceSetting/menuColorSet.vue
  9. 42
      src/router/index.js
  10. 6
      src/utils/common.js
  11. 6
      src/views/agent/ocpcList.vue
  12. 13
      src/views/agent/siteAdd.vue
  13. 58
      src/views/agent/siteBaseSetting.vue
  14. 6
      src/views/agent/siteList.vue
  15. 5
      src/views/agent/sitePersonalization.vue
  16. 22
      src/views/agent/siteServiceAdd.vue
  17. 19
      src/views/agent/siteServiceList.vue
  18. 24
      src/views/agent/siteTemplate.vue

1
src/assets/site/tpl_customize_big.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.1 KiB

2
src/components/SetLeftMenu.vue

@ -9,7 +9,7 @@
<span class="title_text">{{ item.name }}</span> <span class="title_text">{{ item.name }}</span>
</div> </div>
<p :class="['flex', (activeFloor == item1.desc || activeFloor == item1.path) ? 'curActive' : '']" v-for="(item1) in item.list" <p :class="['flex', (activeFloor && (activeFloor == item1.desc || activeFloor == item1.path)) ? 'curActive' : '']" v-for="(item1) in item.list"
@click="setActiveCur(item1, item,index)" :key="item1.name">{{ item1.name }}</p> @click="setActiveCur(item1, item,index)" :key="item1.name">{{ item1.name }}</p>
</li> </li>
</ul> </ul>

30
src/components/domainBind.vue

@ -1,10 +1,11 @@
<template> <template>
<div> <div>
<el-form class="el-row demo-ruleForm" ref="formRef" :rules="rules" :model="data"> <el-form class="el-row demo-ruleForm" ref="bindFormRef" :rules="rules" :model="data">
<GuipFormItem column="column" class="combo-formItem w540" :label="label" :class="label ? '' : 'combo-formItem-nolabel'"> <GuipFormItem column="column" class="combo-formItem w540" :label="label" :class="label ? '' : 'combo-formItem-nolabel'">
<div slot="formDom" class="self-drop-wrap flex w540"> <div slot="formDom" class="self-drop-wrap flex w540">
<GuipInput prop="prefix" v-model="data.prefix" style="width: 60%;" placeholder="仅支持数字、字母" @blur="inputEnd"></GuipInput> <GuipInput prop="prefix" v-model="data.prefix" style="width: 60%;" placeholder="仅支持数字、字母" @blur="inputEnd">
<!-- 只用作选中内容展示 --> <i slot="suffix" v-if="data.prefix" class="el-icon-close" @click="handleClear"></i>
</GuipInput>
<div @click="toggleDrop" class="point flex appendDrop" style="width: 40%;">{{data.domain}}</div> <div @click="toggleDrop" class="point flex appendDrop" style="width: 40%;">{{data.domain}}</div>
</div> </div>
<!--触发 真实下拉操作 --> <!--触发 真实下拉操作 -->
@ -55,25 +56,15 @@ export default {
}, },
rules:{ rules:{
prefix: [ prefix: [
{ required: true, message: '请输入域名前缀', trigger: 'blur' } { required: true, message: '请输入域名前缀', trigger: []}
], ],
}, },
isShowAddDomainDialog: false, isShowAddDomainDialog: false,
} }
}, },
watch: {
defaultPrefix(newVal) {
if(newVal){
this.data.prefix = newVal
}
},
defaultDomain(newVal) {
if(newVal){
this.data.domain = newVal
}
}
},
mounted(){ mounted(){
this.data.prefix = this.defaultPrefix ? this.defaultPrefix : ''
this.data.domain = this.defaultDomain ? this.defaultDomain : ''
this.getDomainList() this.getDomainList()
}, },
methods:{ methods:{
@ -86,7 +77,9 @@ export default {
label: '.'+item, label: '.'+item,
value: '.'+item value: '.'+item
})); }));
if(!response.data.includes(this.data.domain) || !this.data.domain) this.data.domain = '.'+response.data[0]
let domain = that.data.domain.startsWith('.') ? that.data.domain.slice(1) : that.data.domain;
if(!response.data.includes(domain) || !domain) that.data.domain = '.'+response.data[0]
} else { } else {
if(!this.data.domain) this.data.domain = '暂无域名' if(!this.data.domain) this.data.domain = '暂无域名'
} }
@ -97,6 +90,9 @@ export default {
console.error(error, 'error') console.error(error, 'error')
}) })
}, },
handleClear() {
this.data.prefix = '';
},
toggleDrop(e) { toggleDrop(e) {
this.$refs.dropDomain.toggleDropdown(e) this.$refs.dropDomain.toggleDropdown(e)
}, },

11
src/components/paymentMethod.vue

@ -2,7 +2,7 @@
<div class="payment-wrap"> <div class="payment-wrap">
<draggable v-model="list" @start="drag=true" @end="onEnd" :move="checkMove" handle=".drag-handle" > <draggable v-model="list" @start="drag=true" @end="onEnd" :move="checkMove" handle=".drag-handle" >
<div class="payment-item" v-for="(item, index) in list" :key="item.name"> <div class="payment-item" v-for="(item, index) in list" :key="item.name">
<dl :class="index === list.length - 1 ? '' : 'drag-handle'"> <dl :class="index === list.length - 1 && item.pay_type === 1 ? '' : 'drag-handle'">
<img v-if="item.pay_type === 0" src="@/assets/register/taobao.svg" alt=""> <img v-if="item.pay_type === 0" src="@/assets/register/taobao.svg" alt="">
<img v-if="item.pay_type === 1" src="@/assets/register/card_pay.png" alt=""> <img v-if="item.pay_type === 1" src="@/assets/register/card_pay.png" alt="">
<img v-if="item.pay_type === 2" src="@/assets/register/weixin.svg" alt=""> <img v-if="item.pay_type === 2" src="@/assets/register/weixin.svg" alt="">
@ -56,10 +56,11 @@ export default {
checkMove(evt) { checkMove(evt) {
// //
const targetIndex = this.list.length - 1; // 1 const targetIndex = this.list.length - 1; // 1
// if(evt.draggedContext.index == targetIndex && evt.draggedContext.element.pay_type == 1) {
// console.log(evt.relatedContext.index === evt.draggedContext.index,targetIndex === evt.draggedContext.index,'0000targetIndex00'); return false;//
if ((evt.relatedContext.index === targetIndex) || (targetIndex === evt.draggedContext.index)) { }
return false; // if (evt.relatedContext.index === targetIndex && this.list[targetIndex].pay_type == 1) {
return false;//
} }
return true; // return true; //
} }

77
src/components/site/addSiteStep/step1.vue

@ -23,16 +23,19 @@
<div class="flex-right"> <div class="flex-right">
<GuipFormItem column="column" class="mb24"> <GuipFormItem column="column" class="mb24">
<div slot="formLeft">域名来源</div> <div slot="formLeft">域名来源</div>
<GuipRadio slot="formDom" v-model="formData.domain_type" :options="formData.domain_types" prop="domain" :rules="formRules.domain" <GuipRadio slot="formDom" v-model="formData.domain_type" :options="formData.domain_types" prop="domain"/>
@change="radioDomainChange" />
</GuipFormItem> </GuipFormItem>
<GuipFormItem column="column"> <GuipFormItem column="column" v-if="formData.domain_type==='1'">
<div slot="formLeft">域名设置</div> <div slot="formLeft">域名设置</div>
<GuipInput v-show="formData.domain_type==='1'" slot="formDom" v-model="formData.domain_prefix" class="w540"> <GuipInput slot="formDom" ref="GuipInput" prop="domain_prefix" placeholder="仅支持数字、字母"
<i slot="suffix" class="el-icon-close" @click="handleClear"></i> v-model="formData.domain_prefix" :rules="formRules.domain_prefix" class="w540">
<span slot="appendshow">{{formData.domain_name}}</span> <i slot="suffix" v-if="formData.domain_prefix" class="el-icon-close" @click="handleClear"></i>
<span slot="appendshow">{{formData.plat_domain}}</span>
</GuipInput> </GuipInput>
<domainBind v-show="formData.domain_type==='2'" slot="formDom" :defaultPrefix="formData.domain_prefix" :defaultDomain="formData.domain_name" @handleEvent="handleChangeDomain" /> </GuipFormItem>
<GuipFormItem column="column" v-if="formData.domain_type==='2'">
<div slot="formLeft">域名设置</div>
<domainBind ref="domainBind" slot="formDom" :defaultPrefix="formData.domain_prefix" :defaultDomain="formData.domain_name" @handleEvent="handleChangeDomain" />
</GuipFormItem> </GuipFormItem>
</div> </div>
</div> </div>
@ -142,9 +145,15 @@ export default {
}, },
computed: { computed: {
submitData() { submitData() {
let domain = "";
if (this.formData.domain_type === '1') {
domain = this.formData.domain_prefix + this.formData.plat_domain
} else if (this.formData.domain_type === '2') {
domain = this.formData.domain_prefix + this.formData.domain_name
}
return { return {
short_name: this.formData.short_name, short_name: this.formData.short_name,
domain: this.formData.domain_prefix + this.formData.domain_name, domain: domain,
sale_channel: this.formData.sale_channel, sale_channel: this.formData.sale_channel,
site_type: this.formData.site_type, site_type: this.formData.site_type,
site_tpl: this.formData.site_tpl, site_tpl: this.formData.site_tpl,
@ -163,6 +172,7 @@ export default {
return true; return true;
} }
console.log(this.siteInfo)
this.getAddInfo() this.getAddInfo()
}, },
methods:{ methods:{
@ -172,19 +182,12 @@ export default {
this.formData.site_tpl = siteTplInfo.site_tpl this.formData.site_tpl = siteTplInfo.site_tpl
this.formData.site_tpl_name = siteTplInfo.site_tpl_name this.formData.site_tpl_name = siteTplInfo.site_tpl_name
this.formData.picture = siteTplInfo.picture this.formData.picture = siteTplInfo.picture
localStorage.removeItem('site_tpl_info')
} }
const ico = await db.get('ico') const ico = await db.get('ico')
if(ico){ if(ico) this.formData.site_tpl_ico = ico
this.formData.site_tpl_ico = ico
await db.remove('ico')
}
const logo = await db.get('logo') const logo = await db.get('logo')
if(logo){ if(logo) this.formData.site_tpl_logo = logo
this.formData.site_tpl_logo = logo
await db.remove('logo')
}
}, },
getAddInfo() { getAddInfo() {
const that = this const that = this
@ -197,7 +200,6 @@ export default {
that.formData.domain_type = String(addInfo.domain_type) that.formData.domain_type = String(addInfo.domain_type)
that.formData.domain_types = addInfo.domain_types that.formData.domain_types = addInfo.domain_types
that.formData.plat_domain = addInfo.plat_domain that.formData.plat_domain = addInfo.plat_domain
that.formData.domain_name = addInfo.plat_domain
that.formData.site_type = String(addInfo.site_type) that.formData.site_type = String(addInfo.site_type)
that.formData.site_types = addInfo.site_types that.formData.site_types = addInfo.site_types
@ -218,12 +220,9 @@ export default {
that.formData.picture = that.siteInfo.picture that.formData.picture = that.siteInfo.picture
that.formData.not_finished_uid = that.siteInfo.uid that.formData.not_finished_uid = that.siteInfo.uid
//
if(that.siteInfo.domain){
that.formData.domain_type = String(that.siteInfo.domain_type) that.formData.domain_type = String(that.siteInfo.domain_type)
that.formData.domain_prefix = that.siteInfo.domain_prefix; that.formData.domain_prefix = that.siteInfo.domain_prefix;
that.formData.domain_name = that.siteInfo.domain_name; that.formData.domain_name = that.siteInfo.domain_name;
}
}) })
} }
return true return true
@ -238,9 +237,6 @@ export default {
const value = this.formData.sale_channel; const value = this.formData.sale_channel;
this.formData.sale_channel_label = labels && labels[value] ? labels[value] : ''; this.formData.sale_channel_label = labels && labels[value] ? labels[value] : '';
}, },
radioDomainChange(){
this.formData.domain_name = this.formData.domain_type === '1' ? this.formData.plat_domain : ''
},
radioTypeChange(){ radioTypeChange(){
if(this.formData.site_type){ if(this.formData.site_type){
this.formData.site_tpl = this.formData.site_type_tpl[this.formData.site_type].site_tpl this.formData.site_tpl = this.formData.site_type_tpl[this.formData.site_type].site_tpl
@ -264,15 +260,33 @@ export default {
return false; return false;
} }
localStorage.setItem('formData', JSON.stringify(this.formData)) localStorage.setItem('formData', JSON.stringify(this.formData))
if(this.formData.not_finished_uid){
this.$router.push(`/agent/siteTemplate?uid=${this.formData.not_finished_uid}`)
}else{
this.$router.push(`/agent/siteTemplate?site_type=${this.formData.site_type}`) this.$router.push(`/agent/siteTemplate?site_type=${this.formData.site_type}`)
}
}, },
saveConfirm() { saveConfirm() {
const that = this const that = this
let formValid = false;
that.$refs.formRef.validate((valid) => { that.$refs.formRef.validate((valid) => {
if (valid) { formValid = valid
const that = this });
that.$http('POST', '/agentnew/ajax_add_new_site', that.submitData).then(response => {
let domainValid = false;
if(that.formData.domain_type === '2'){
that.$refs.domainBind.$refs.bindFormRef.validate(valid => {
domainValid = valid
})
}else{
domainValid = true
}
if (formValid && domainValid) {
that.$http('POST', '/agentnew/ajax_add_new_site', that.submitData).then(async response => {
if(response.status && response.data.uid){ if(response.status && response.data.uid){
await that.deleteSiteTplData()
that.formData.uid = response.data.uid that.formData.uid = response.data.uid
that.$emit('handelSiteInfo', that.formData) that.$emit('handelSiteInfo', that.formData)
@ -289,7 +303,12 @@ export default {
console.error(error, 'error') console.error(error, 'error')
}) })
} }
}); },
async deleteSiteTplData(){
localStorage.removeItem('activeStep')
localStorage.removeItem('site_tpl_info')
await db.remove('ico')
await db.remove('logo')
}, },
} }
} }
@ -357,7 +376,7 @@ export default {
} }
.channel-radio .el-radio{ .channel-radio .el-radio{
min-width: 120px; min-width: 120px;
margin-bottom: 12px; line-height: 16px;
} }
} }
</style> </style>

19
src/components/site/addSiteStep/step3.vue

@ -31,9 +31,9 @@
<div style="text-align: center"> <div style="text-align: center">
<div class="flex"> <div class="flex">
<GuipInput ref="GuipInput" width="133px" v-model="row.price" label="售价" placeholder="请输入售价" :unit="row.price_unit"></GuipInput> <GuipInput ref="GuipInput" width="133px" v-model="row.price" label="售价" placeholder="请输入售价" :unit="row.price_unit"></GuipInput>
<template v-if="row.price_unit_num>1"> <template v-if="row.freedom_set || row.supply_unit_num>1">
<span class="shortspan">/</span> <span class="shortspan">/</span>
<GuipInput ref="GuipInput" width="133px" v-model="row.price_unit_num" unit="字符"> <GuipInput ref="GuipInput" width="133px" v-model="row.unit_num" :unit="row.unit_name" @input="inputPrice(row)">
</GuipInput> </GuipInput>
</template> </template>
</div> </div>
@ -313,6 +313,17 @@ export default {
item.removeAttribute('aria-hidden') item.removeAttribute('aria-hidden')
}) })
}, },
inputPrice(row){
if(row.freedom_set){
if(row.unit_num == 1) {
row.unit_name = '篇';
}else{
row.unit_name = '字符';
}
}else{
row.unit_name = row.supply_unit_name;
}
},
// //
saveEdit(row, type) { saveEdit(row, type) {
row[type + 'PopoverVisible'] = false; // row[type + 'PopoverVisible'] = false; //
@ -335,7 +346,7 @@ export default {
let obj = {} let obj = {}
obj.uid = this.siteInfo.uid obj.uid = this.siteInfo.uid
obj.type = row.type obj.type = row.type
obj.unit_num = row.price_unit_num obj.unit_num = row.unit_num
if(row.price_unit == '元'){ if(row.price_unit == '元'){
obj.unit_price = row.price obj.unit_price = row.price
}else{ }else{
@ -343,7 +354,7 @@ export default {
} }
const res = await this.saveRequest('/agentnew/ajax_set_service_price', obj) const res = await this.saveRequest('/agentnew/ajax_set_service_price', obj)
if(res) row.price_desc = getServicePriceDesc(row.price, row.price_unit, row.price_unit_num); if(res) row.price_desc = getServicePriceDesc(row.price, row.price_unit, row.unit_num, row.unit_name);
}, },
async onSwitchChange(row){ async onSwitchChange(row){
let obj = {} let obj = {}

42
src/components/site/serviceSetting/domainSet.vue

@ -9,13 +9,14 @@
<el-form class="el-row demo-ruleForm" ref="formRef"> <el-form class="el-row demo-ruleForm" ref="formRef">
<div class="domain-from">域名来源</div> <div class="domain-from">域名来源</div>
<div class="domain-radio"> <div class="domain-radio">
<GuipRadio v-model="domainFrom" :options="domainFromOptions"/> <GuipRadio v-model="domain_type" :options="domain_types"/>
</div> </div>
<div class="flex domain-info"> <div class="flex domain-info">
<span>当前服务域名</span><span>{{info.domain}}</span> <span>当前服务域名</span><span>{{info.domain}}</span>
</div> </div>
<domainBind v-show="domainFrom === '1'" label="域名设置" @handleEvent="handleEvent"/> <domainBind ref="domainBind" v-if="domain_type === '2'" label="域名设置"
:defaultPrefix="newDomain.prefix" :defaultDomain="newDomain.domain" @handleEvent="handleEvent"/>
</el-form> </el-form>
</div> </div>
</div> </div>
@ -55,17 +56,20 @@ export default {
borderRadius: '4px', borderRadius: '4px',
background: '#006AFF', background: '#006AFF',
}, },
domainFrom: '0', domain_type: '',
domainFromOptions: { domain_types: {},
'0': '平台免费域名', newDomain: {
'1': '我自己有域名' prefix: '',
}, domain: ''
newDomain: {} }
} }
}, },
mounted() { mounted() {
this.info = JSON.parse(JSON.stringify(this.serviceInfo)) this.info = JSON.parse(JSON.stringify(this.serviceInfo))
if(this.info.ser_domain) this.domainFrom = '1' this.domain_type = String(this.info.domain_type)
this.domain_types = this.info.domain_types
this.newDomain.prefix = this.info.domain_prefix
this.newDomain.domain = this.info.domain_name
}, },
methods:{ methods:{
handleEvent(data){ handleEvent(data){
@ -75,26 +79,27 @@ export default {
let obj = {} let obj = {}
obj.uid = this.info.uid obj.uid = this.info.uid
obj.type = this.info.type obj.type = this.info.type
if(this.domainFrom === '1'){
if(!this.newDomain.prefix || !this.newDomain.domain) return false
obj.domain = this.newDomain.prefix + this.newDomain.domain
}else{
obj.domain = '' obj.domain = ''
} if(this.domain_type === '2') obj.domain = this.newDomain.prefix + this.newDomain.domain
const that = this const that = this
this.$http('POST', '/agentnew/ajax_update_service_domain', obj).then(response => { let domainValid = true;
if(that.domain_type === '2'){
that.$refs.domainBind.$refs.bindFormRef.validate(valid => {
domainValid = valid
})
}
if (domainValid) {
that.$http('POST', '/agentnew/ajax_update_service_domain', obj).then(response => {
if (response.status) { if (response.status) {
that.$message.success('保存成功'); that.$message.success('保存成功');
// //
const protocol = new URL(that.info.domain).protocol; const protocol = new URL(that.info.domain).protocol;
if(this.domainFrom === '1'){ if (that.domain_type === '2') {
that.info.domain = protocol + "//" + obj.domain; that.info.domain = protocol + "//" + obj.domain;
that.info.ser_domain = protocol + "//" +obj.domain;
} else { } else {
that.info.domain = that.info.site_domain; that.info.domain = that.info.site_domain;
that.info.ser_domain = '';
} }
that.$emit('saveEvent', that.info) that.$emit('saveEvent', that.info)
@ -104,6 +109,7 @@ export default {
}).catch(error => { }).catch(error => {
console.error(error, 'error') console.error(error, 'error')
}) })
}
}, },
} }
} }

39
src/components/site/serviceSetting/menuColorSet.vue

@ -34,7 +34,7 @@
<GuipFormItem column="column" label="主题颜色"> <GuipFormItem column="column" label="主题颜色">
<span class="desc" slot="formRight"> 按钮及提示文字颜色</span> <span class="desc" slot="formRight"> 按钮及提示文字颜色</span>
<div class="flex gap12" slot="formDom"> <div class="flex gap12" slot="formDom">
<el-color-picker popper-class="color-drop" v-model="themeColor"></el-color-picker> <el-color-picker class="color-drop" popper-class="color-drop" v-model="themeColor"></el-color-picker>
<GuipInput ref="GuipInput" style="flex:1" v-model="themeColor" placeholder="请输入主题颜色" <GuipInput ref="GuipInput" style="flex:1" v-model="themeColor" placeholder="请输入主题颜色"
@change="changeThemeColor"> @change="changeThemeColor">
</GuipInput> </GuipInput>
@ -43,7 +43,7 @@
<GuipFormItem column="column" class="mt24" label="选中颜色"> <GuipFormItem column="column" class="mt24" label="选中颜色">
<span class="desc" slot="formRight"> 分页导航栏选中色</span> <span class="desc" slot="formRight"> 分页导航栏选中色</span>
<div class="flex gap12" slot="formDom"> <div class="flex gap12" slot="formDom">
<el-color-picker popper-class="color-drop" v-model="tabColor"></el-color-picker> <el-color-picker class="color-drop" popper-class="color-drop" v-model="tabColor"></el-color-picker>
<GuipInput ref="GuipInput" style="flex:1" v-model="tabColor" placeholder="请输入选中颜色" <GuipInput ref="GuipInput" style="flex:1" v-model="tabColor" placeholder="请输入选中颜色"
@change="changetabColor"> @change="changetabColor">
</GuipInput> </GuipInput>
@ -52,7 +52,7 @@
<GuipFormItem column="column" class="mt24" label="导航栏色"> <GuipFormItem column="column" class="mt24" label="导航栏色">
<span class="desc" slot="formRight"> logo处导航栏背景色</span> <span class="desc" slot="formRight"> logo处导航栏背景色</span>
<div class="flex gap12" slot="formDom"> <div class="flex gap12" slot="formDom">
<el-color-picker popper-class="color-drop" v-model="navColor"></el-color-picker> <el-color-picker class="color-drop" popper-class="color-drop" v-model="navColor"></el-color-picker>
<GuipInput ref="GuipInput" style="flex:1" v-model="navColor" placeholder="请输入导航栏色" <GuipInput ref="GuipInput" style="flex:1" v-model="navColor" placeholder="请输入导航栏色"
@change="changeNavColor"> @change="changeNavColor">
</GuipInput> </GuipInput>
@ -158,20 +158,14 @@ export default {
} }
}, },
saveConfirm() { saveConfirm() {
let obj = {} let obj = new FormData()
obj.uid = this.info.uid obj.set('uid', this.info.uid)
obj.type = this.info.type obj.set('type', this.info.type)
obj.logo_bgcolor = this.tabColor.replace('#','') if(this.tabColor) obj.set('logo_bgcolor', this.tabColor.replace('#',''))
obj.link_btn_color = this.themeColor.replace('#','') if(this.themeColor) obj.set('link_btn_color', this.themeColor.replace('#',''))
obj.selected_nav_bgcolor = this.navColor.replace('#','') if(this.navColor) obj.set('selected_nav_bgcolor', this.navColor.replace('#',''))
if(this.sub_logo_file) obj.set('submit_logo', this.sub_logo_file)
if(!this.sub_logo_file || !this.rep_logo_file){ if(this.rep_logo_file) obj.set('report_logo', this.rep_logo_file)
this.$message.warning(`请上传logo图`);
return false;
}
obj.submit_logo = this.sub_logo_file
obj.report_logo = this.rep_logo_file
const that = this const that = this
this.$http('POST', '/agentnew/ajax_update_service_style', obj).then(response => { this.$http('POST', '/agentnew/ajax_update_service_style', obj).then(response => {
@ -196,13 +190,18 @@ export default {
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.color-drop {
.color-drop .el-color-dropdown__btns{ .el-color-dropdown__btns{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.color-drop .el-button { .el-button {
width: 70px; width: 70px;
height: 30px; height: 30px;
} }
.el-icon-close:before{
content: "";
}
}
</style> </style>

42
src/router/index.js

@ -51,7 +51,7 @@ const blackFooterList = [
const routes = [{ const routes = [{
path: '/', path: '/',
name: '首页', name: '首页',
component: () => import( /* webpackChunkName: "register" */ '../views/agent/home.vue'), component: () => import( /* webpackChunkName: "home" */ '../views/agent/home.vue'),
isFirst: true, //是否属于一级路由 isFirst: true, //是否属于一级路由
meta: { meta: {
title: '首页', //面包屑名称(此页面确认不需要放置在面包屑可以不添加此属性;如果获取不到title 会自动 获取 name 作为面包屑名称) title: '首页', //面包屑名称(此页面确认不需要放置在面包屑可以不添加此属性;如果获取不到title 会自动 获取 name 作为面包屑名称)
@ -61,7 +61,7 @@ const routes = [{
{ {
path: '/agent/supplyList', path: '/agent/supplyList',
name: '供货价格', name: '供货价格',
component: () => import( /* webpackChunkName: "register" */ '../views/agent/supplyList.vue'), component: () => import( /* webpackChunkName: "supplyList" */ '../views/agent/supplyList.vue'),
isFirst: true, //是否属于一级路由 isFirst: true, //是否属于一级路由
meta: { meta: {
title: '供货价格', //面包屑名称(此页面确认不需要放置在面包屑可以不添加此属性;如果获取不到title 会自动 获取 name 作为面包屑名称) title: '供货价格', //面包屑名称(此页面确认不需要放置在面包屑可以不添加此属性;如果获取不到title 会自动 获取 name 作为面包屑名称)
@ -72,7 +72,7 @@ const routes = [{
{ {
path: '/agent/domainList', path: '/agent/domainList',
name: '域名列表', name: '域名列表',
component: () => import( /* webpackChunkName: "register" */ '../views/agent/domainList.vue'), component: () => import( /* webpackChunkName: "domainList" */ '../views/agent/domainList.vue'),
isFirst: true, //是否属于一级路由 isFirst: true, //是否属于一级路由
meta: { meta: {
title: '首页', //面包屑名称(此页面确认不需要放置在面包屑可以不添加此属性;如果获取不到title 会自动 获取 name 作为面包屑名称) title: '首页', //面包屑名称(此页面确认不需要放置在面包屑可以不添加此属性;如果获取不到title 会自动 获取 name 作为面包屑名称)
@ -82,7 +82,7 @@ const routes = [{
{ {
path: '/agent/noticeList', path: '/agent/noticeList',
name: '首页', name: '首页',
component: () => import( /* webpackChunkName: "register" */ '../views/agent/noticeList.vue'), component: () => import( /* webpackChunkName: "noticeList" */ '../views/agent/noticeList.vue'),
isFirst: true, //是否属于一级路由 isFirst: true, //是否属于一级路由
meta: { meta: {
title: '系统通知', //面包屑名称(此页面确认不需要放置在面包屑可以不添加此属性;如果获取不到title 会自动 获取 name 作为面包屑名称) title: '系统通知', //面包屑名称(此页面确认不需要放置在面包屑可以不添加此属性;如果获取不到title 会自动 获取 name 作为面包屑名称)
@ -116,7 +116,7 @@ const routes = [{
path: '/agent/checkOrderList', path: '/agent/checkOrderList',
name: '查重订单', name: '查重订单',
isFirst: true, isFirst: true,
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/checkOrderList.vue'), component: () => import( /* webpackChunkName: "checkOrderList" */ '../views/agent/checkOrderList.vue'),
props: { props: {
list_type: 'check', list_type: 'check',
}, },
@ -130,7 +130,7 @@ const routes = [{
path: '/agent/aiOrderList', path: '/agent/aiOrderList',
name: 'AI写作订单', name: 'AI写作订单',
isFirst: true, isFirst: true,
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/checkOrderList.vue'), component: () => import( /* webpackChunkName: "aiOrderList" */ '../views/agent/checkOrderList.vue'),
props: { props: {
list_type: 'ai', list_type: 'ai',
}, },
@ -144,7 +144,7 @@ const routes = [{
path: '/agent/ocpcList', path: '/agent/ocpcList',
name: 'OCPC订单', name: 'OCPC订单',
isFirst: true, isFirst: true,
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/ocpcList.vue'), component: () => import( /* webpackChunkName: "ocpcList" */ '../views/agent/ocpcList.vue'),
meta: { meta: {
title: 'OCPC订单', title: 'OCPC订单',
breadcrumbParent: '首页', breadcrumbParent: '首页',
@ -167,7 +167,7 @@ const routes = [{
name: '添加站点', name: '添加站点',
// this generates a separate chunk (about.[hash].js) for this route // this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited. // which is lazy-loaded when the route is visited.
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/siteAdd.vue'), component: () => import( /* webpackChunkName: "siteAdd" */ '../views/agent/siteAdd.vue'),
meta: { meta: {
title: '添加站点', title: '添加站点',
hideBreadcrumb: true, // 一级页面不显示面包屑 hideBreadcrumb: true, // 一级页面不显示面包屑
@ -177,7 +177,7 @@ const routes = [{
path: '/agent/siteAddFinally', path: '/agent/siteAddFinally',
name: '添加站点-添加服务', name: '添加站点-添加服务',
isFirst: true, isFirst: true,
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/siteServiceAdd.vue'), component: () => import( /* webpackChunkName: "siteAddFinally" */ '../views/agent/siteServiceAdd.vue'),
meta: { meta: {
title: '添加服务', title: '添加服务',
breadcrumbParent: '添加站点', breadcrumbParent: '添加站点',
@ -188,7 +188,7 @@ const routes = [{
path: '/agent/siteServiceList', path: '/agent/siteServiceList',
name: '服务列表', name: '服务列表',
isFirst: true, isFirst: true,
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/siteServiceList.vue'), component: () => import( /* webpackChunkName: "siteServiceList" */ '../views/agent/siteServiceList.vue'),
meta: { meta: {
title: '服务列表', title: '服务列表',
breadcrumbParent: '站点列表', breadcrumbParent: '站点列表',
@ -199,7 +199,7 @@ const routes = [{
path: '/agent/siteServiceAdd', path: '/agent/siteServiceAdd',
name: '服务列表-添加', name: '服务列表-添加',
isFirst: true, isFirst: true,
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/siteServiceAdd.vue'), component: () => import( /* webpackChunkName: "siteServiceAdd" */ '../views/agent/siteServiceAdd.vue'),
meta: { meta: {
title: '添加服务', title: '添加服务',
breadcrumbParent: '服务列表', breadcrumbParent: '服务列表',
@ -210,7 +210,7 @@ const routes = [{
path: '/agent/siteServiceEdit', path: '/agent/siteServiceEdit',
name: '服务列表-修改', name: '服务列表-修改',
isFirst: true, isFirst: true,
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/siteServiceEdit.vue'), component: () => import( /* webpackChunkName: "siteServiceEdit" */ '../views/agent/siteServiceEdit.vue'),
meta: { meta: {
title: '修改服务', title: '修改服务',
breadcrumbParent: '服务列表', breadcrumbParent: '服务列表',
@ -220,7 +220,7 @@ const routes = [{
{ {
path: '/agent/siteBaseSetting', path: '/agent/siteBaseSetting',
name: '站点基本设置', name: '站点基本设置',
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/siteBaseSetting.vue'), component: () => import( /* webpackChunkName: "siteBaseSetting" */ '../views/agent/siteBaseSetting.vue'),
meta: { meta: {
title: '站点设置', title: '站点设置',
breadcrumbParent: '站点列表' // 手动指定父级 breadcrumbParent: '站点列表' // 手动指定父级
@ -232,7 +232,7 @@ const routes = [{
{ {
path: '/agent/siteMobileSetting', path: '/agent/siteMobileSetting',
name: '移动端设置', name: '移动端设置',
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/siteMobileSetting.vue'), component: () => import( /* webpackChunkName: "siteMobileSetting" */ '../views/agent/siteMobileSetting.vue'),
meta: { meta: {
title: '站点设置', title: '站点设置',
breadcrumbParent: '站点列表' // 手动指定父级 breadcrumbParent: '站点列表' // 手动指定父级
@ -244,7 +244,7 @@ const routes = [{
{ {
path: '/agent/siteSemSetting', path: '/agent/siteSemSetting',
name: '营销推广', name: '营销推广',
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/siteSemSetting.vue'), component: () => import( /* webpackChunkName: "siteSemSetting" */ '../views/agent/siteSemSetting.vue'),
meta: { meta: {
title: '站点设置', title: '站点设置',
breadcrumbParent: '站点列表' // 手动指定父级 breadcrumbParent: '站点列表' // 手动指定父级
@ -253,7 +253,7 @@ const routes = [{
{ {
path: '/agent/sitePersonalization', path: '/agent/sitePersonalization',
name: '个性化设置', name: '个性化设置',
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/sitePersonalization.vue'), component: () => import( /* webpackChunkName: "sitePersonalization" */ '../views/agent/sitePersonalization.vue'),
meta: { meta: {
title: '站点设置', title: '站点设置',
breadcrumbParent: '站点列表' // 手动指定父级 breadcrumbParent: '站点列表' // 手动指定父级
@ -262,7 +262,7 @@ const routes = [{
{ {
path: '/agent/siteTemplate', path: '/agent/siteTemplate',
name: '个性化设置', name: '个性化设置',
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/siteTemplate.vue'), component: () => import( /* webpackChunkName: "siteTemplate" */ '../views/agent/siteTemplate.vue'),
// meta: { // meta: {
// title: '站点设置', // title: '站点设置',
// breadcrumbParent: '站点列表' // 手动指定父级 // breadcrumbParent: '站点列表' // 手动指定父级
@ -275,7 +275,7 @@ const routes = [{
// route level code-splitting // route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route // this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited. // which is lazy-loaded when the route is visited.
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/payList.vue'), component: () => import( /* webpackChunkName: "payList" */ '../views/agent/payList.vue'),
meta: { meta: {
title: '收款方式', title: '收款方式',
breadcrumbParent: '首页', breadcrumbParent: '首页',
@ -285,7 +285,7 @@ const routes = [{
{ {
path: '/agent/payInfoSetting', path: '/agent/payInfoSetting',
name: '收款方式设置', name: '收款方式设置',
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/payInfoSetting.vue'), component: () => import( /* webpackChunkName: "payInfoSetting" */ '../views/agent/payInfoSetting.vue'),
meta: { meta: {
title: '收款方式设置', title: '收款方式设置',
breadcrumbParent: '收款方式' // 手动指定父级 breadcrumbParent: '收款方式' // 手动指定父级
@ -297,7 +297,7 @@ const routes = [{
{ {
path: '/agent/paySetting', path: '/agent/paySetting',
name: '收款方式设置', name: '收款方式设置',
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/paySetting.vue'), component: () => import( /* webpackChunkName: "paySetting" */ '../views/agent/paySetting.vue'),
meta: { meta: {
title: '收款方式设置', title: '收款方式设置',
breadcrumbParent: '收款方式' // 手动指定父级 breadcrumbParent: '收款方式' // 手动指定父级
@ -309,7 +309,7 @@ const routes = [{
{ {
path: '/agent/payCertSetting', path: '/agent/payCertSetting',
name: '钱款交易设置', name: '钱款交易设置',
component: () => import( /* webpackChunkName: "siteList" */ '../views/agent/payCertSetting.vue'), component: () => import( /* webpackChunkName: "payCertSetting" */ '../views/agent/payCertSetting.vue'),
meta: { meta: {
title: '钱款交易设置', title: '钱款交易设置',
breadcrumbParent: '收款方式' // 手动指定父级 breadcrumbParent: '收款方式' // 手动指定父级

6
src/utils/common.js

@ -8,11 +8,11 @@ export function setHighActive(dom) {
},1000) },1000)
} }
export function getServicePriceDesc(price, price_unit, unit_num) { export function getServicePriceDesc(price, price_unit, unit_num, unit_name) {
let unit = 0; let unit = 0;
let unit_str = ""; let unit_str = "";
if (unit_num == 1) return price + price_unit +'/'; if (unit_num == 1) return price + price_unit +'/'+unit_name;
if (unit_num/10000 < 10) { if (unit_num/10000 < 10) {
unit = Math.ceil(unit_num/10000); unit = Math.ceil(unit_num/10000);
@ -27,6 +27,6 @@ export function getServicePriceDesc(price, price_unit, unit_num) {
unit_str = unit == 1 ? '百' : unit+'百'; unit_str = unit == 1 ? '百' : unit+'百';
} }
return price + price_unit + "/" +unit_str + "字符"; return price + price_unit + "/" +unit_str + unit_name;
} }

6
src/views/agent/ocpcList.vue

@ -12,7 +12,9 @@
<div class="flex"> <div class="flex">
<GuipInput :label="`ID:`" v-model="searchSaleid" @blur="changeSearchSaleid()" placeholder="" ref="GuipInput" class="searchId" /> <GuipInput :label="`ID:`" v-model="searchSaleid" @blur="changeSearchSaleid()" placeholder="" ref="GuipInput" class="searchId" />
<GuipSelect label="站点" v-model="searchUid" :options="siteList" valueKey="uid" labelKey="name" @change="changeSearchSite()" defaultValue="" placeholder="不限" clearable class="searchSite" /> <GuipSelect label="站点" v-model="searchUid" @change="changeSearchSite()"
:options="siteList" valueKey="uid" labelKey="name" :extraItem="{ label: '全部', value: '0' }"
placeholder="" clearable class="searchSite" />
</div> </div>
<GuipTable :tableData="orderList" ref="multipleTable" autoColumn="true" :loading="tableLoading"> <GuipTable :tableData="orderList" ref="multipleTable" autoColumn="true" :loading="tableLoading">
@ -60,7 +62,7 @@ export default {
siteList: [], siteList: [],
searchUid: 0, searchUid: '0',
searchSaleid: 0, searchSaleid: 0,
} }
}, },

13
src/views/agent/siteAdd.vue

@ -51,7 +51,7 @@
<!-- 参数 在子组件页面一样用 props接收 ref绑定的组件示例 --> <!-- 参数 在子组件页面一样用 props接收 ref绑定的组件示例 -->
<!-- 默认页面展示 的初始组件 Franchise--> <!-- 默认页面展示 的初始组件 Franchise-->
<component :is="process" :siteInfo="siteInfo" ref="dynamicComponent" @handelSiteInfo="handelSiteInfo" @handelStep="handelStep"/> <component :is="process" :key="stepKey" :siteInfo="siteInfo" ref="dynamicComponent" @handelSiteInfo="handelSiteInfo" @handelStep="handelStep"/>
</div> </div>
</template> </template>
<script> <script>
@ -73,6 +73,7 @@ export default {
return { return {
siteInfo:{}, siteInfo:{},
showAlert:true, showAlert:true,
stepKey: Date.now(),
activeStep: '1',// activeStep: '1',//
process: '', // process: '', //
prodid: '',// prodid: '',//
@ -102,13 +103,20 @@ export default {
methods: { methods: {
getNotFinishedSite() { getNotFinishedSite() {
const that = this const that = this
that.payList = []
this.$http('POST', '/agentnew/ajax_get_not_finished_site', {}).then(response => { this.$http('POST', '/agentnew/ajax_get_not_finished_site', {}).then(response => {
if(response.status){ if(response.status){
that.$nextTick(() => { that.$nextTick(() => {
const unsiteInfo = response.data const unsiteInfo = response.data
if(Object.keys(unsiteInfo).length>0){ if(Object.keys(unsiteInfo).length>0){
that.siteInfo = unsiteInfo that.siteInfo = unsiteInfo
that.stepKey = Date.now();
const step = localStorage.getItem('activeStep')
if(step){
that.activeStep = step
return true
}
if(that.siteInfo.open_process === '3'){ if(that.siteInfo.open_process === '3'){
if(that.siteInfo.sale_channel === '2'){ if(that.siteInfo.sale_channel === '2'){
that.activeStep = 3 // that.activeStep = 3 //
@ -137,6 +145,7 @@ export default {
goCurActiveStep(step) { goCurActiveStep(step) {
if (step < this.activeStep) { if (step < this.activeStep) {
this.activeStep = step this.activeStep = step
localStorage.setItem('activeStep', step)
} }
}, },
renderStepDesc(step) { renderStepDesc(step) {

58
src/views/agent/siteBaseSetting.vue

@ -33,7 +33,7 @@
<div class="siteMessage flex-common" id="siteMessage2"> <div class="siteMessage flex-common" id="siteMessage2">
<h3>域名设置</h3> <h3>域名设置</h3>
<p class="flex siteMessage5_desc"> <img src="@/assets/tip_blue.svg" alt="">当前站点域名{{ siteInfo.domain }}</p> <p class="flex siteMessage5_desc"> <img src="@/assets/tip_blue.svg" alt="">当前站点域名{{ siteInfo.domain }}</p>
<el-form> <el-form ref="domainFormRef" :rules="domainRules" :model="domainData">
<div class="flex-wrap"> <div class="flex-wrap">
<div class="flex-left"> <div class="flex-left">
<p class="flex-left-desc">域名来源</p> <p class="flex-left-desc">域名来源</p>
@ -43,15 +43,15 @@
</div> </div>
<div class="flex-line"></div> <div class="flex-line"></div>
<div class="flex-right"> <div class="flex-right">
<domainBind v-if="domainType==2" label="修改域名" @handleEvent="handleEvent2" /> <domainBind v-if="domainType==2" ref="domainBind" :defaultPrefix="domainPrefix" :defaultDomain="domainName" label="修改域名" @handleEvent="handleEvent2" />
<div v-if="domainType==1"> <div v-if="domainType==1">
<p class="flex-left-desc">修改域名</p> <p class="flex-left-desc">修改域名</p>
<GuipInput class="mt12" v-model="domainPrefix"> <GuipInput class="mt12 w540" v-model="domainPrefix" prop="domainPrefix" :rules="domainRules.domainPrefix" @change="domainChange">
<!-- <span slot="prependshow">http:</span> --> <!-- <span slot="prependshow">http:</span> -->
<!-- <img slot="prefix" src="../assets/radio_checked.svg" alt=""> --> <!-- <img slot="prefix" src="../assets/radio_checked.svg" alt=""> -->
<!-- 输入框后面小图标 -事件自定义 --> <!-- 输入框后面小图标 -事件自定义 -->
<i slot="suffix" class="el-icon-close" @click="handleClear"></i> <i slot="suffix" v-if="domainPrefix" class="el-icon-close" @click="handleClear"></i>
<!-- <img slot="suffix" src="../assets/radio_nochecked.svg" alt="" @click="handleClear"> --> <!-- <img slot="suffix" src="../assets/radio_nochecked.svg" alt="" @click="handleClear"> -->
<!-- 这个 appendshow 宽度 居中方式 自定义添加类名修改--> <!-- 这个 appendshow 宽度 居中方式 自定义添加类名修改-->
@ -384,7 +384,16 @@ export default {
domainType: 0, domainType: 0,
domainTypes: [], domainTypes: [],
domainPrefix: '', domainPrefix: '',
domainName: '',
siteDomain: '', siteDomain: '',
domainData: {
domainPrefix: ''
},
domainRules: {
domainPrefix: [
{ required: true, message: '请设置站点域名', trigger: [] }
],
},
} }
}, },
computed: { computed: {
@ -505,6 +514,8 @@ export default {
this.domainType = String(that.siteInfo.domain_type); this.domainType = String(that.siteInfo.domain_type);
this.domainTypes = that.siteInfo.domain_types; this.domainTypes = that.siteInfo.domain_types;
this.siteDomain = response.data.domain; this.siteDomain = response.data.domain;
this.domainPrefix = response.data.domain_prefix
this.domainName = response.data.domain_name
if ( if (
response.data && response.data &&
@ -514,7 +525,6 @@ export default {
this.bindWxpayId = response.data.site_pays[this.payTypeWeixin].payid; this.bindWxpayId = response.data.site_pays[this.payTypeWeixin].payid;
this.selectWxpay = response.data.site_pays[this.payTypeWeixin]; this.selectWxpay = response.data.site_pays[this.payTypeWeixin];
} }
console.log(this.selectWxpay, 'selectWxpay');
if ( if (
response.data && response.data &&
@ -630,6 +640,9 @@ export default {
console.log(this.domainType, 'this.domainType'); console.log(this.domainType, 'this.domainType');
console.log(typeof this.domainType, 'domainTypeChange'); console.log(typeof this.domainType, 'domainTypeChange');
}, },
domainChange(){
this.domainData.domainPrefix = this.domainPrefix
},
onSwitchChange(data) { onSwitchChange(data) {
console.log(data, '---'); console.log(data, '---');
}, },
@ -675,15 +688,14 @@ export default {
}) })
}, },
handleEvent(data) { handleEvent(data) {
console.log(data, 'handleEvent');
this.isShowAddPay = data this.isShowAddPay = data
}, },
handleEvent2(data) { handleEvent2(data) {
console.log(data, 'handleEvent2');
this.siteDomain = data.prefix + data.domain; this.siteDomain = data.prefix + data.domain;
this.domainPrefix = data.prefix
this.domainName = data.domain
}, },
handleClear(value) { handleClear() {
console.log(value, 'value===qinghcu');
this.domainPrefix = ''; this.domainPrefix = '';
}, },
updateSiteDomain() { updateSiteDomain() {
@ -694,6 +706,22 @@ export default {
domain = this.siteDomain; domain = this.siteDomain;
} }
const that = this
let formValid = false;
that.$refs.domainFormRef.validate((valid) => {
formValid = valid
});
let domainValid = false;
if(this.domainType === '2'){
that.$refs.domainBind.$refs.bindFormRef.validate(valid => {
domainValid = valid
})
}else{
domainValid = true
}
if(formValid && domainValid){
this.$http('POST', '/agentnew/ajax_update_site_domain', { this.$http('POST', '/agentnew/ajax_update_site_domain', {
uid: this.$route.query.uid, uid: this.$route.query.uid,
domain: domain, domain: domain,
@ -712,9 +740,14 @@ export default {
} }
} }
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.w540{
width: 540px;
}
.pageheader { .pageheader {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -840,4 +873,11 @@ export default {
justify-content: flex-start; justify-content: flex-start;
} }
} }
::v-deep{
.el-input-group__append{
width: 175px;
letter-spacing: 0.08em;
}
}
</style> </style>

6
src/views/agent/siteList.vue

@ -12,7 +12,7 @@
:customStyle="{ fontSize: '14px', background: '#fff', borderRadius: '2px', borderColor: '#DFE2E6' }" /> :customStyle="{ fontSize: '14px', background: '#fff', borderRadius: '2px', borderColor: '#DFE2E6' }" />
<el-form> <el-form>
<GuipSelect v-model="currentGroup" :options="siteGroups" defaultValue="选项1" labelKey="name" valueKey="id" style="margin-bottom: 0px;" clearable /> <GuipSelect v-model="currentGroup" :options="siteGroups" labelKey="name" valueKey="id" :extraItem="{ label: '全部分组', value: '0' }" style="margin-bottom: 0px;" clearable />
</el-form> </el-form>
</div> </div>
<GuipButton size="table" @click="addNewSite">新增站点</GuipButton> <GuipButton size="table" @click="addNewSite">新增站点</GuipButton>
@ -149,7 +149,7 @@ export default {
selected_group: '', selected_group: '',
isUpIco: false, isUpIco: false,
currentIcon: require('@/assets/site/drop_icon.svg'), currentIcon: require('@/assets/site/drop_icon.svg'),
currentGroup: '', currentGroup: '0',
fitlerIcon: require('@/assets/site/filter.svg'), fitlerIcon: require('@/assets/site/filter.svg'),
// //
phoneServices: [ phoneServices: [
@ -331,7 +331,7 @@ export default {
// //
filteredSites() { filteredSites() {
let result = this.siteList; let result = this.siteList;
if (this.currentGroup) { if (Number(this.currentGroup) > 0) {
result = result.filter(site => site.groupid == this.currentGroup); result = result.filter(site => site.groupid == this.currentGroup);
} }

5
src/views/agent/sitePersonalization.vue

@ -12,7 +12,8 @@
</div> </div>
<div class="tem-home"> <div class="tem-home">
<div class="outImg_tem"> <div class="outImg_tem">
<img class="tem-home-top" :src="siteInfo.site_tpl_img ? siteInfo.site_tpl_img : require('@/assets/register/tem-img-normal.png')" alt=""> <img v-if="siteInfo.is_public_tpl === '1'" class="tem-home-top" :src="siteInfo.site_tpl_img ? siteInfo.site_tpl_img : require('@/assets/register/tem-img-normal.png')" alt="">
<img v-if="siteInfo.is_public_tpl === '0'" class="tem-home-top" src="@/assets/site/tpl_customize_big.svg" alt="">
</div> </div>
<div class="tem-home-bottom"> <div class="tem-home-bottom">
<b>{{siteInfo.site_tpl_name ? siteInfo.site_tpl_name : '经典深蓝模板(默认)'}}</b> <b>{{siteInfo.site_tpl_name ? siteInfo.site_tpl_name : '经典深蓝模板(默认)'}}</b>
@ -530,7 +531,7 @@ export default {
// } // }
.outImg_tem { .outImg_tem {
height: 110px; height: 220px;
overflow: hidden; overflow: hidden;
border-radius: 8px; border-radius: 8px;
border: 2px solid #E8E9EA; border: 2px solid #E8E9EA;

22
src/views/agent/siteServiceAdd.vue

@ -234,8 +234,8 @@
确定要移除服务吗? 确定要移除服务吗?
</GuipDialog> </GuipDialog>
</div> </div>
<div class="register-btns"> <div class="register-btns flex gap12">
<GuipButton type="primary" :btnstyle="{ width: '144px', height: '46px' }" @click="jumpStep">添加完成</GuipButton> <span class="service-open-num">已开启 {{addNum}} 服务</span><GuipButton type="primary" :btnstyle="{ width: '144px', height: '46px' }" @click="jumpStep">返回服务列表</GuipButton>
</div> </div>
</div> </div>
@ -284,6 +284,7 @@ export default {
dialogDelBindConfim: false, dialogDelBindConfim: false,
delRow: {}, delRow: {},
dialogDelServiceConfim: false, dialogDelServiceConfim: false,
addNum: 0
} }
}, },
computed: { computed: {
@ -325,6 +326,7 @@ export default {
that.$nextTick(() => { that.$nextTick(() => {
that.menuList = response.data that.menuList = response.data
store.commit('SET_SECOND_MENU', response.data); store.commit('SET_SECOND_MENU', response.data);
that.setMenuList()
}) })
}).catch(error => { }).catch(error => {
console.error(error, 'error') console.error(error, 'error')
@ -505,11 +507,17 @@ export default {
}) })
}, },
setMenuList(type, status) { setMenuList(type, status) {
this.addNum = 0
Object.values(this.menuList).forEach((item) => { Object.values(this.menuList).forEach((item) => {
let ver_select = false let ver_select = false
item.list.forEach((item1) => { item.list.forEach((item1) => {
if (item1.type === type) item1.is_select = status if (item1.type === type) {
if (item1.is_select === true) ver_select = true item1.is_select = status
}
if (item1.is_select === true) {
ver_select = true
this.addNum++
}
}) })
if (ver_select) item.is_select = true if (ver_select) item.is_select = true
@ -850,5 +858,11 @@ export default {
button:nth-child(1) { button:nth-child(1) {
margin-right: 56px; margin-right: 56px;
} }
.service-open-num{
color: #006AFF;
letter-spacing: 0.08em;
font-size: 12px;
}
} }
</style> </style>

19
src/views/agent/siteServiceList.vue

@ -40,9 +40,9 @@
<div style="text-align: center"> <div style="text-align: center">
<div class="flex"> <div class="flex">
<GuipInput ref="GuipInput" width="133px" v-model="row.price" label="售价" placeholder="请输入售价" :unit="row.price_unit"></GuipInput> <GuipInput ref="GuipInput" width="133px" v-model="row.price" label="售价" placeholder="请输入售价" :unit="row.price_unit"></GuipInput>
<template v-if="row.price_unit_num>1"> <template v-if="row.freedom_set || row.supply_unit_num>1">
<span class="shortspan">/</span> <span class="shortspan">/</span>
<GuipInput ref="GuipInput" width="133px" v-model="row.price_unit_num" unit="字符"> <GuipInput ref="GuipInput" width="133px" v-model="row.unit_num" :unit="row.unit_name" @input="inputPrice(row)">
</GuipInput> </GuipInput>
</template> </template>
</div> </div>
@ -362,6 +362,17 @@ export default {
item.removeAttribute('aria-hidden') item.removeAttribute('aria-hidden')
}) })
}, },
inputPrice(row){
if(row.freedom_set){
if(row.unit_num == 1) {
row.unit_name = '篇';
}else{
row.unit_name = '字符';
}
}else{
row.unit_name = row.supply_unit_name;
}
},
// //
saveEdit(row, type) { saveEdit(row, type) {
row[type + 'PopoverVisible'] = false; // row[type + 'PopoverVisible'] = false; //
@ -388,7 +399,7 @@ export default {
let obj = {} let obj = {}
obj.uid = this.uid obj.uid = this.uid
obj.type = row.type obj.type = row.type
obj.unit_num = row.price_unit_num obj.unit_num = row.unit_num
if(row.price_unit == '元'){ if(row.price_unit == '元'){
obj.unit_price = row.price obj.unit_price = row.price
}else{ }else{
@ -396,7 +407,7 @@ export default {
} }
const res = await this.saveRequest('/agentnew/ajax_set_service_price', obj) const res = await this.saveRequest('/agentnew/ajax_set_service_price', obj)
if(res) row.price_desc = getServicePriceDesc(row.price, row.price_unit, row.price_unit_num); if(res) row.price_desc = getServicePriceDesc(row.price, row.price_unit, row.unit_num, row.unit_name);
}, },
async onSwitchChange(row){ async onSwitchChange(row){
let obj = {} let obj = {}

24
src/views/agent/siteTemplate.vue

@ -157,6 +157,16 @@ export default {
this.$router.push('/') this.$router.push('/')
return false; return false;
} }
//
const siteTplInfo = JSON.parse(localStorage.getItem('site_tpl_info'))
if(!this.$route.query.uid && siteTplInfo) {
this.tpl_id = siteTplInfo.site_tpl
this.pictureUrl = siteTplInfo.picture
this.previewUrl = siteTplInfo.preview
this.previewLogo = siteTplInfo.previewLogo
this.previewIco = siteTplInfo.previewIco
}
this.get_site_tpl_list(); this.get_site_tpl_list();
}, },
methods: { methods: {
@ -169,14 +179,16 @@ export default {
this.$http('POST', '/agentnew/ajax_get_site_tpl_list', obj).then(response => { this.$http('POST', '/agentnew/ajax_get_site_tpl_list', obj).then(response => {
if(response.status) { if(response.status) {
this.$nextTick(() => { this.$nextTick(() => {
if(!this.tpl_id) {
this.tpl_id = response.data.tpl_data.tpl_id this.tpl_id = response.data.tpl_data.tpl_id
this.pictureUrl = response.data.tpl_data.picture this.pictureUrl = response.data.tpl_data.picture
this.previewUrl = response.data.tpl_data.thumbnail this.previewUrl = response.data.tpl_data.thumbnail
this.tpl_customize = response.data.tpl_data.tpl_customize
this.is_public_tpl = response.data.tpl_data.is_public_tpl
this.priv_down_url = response.data.tpl_data.priv_down_url
this.previewLogo = response.data.tpl_data.site_tpl_logo this.previewLogo = response.data.tpl_data.site_tpl_logo
this.previewIco = response.data.tpl_data.site_tpl_ico this.previewIco = response.data.tpl_data.site_tpl_ico
this.tpl_customize = response.data.tpl_data.tpl_customize
this.priv_down_url = response.data.tpl_data.priv_down_url
}
this.is_public_tpl = response.data.tpl_data.is_public_tpl
this.templeteList = [...response.data.list] this.templeteList = [...response.data.list]
}) })
@ -200,6 +212,9 @@ export default {
site_tpl: this.tpl_id, site_tpl: this.tpl_id,
site_tpl_name: this.tpl_name, site_tpl_name: this.tpl_name,
picture: this.pictureUrl, picture: this.pictureUrl,
preview: this.previewUrl,
previewLogo: this.previewLogo,
previewIco: this.previewIco,
} }
localStorage.setItem('site_tpl_info', JSON.stringify(site_tpl_info)) localStorage.setItem('site_tpl_info', JSON.stringify(site_tpl_info))
this.$router.go(-1) this.$router.go(-1)
@ -211,9 +226,10 @@ export default {
this.formData.set('is_public_tpl', this.is_public_tpl) this.formData.set('is_public_tpl', this.is_public_tpl)
this.$http('POST', '/agentnew/ajax_update_site_tpl', this.formData).then(response => { this.$http('POST', '/agentnew/ajax_update_site_tpl', this.formData).then(response => {
if(response.status){ if(response.status){
this.$Message.success(response.info)
this.$router.go(-1) this.$router.go(-1)
return true
} }
this.$Message.error(response.info)
}).catch(error => { }).catch(error => {
console.error(error, 'error') console.error(error, 'error')
}) })

Loading…
Cancel
Save