Browse Source

个性化设置

pull/82/head
rainbro 3 days ago
parent
commit
1dc8ac9f1c
  1. 178
      src/views/agent/sitePersonalization.vue

178
src/views/agent/sitePersonalization.vue

@ -7,7 +7,8 @@
<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>
<GuipRadio class="flex" v-model="siteInfo.site_type" :options="siteInfo.site_types" label="" prop="site_type" /> <GuipRadio v-model="siteInfo.site_type" :options="siteInfo.site_types" label="" prop="site_type" @change="radioChange" label-key="" value-key="" />
<div class="tem-home"> <div class="tem-home">
<img class="tem-home-top" src="@/assets/register/tem-img-normal.png" alt=""> <img class="tem-home-top" src="@/assets/register/tem-img-normal.png" alt="">
<div class="tem-home-bottom"> <div class="tem-home-bottom">
@ -34,8 +35,8 @@
<div class="siteMessage flex-common mt12" id="siteMessage5"> <div class="siteMessage flex-common mt12" id="siteMessage5">
<h3>在线客服</h3> <h3>在线客服</h3>
<el-form ref="formRef"> <el-form ref="formRef">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="customerServiceTab" @tab-click="handleClick">
<p class="flex siteMessage5_desc"> <img src="@/assets/site/info_filled.svg" alt="">{{ textObj[activeName] }}</p> <p class="flex siteMessage5_desc"> <img src="@/assets/site/info_filled.svg" alt="">{{ textObj[customerServiceTab] }}</p>
<el-tab-pane label="网站客服" name="web_customer_service"> <el-tab-pane label="网站客服" name="web_customer_service">
<div class="flex-wrap"> <div class="flex-wrap">
<div class="flex-left"> <div class="flex-left">
@ -43,65 +44,71 @@
<GuipInput ref="GuipInput" class="mt12 mb24" v-model="siteInfo.wangwang" placeholder="请填写账号"> <GuipInput ref="GuipInput" class="mt12 mb24" v-model="siteInfo.wangwang" placeholder="请填写账号">
</GuipInput> </GuipInput>
<p class="flex-left-desc">QQ客服</p> <p class="flex-left-desc">QQ客服</p>
<div class="flex mt12">
<img v-if="siteInfo.qq_qrcode_path" :src="siteInfo.wx_qrcode_path" class="kefuImg mr-12">
<div class="qqCode-wrap"> <div class="qqCode-wrap">
<el-upload class="avatar-uploader mt12" accept=".jpg,.png" <el-upload class="avatar-uploader mt12" accept=".jpg"
action="/agentnew/ajax_update_site_kefu" :show-file-list="false" :on-change="handleQQkfChange" action="#" :multiple="false"
:on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload" slot="trigger"> :limit="Number(1)" ref="avatorUpload"
<GuipButton type="ignore" :btnstyle="{width:'133px'}"> :auto-upload="false">
<!-- <img src="@/assets/site/uploadIcon.svg" alt="" > --> <GuipButton class="upload-button" type="ignore" :btnstyle="{width:'133px'}">
<div class="bgImg"></div> <div class="bgImg"></div>
上传二维码</GuipButton> <span v-if="siteInfo.wx_qrcode_path">重新上传</span>
<span v-else>上传二维码</span>
</GuipButton>
</el-upload> </el-upload>
<p class="avatar-desc">支持 jpgpng 格式大小不超过 2MB </p> <p class="avatar-desc">仅支持JPG格式图片尺寸不大于200px * 200px </p>
</div>
</div> </div>
</div> </div>
<div class="flex-line"></div> <div class="flex-line"></div>
<div class="flex-right"> <div class="flex-right">
<p class="flex-left-desc">微信客服</p> <p class="flex-left-desc">微信客服</p>
<div class="flex mt12"> <div class="flex mt12">
<img v-if="imageUrl1" :src="imageUrl1" class="kefuImg"> <img v-if="siteInfo.wx_qrcode_path" :src="siteInfo.wx_qrcode_path" class="kefuImg mr-12">
<img e-else src="@/assets/site/kefuTem.png" alt="" class="kefuImg">
<div class="qqCode-wrap right"> <div class="qqCode-wrap right">
<el-upload class="avatar-uploader" accept=".jpg,.png" <el-upload class="avatar-uploader" accept=".jpg"
action="https://jsonplaceholder.typicode.com/posts/" :show-file-list="false" :on-change="handleWxkfChange" action="#" :multiple="false"
:on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload"> :limit="Number(1)" ref="avatorUpload"
<GuipButton type="ignore" :btnstyle="{width:'118px'}"> :auto-upload="false">
<!-- <img src="@/assets/site/uploadIcon.svg" alt="" > --> <GuipButton class="upload-button" type="ignore" :btnstyle="{width:'118px'}">
<div class="bgImg"></div> <div class="bgImg"></div>
重新上传 <span v-if="siteInfo.wx_qrcode_path">重新上传</span>
<span v-else>上传二维码</span>
</GuipButton> </GuipButton>
</el-upload> </el-upload>
<p class="avatar-desc">支持 jpgpng 格式大小不超过 2MB </p> <p class="avatar-desc">仅支持JPG格式图片尺寸不大于200px * 200px </p>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<GroupFormBtns @cancel="cancelClick" @confirm="updateSitWebCustomerService()" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="报告页客服" name="web_report_page_customer_service"> <el-tab-pane label="报告页客服" name="web_report_page_customer_service">
<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>
<div class="flex mt12"> <div class="flex mt12">
<img v-if="imageUrl2" :src="imageUrl2" class="kefuImg"> <img v-if="siteInfo.wxqrcode_report_path" :src="siteInfo.wxqrcode_report_path" class="kefuImg mr-12">
<img e-else src="@/assets/site/kefuTem.png" alt="" class="kefuImg">
<div class="qqCode-wrap right"> <div class="qqCode-wrap right">
<el-upload class="avatar-uploader" accept=".jpg,.png" <el-upload class="avatar-uploader" accept=".jpg"
action="https://jsonplaceholder.typicode.com/posts/" :show-file-list="false" :on-change="handleReportkfChange" action="#" :multiple="false"
:on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload"> :limit="Number(1)" ref="avatorUpload"
<GuipButton type="ignore" :btnstyle="{width:'118px'}"> :auto-upload="false">
<!-- <img src="@/assets/site/uploadIcon.svg" alt="" > --> <GuipButton class="upload-button" type="ignore" :btnstyle="{width:'118px'}">
<div class="bgImg"></div> <div class="bgImg"></div>
重新上传 <span v-if="siteInfo.wx_qrcode_path">重新上传</span>
<span v-else>上传二维码</span>
</GuipButton> </GuipButton>
</el-upload> </el-upload>
<p class="avatar-desc">支持 jpgpng 格式大小不超过 2MB </p> <p class="avatar-desc">仅支持JPG格式图片尺寸不大于200px * 200px </p>
</div> </div>
</div> </div>
</div> </div>
<div class="flex-line borderNone"></div> <div class="flex-line borderNone"></div>
<div class="flex-right"></div> <div class="flex-right"></div>
</div> </div>
<GroupFormBtns @cancel="cancelClick" @confirm="updateSiteReportCustomerService()" />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="支付账单客服" name="web_wx_customer_service"> <el-tab-pane label="支付账单客服" name="web_wx_customer_service">
<div class="flex-wrap"> <div class="flex-wrap">
@ -112,10 +119,10 @@
<div class="flex-line borderNone"></div> <div class="flex-line borderNone"></div>
<div class="flex-right"></div> <div class="flex-right"></div>
</div> </div>
<GroupFormBtns @cancel="cancelClick" @confirm="updateSiteCustomerService(siteInfo)" />
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</el-form> </el-form>
<GroupFormBtns @cancel="cancelClick" @confirm="updateSiteCustomerService(siteInfo)" />
</div> </div>
<div class="siteMessage flex-common mt12" id="siteMessage6"> <div class="siteMessage flex-common mt12" id="siteMessage6">
<h3>功能显隐</h3> <h3>功能显隐</h3>
@ -177,7 +184,7 @@
<span>查重60分钟内不可提交重复内容AI产品3分钟内不能重复提交</span> <span>查重60分钟内不可提交重复内容AI产品3分钟内不能重复提交</span>
<GuipSwitch :modelValue="siteInfo.is_allow_repeat_submit" :active-value="1" :inactive-value="0" activeText="开" inactiveText="关" @change="updateSiteRepeatSubmitConfig"></GuipSwitch> <GuipSwitch :modelValue="siteInfo.is_allow_repeat_submit" :active-value="1" :inactive-value="0" activeText="开" inactiveText="关" @change="updateSiteRepeatSubmitConfig"></GuipSwitch>
</div> </div>
<el-checkbox-group v-model="siteInfo.repeat_submit_fields" class="checkboxGroup"> <el-checkbox-group v-model="repeatSubmitFields" class="checkboxGroup" @change="updateSiteRepeatSubmitConfig">
<el-checkbox name="repeat_submit_fields" label="title">识别重复标题</el-checkbox> <el-checkbox name="repeat_submit_fields" label="title">识别重复标题</el-checkbox>
<el-checkbox name="repeat_submit_fields" label="author">识别重复作者</el-checkbox> <el-checkbox name="repeat_submit_fields" label="author">识别重复作者</el-checkbox>
<el-checkbox name="repeat_submit_fields" label="content">识别重复正文/辅助信息</el-checkbox> <el-checkbox name="repeat_submit_fields" label="content">识别重复正文/辅助信息</el-checkbox>
@ -226,7 +233,7 @@ export default {
GuipSwitch, GuipSwitch,
GuipToolTip, GuipToolTip,
GroupFormBtns, GroupFormBtns,
GuipRadio GuipRadio,
}, },
data() { data() {
return { return {
@ -234,13 +241,15 @@ export default {
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTAwNTM3MjQsIm5iZiI6MTc1MDA1MzcyNCwiZXhwIjoxNzUyNjQ1NzI0LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.xyIqBLelB-k6jCifgRevBJTyg_Qrm6m1e4OcHhOpepU', token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTAwNTM3MjQsIm5iZiI6MTc1MDA1MzcyNCwiZXhwIjoxNzUyNjQ1NzI0LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.xyIqBLelB-k6jCifgRevBJTyg_Qrm6m1e4OcHhOpepU',
// //
siteInfo: [], siteInfo: [],
formData:new FormData(),
repeatSubmitFields: [],
textObj: { textObj: {
'web_customer_service': '展示在网站右侧悬浮栏的客服,请至少设置1个', 'web_customer_service': '展示在网站悬浮栏的客服,请至少设置1个',
'web_report_page_customer_service': '展示在报告页右侧悬浮栏的客服,请至少设置1个', 'web_report_page_customer_service': '展示在报告页悬浮栏的客服,请至少设置1个',
'web_wx_customer_service': '显示在微信、支付宝账单详情中,方便用户联系' 'web_wx_customer_service': '显示在微信、支付宝账单详情中,方便用户联系'
}, },
activeName: 'web_customer_service', customerServiceTab: 'web_customer_service',
checkList1: ['识别重复辅助信息'], checkList1: ['识别重复辅助信息'],
// 线 // 线
personalForm3: { personalForm3: {
@ -291,7 +300,11 @@ export default {
that.siteInfo.is_display_price = Number(response.data.is_display_price) that.siteInfo.is_display_price = Number(response.data.is_display_price)
that.siteInfo.is_display_submit_page_price = Number(response.data.is_display_submit_page_price) that.siteInfo.is_display_submit_page_price = Number(response.data.is_display_submit_page_price)
that.siteInfo.is_allow_repeat_submit = Number(response.data.is_allow_repeat_submit) that.siteInfo.is_allow_repeat_submit = Number(response.data.is_allow_repeat_submit)
console.log(that.siteInfo.is_allow_repeat_submit) if (response.data.repeat_submit_fields) {
this.repeatSubmitFields = response.data.repeat_submit_fields
}
console.log(that.siteInfo.repeat_submit_fields, 'repeat_submit_fields')
}) })
}).catch(error => { }).catch(error => {
console.error(error, 'error') console.error(error, 'error')
@ -362,7 +375,7 @@ export default {
this.$http('POST', '/agentnew/ajax_update_site_repeatsubmit_config', { this.$http('POST', '/agentnew/ajax_update_site_repeatsubmit_config', {
uid: this.$route.query.uid, uid: this.$route.query.uid,
is_allow_repeat_submit: this.siteInfo.is_allow_repeat_submit==1 ? 0 : 1, is_allow_repeat_submit: this.siteInfo.is_allow_repeat_submit==1 ? 0 : 1,
repeat_submit_fields: this.siteInfo.repeat_submit_fields.join(',') repeat_submit_fields: this.repeatSubmitFields.join(',')
}, { }, {
headers: { headers: {
'Auth': this.token 'Auth': this.token
@ -393,6 +406,7 @@ export default {
}, },
cancelClick() { cancelClick() {
console.log('quxiao'); console.log('quxiao');
this.getSiteInfo();
}, },
updateSiteCustomerService(row) { updateSiteCustomerService(row) {
console.log(row, 'row'); console.log(row, 'row');
@ -417,6 +431,74 @@ export default {
console.error(error, 'error') console.error(error, 'error')
}) })
}, },
updateSitWebCustomerService() {
// for(let [key,value] of this.formData){
// console.log(key,value,'=====key');
// }
this.formData.set('wangwang', this.siteInfo.wangwang)
this.formData.set('uid', this.$route.query.uid)
this.$http('POST', '/agentnew/ajax_update_site_kefu',
this.formData
, {
headers: {
'Auth': this.token,
'Content-Type':'multipart/form-data'
}
}).then(response => {
this.$nextTick(() => {
if (response.status) {
this.$Message.success(response.info);
this.getSiteInfo();
} else {
this.$Message.error(response.info);
}
})
}).catch(error => {
console.error(error, 'error')
})
this.dialogVisibleCert = false;
},
updateSiteReportCustomerService() {
// for(let [key,value] of this.formData){
// console.log(key,value,'=====key');
// }
this.formData.set('uid', this.$route.query.uid)
this.$http('POST', '/agentnew/ajax_update_site_kefu',
this.formData
, {
headers: {
'Auth': this.token,
'Content-Type':'multipart/form-data'
}
}).then(response => {
this.$nextTick(() => {
if (response.status) {
this.$Message.success(response.info);
this.getSiteInfo();
} else {
this.$Message.error(response.info);
}
})
}).catch(error => {
console.error(error, 'error')
})
this.dialogVisibleCert = false;
},
handleQQkfChange(file, fileList) {
console.log(file, fileList)
let fileObj = file.raw
this.formData.set('qq_qrcode', fileObj)
},
handleWxkfChange(file, fileList) {
console.log(file, fileList)
let fileObj = file.raw
this.formData.set('wxqrcode', fileObj)
},
handleReportkfChange(file, fileList) {
console.log(file, fileList)
let fileObj = file.raw
this.formData.set('wx_report_qrcode', fileObj)
},
// //
handleAvatarSuccess(res, file) { handleAvatarSuccess(res, file) {
this.imageUrl1 = URL.createObjectURL(file.raw); this.imageUrl1 = URL.createObjectURL(file.raw);
@ -435,7 +517,11 @@ export default {
}, },
handleClick(tab, event) { handleClick(tab, event) {
console.log(tab, event); console.log(tab, event);
} },
//
radioChange(data) {
console.log(data, 'radio--data');
},
} }
} }
</script> </script>
@ -455,6 +541,10 @@ export default {
margin-bottom: 0; margin-bottom: 0;
} }
.mr-12 {
margin-right: 12px;
}
.site-personal-wrap { .site-personal-wrap {
width: 100%; width: 100%;
@ -564,9 +654,9 @@ export default {
// flex-direction: column; // flex-direction: column;
} }
.qqCode-wrap.right { // .qqCode-wrap.right {
margin: 0 0 8px 12px; // margin: 0 0 8px 12px;
} // }
.avatar-desc { .avatar-desc {
/* regular/body3-Regular */ /* regular/body3-Regular */
@ -584,6 +674,12 @@ export default {
} }
} }
.avatar-uploader{ .avatar-uploader{
.upload-button {
border-radius: 4px;
background: #F2F3F5;
box-sizing: border-box;
border: 1px solid #BABDC2;
}
.bgImg{ .bgImg{
width: 20px; width: 20px;
height: 16px; height: 16px;

Loading…
Cancel
Save