Browse Source

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

pull/79/head
zq 4 days ago
parent
commit
a0e2f7ece3
  1. 4
      src/components/paymentMethod.vue
  2. 10
      src/components/site/serviceSetting/domainSet.vue
  3. 70
      src/components/site/serviceSetting/linkSet.vue
  4. 65
      src/components/site/serviceSetting/paymentSet.vue
  5. 10
      src/components/site/serviceSetting/priceSet.vue
  6. 61
      src/components/site/serviceSetting/reportSeoSet.vue
  7. 71
      src/components/site/serviceSetting/showSet.vue
  8. 62
      src/components/site/serviceSetting/submitSeoSet.vue
  9. 184
      src/views/agent/sitePersonalization.vue
  10. 280
      src/views/agent/siteServiceEdit.vue

4
src/components/paymentMethod.vue

@ -13,7 +13,7 @@
</dd>
</dl>
<el-form>
<GuipSwitch :modelValue="item.status" active-value="1" inactive-value="0" activeText="开启" inactiveText="关闭" @change="onSwitchChange(item)">
<GuipSwitch :modelValue="item.status" :active-value="1" :inactive-value="0" activeText="开启" inactiveText="关闭" @change="onSwitchChange(item)">
</GuipSwitch>
</el-form>
</div>
@ -52,7 +52,7 @@ export default {
},
methods:{
onSwitchChange(data){
data.status = data.status == "1" ? "0" : "1";
data.status = data.status === 1 ? 0 : 1;
this.$emit('confirm', this.list)
},
onEnd() {

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

@ -6,14 +6,20 @@
<script>
export default {
name: '',
name: 'domainSet',
props:[],
components: {
},
data(){
return {
//
saveBtnStyleObj: {
width: '144px',
height: '46px',
borderRadius: '4px',
background: '#006AFF',
},
}
},
methods:{

70
src/components/site/serviceSetting/linkSet.vue

@ -9,19 +9,19 @@
<div class="flex-wrap">
<div class="flex-left">
<GuipFormItem column="column" label="首页链接">
<GuipInput slot="formDom" ref="GuipInput" class=" mb24" width="100%"
<GuipInput slot="formDom" ref="GuipInput" class=" mb24" width="100%" v-model="info.return_homepage_url"
placeholder="请输入首页链接" desc="您希望用户能找到服务的首页或您自建站点页面">
</GuipInput>
<el-checkbox slot="formDom">同步到本站的其他检测首页项上</el-checkbox>
<el-checkbox slot="formDom" @change="toggleSetSyncHome" v-model="syncHome">同步到本站的其他检测首页项上</el-checkbox>
</GuipFormItem>
</div>
<div class="flex-line "></div>
<div class="flex-right">
<GuipFormItem column="column" label="检测服务链接">
<GuipInput slot="formDom" ref="GuipInput" class=" mb24" width="100%"
<GuipInput slot="formDom" ref="GuipInput" class=" mb24" width="100%" v-model="info.go_check_url"
placeholder="请输入检测服务链接" desc="方便用户快速找到再次检测入口">
</GuipInput>
<el-checkbox slot="formDom">同步到本站的其他检测首页项上</el-checkbox>
<el-checkbox slot="formDom" @change="toggleSetSyncCheck" v-model="syncCheck">同步到本站的其他检测首页项上</el-checkbox>
</GuipFormItem>
</div>
</div>
@ -29,7 +29,7 @@
</div>
<div class="save-button">
<GuipButton type="primary" :btnstyle="saveBtnStyleObj">保存</GuipButton>
<GuipButton type="primary" :btnstyle="saveBtnStyleObj" @click="saveConfirm">保存</GuipButton>
</div>
</div>
</template>
@ -40,17 +40,69 @@ import GuipButton from "@/components/GuipButton.vue";
import GuipInput from "@/components/GuipInput.vue";
export default {
name: '',
props:[],
name: 'linkSet',
props: {
serviceInfo: {
type: Object,
required: true
}
},
components: {
GuipInput,
GuipButton, GuipFormItem
},
data(){
return {}
return {
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTAwNTM3MjQsIm5iZiI6MTc1MDA1MzcyNCwiZXhwIjoxNzUyNjQ1NzI0LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.xyIqBLelB-k6jCifgRevBJTyg_Qrm6m1e4OcHhOpepU',
info: {},
syncHome:false,
syncCheck:false,
//
saveBtnStyleObj: {
width: '144px',
height: '46px',
borderRadius: '4px',
background: '#006AFF',
},
}
},
mounted() {
this.info = this.serviceInfo
},
methods: {}
methods: {
toggleSetSyncHome(){
this.syncHome = !this.syncHome
},
toggleSetSyncCheck(){
this.syncCheck = !this.syncCheck
},
saveConfirm() {
let obj = {}
obj.uid = this.info.uid
obj.type = this.info.type
obj.return_home_url = this.info.return_homepage_url
obj.go_check_url = this.info.go_check_url
obj.is_sync_home = this.syncHome ? 1 : 0
obj.is_sync_check = this.syncCheck ? 1 : 0
const that = this
this.$http('POST', '/agentnew/ajax_update_service_link', obj,{
headers:{
'Auth': this.token
}
}).then(response => {
if(response.status){
that.$message.success('保存成功');
that.$emit('saveEvent', that.info)
return true;
}
that.$message.success(response.info);
}).catch(error => {
console.error(error, 'error')
})
},
}
}
</script>
<style lang="scss">

65
src/components/site/serviceSetting/paymentSet.vue

@ -9,8 +9,8 @@
<PaymentMethod :paymentList="payList" @confirm="confirmPayment"/>
</div>
<div class="save-button">
<GuipButton type="primary" :btnstyle="saveBtnStyleObj">保存</GuipButton>
<div class="save-button" v-if="payList && payList.length>0">
<GuipButton type="primary" :btnstyle="saveBtnStyleObj" @click="saveConfirm">保存</GuipButton>
</div>
</div>
</template>
@ -21,20 +21,71 @@ import PromptText from "@/components/PromptText.vue";
import GuipButton from "@/components/GuipButton.vue";
export default {
name: '',
props:[],
name: 'paymentSet',
props: {
serviceInfo: {
type: Object,
required: true
}
},
components: {
GuipButton,
PromptText, PaymentMethod
PromptText,
PaymentMethod
},
data(){
return {
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTAwNTM3MjQsIm5iZiI6MTc1MDA1MzcyNCwiZXhwIjoxNzUyNjQ1NzI0LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.xyIqBLelB-k6jCifgRevBJTyg_Qrm6m1e4OcHhOpepU',
payList:[],
//
saveBtnStyleObj: {
width: '144px',
height: '46px',
borderRadius: '4px',
background: '#006AFF',
},
}
},
mounted() {
if(this.serviceInfo) this.payList = this.serviceInfo.paylist
},
methods:{
confirmPayment(payList){
this.payList = payList
},
saveConfirm() {
let obj = {}
obj.uid = this.serviceInfo.uid
obj.type = this.serviceInfo.type
obj.info = ""
this.payList.forEach((row) => {
if(row.status === 1) {
let value = row.pay_type
if(row.id) value += ',' + row.id
obj.info = obj.info + ';' + value;
}
});
obj.info = obj.info.substr(1, obj.info.length-1);
const that = this
this.$http('POST', '/agentnew/ajax_payment_switch', obj,{
headers:{
'Auth': this.token
}
}).then(response => {
if(response.status){
that.$message.success('保存成功');
that.payList = response.data.paylist
that.$emit('saveEvent', that.payList)
return true;
}
that.$message.success(response.info);
}).catch(error => {
console.error(error, 'error')
})
},
}
}
</script>

10
src/components/site/serviceSetting/priceSet.vue

@ -6,14 +6,20 @@
<script>
export default {
name: '',
name: 'priceSet',
props:[],
components: {
},
data(){
return {
//
saveBtnStyleObj: {
width: '144px',
height: '46px',
borderRadius: '4px',
background: '#006AFF',
},
}
},
methods:{

61
src/components/site/serviceSetting/reportSeoSet.vue

@ -12,18 +12,20 @@
<div class="flex-left">
<GuipFormItem column="column" class="mb24" label="报告页标题(T:title)">
<GuipInput slot="formDom" ref="GuipInput" class=" mb24" width="100%"
placeholder="建议80字内">
placeholder="建议80字内" v-model="info.seo_report_title">
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" label="报告页关键词(K:keyword)">
<GuipInput slot="formDom" ref="GuipInput" width="100%" height="68px" type="textarea">
<GuipInput slot="formDom" ref="GuipInput" width="100%" height="68px"
type="textarea" v-model="info.seo_report_keyword">
</GuipInput>
</GuipFormItem>
</div>
<div class="flex-line "></div>
<div class="flex-right">
<GuipFormItem column="column" label="报告页描述(D:description)">
<GuipInput slot="formDom" ref="GuipInput" width="100%" height="160px" type="textarea">
<GuipInput slot="formDom" ref="GuipInput" width="100%" height="160px"
type="textarea" v-model="info.seo_report_desc">
</GuipInput>
</GuipFormItem>
</div>
@ -32,7 +34,7 @@
</div>
<div class="save-button">
<GuipButton type="primary" :btnstyle="saveBtnStyleObj">保存</GuipButton>
<GuipButton type="primary" :btnstyle="saveBtnStyleObj" @click="saveConfirm">保存</GuipButton>
</div>
</div>
</template>
@ -44,17 +46,60 @@ import GuipButton from "@/components/GuipButton.vue";
import GuipInput from "@/components/GuipInput.vue";
export default {
name: '',
props:[],
name: 'reportSeoSet',
props: {
serviceInfo: {
type: Object,
required: true
}
},
components: {
GuipInput,
GuipButton, PromptText, GuipFormItem
},
data(){
return {}
return {
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTAwNTM3MjQsIm5iZiI6MTc1MDA1MzcyNCwiZXhwIjoxNzUyNjQ1NzI0LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.xyIqBLelB-k6jCifgRevBJTyg_Qrm6m1e4OcHhOpepU',
info: {},
//
saveBtnStyleObj: {
width: '144px',
height: '46px',
borderRadius: '4px',
background: '#006AFF',
},
}
},
mounted() {
this.info = this.serviceInfo
},
methods: {}
methods: {
saveConfirm() {
let obj = {}
obj.uid = this.info.uid
obj.type = this.info.type
obj.report_title = this.info.seo_report_title
obj.report_keyword = this.info.seo_report_keyword
obj.report_desc = this.info.seo_report_desc
const that = this
this.$http('POST', '/agentnew/ajax_update_service_report_page_seo', obj,{
headers:{
'Auth': this.token
}
}).then(response => {
if(response.status){
that.$message.success('保存成功');
that.$emit('saveEvent', that.info)
return true;
}
that.$message.success(response.info);
}).catch(error => {
console.error(error, 'error')
})
},
}
}
</script>
<style lang="scss">

71
src/components/site/serviceSetting/showSet.vue

@ -14,17 +14,17 @@
<div class="flex-left">
<GuipFormItem column="column" label="服务别名">
<GuipInput slot="formDom" ref="GuipInput" class=" mb24" width="100%"
placeholder="建议80字内" desc="展示在用户端的服务名称">
placeholder="建议80字内" desc="展示在用户端的服务名称" v-model="info.title">
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" label="服务广告词">
<GuipInput slot="formDom" ref="GuipInput" class=" mb24" width="100%"
placeholder="建议20字内" desc="用来简短概括的解释服务">
placeholder="建议20字内" desc="用来简短概括的解释服务" v-model="info.subtitle">
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" label="服务描述">
<GuipInput slot="formDom" ref="GuipInput" width="100%" height="160px" type="textarea"
desc="用来详细的解释服务">
desc="用来详细的解释服务" v-model="info.desc">
</GuipInput>
</GuipFormItem>
</div>
@ -52,7 +52,8 @@
<p class="card-desc">控制首页是否显示本服务</p>
</div>
<el-form>
<GuipSwitch active-value="1" inactive-value="0" activeText="开启" inactiveText="关闭">
<GuipSwitch :modelValue="info.is_index_display" :active-value="1" :inactive-value="0"
activeText="开启" inactiveText="关闭" @change="onSwitchChange('is_index_display')">
</GuipSwitch>
</el-form>
</div>
@ -62,7 +63,8 @@
<p class="card-desc">本服务检测页面是否展示价格</p>
</div>
<el-form>
<GuipSwitch active-value="1" inactive-value="0" activeText="开启" inactiveText="关闭">
<GuipSwitch :modelValue="info.is_display_price" :active-value="1" :inactive-value="0"
activeText="开启" inactiveText="关闭" @change="onSwitchChange('is_display_price')">
</GuipSwitch>
</el-form>
</div>
@ -75,7 +77,8 @@
<p class="card-desc">开启即上推荐位</p>
</div>
<el-form>
<GuipSwitch active-value="1" inactive-value="0" activeText="开启" inactiveText="关闭">
<GuipSwitch :modelValue="info.is_recommend" :active-value="1" :inactive-value="0"
activeText="开启" inactiveText="关闭" @change="onSwitchChange('is_recommend')">
</GuipSwitch>
</el-form>
</div>
@ -85,7 +88,7 @@
</div>
<div class="save-button">
<GuipButton type="primary" :btnstyle="saveBtnStyleObj">保存</GuipButton>
<GuipButton type="primary" :btnstyle="saveBtnStyleObj" @click="saveConfirm">保存</GuipButton>
</div>
</div>
</template>
@ -99,8 +102,13 @@ import GuipInput from "@/components/GuipInput.vue";
import GuipButton from "@/components/GuipButton.vue";
export default {
name: '',
props:[],
name: 'showSet',
props: {
serviceInfo: {
type: Object,
required: true
}
},
components: {
GuipButton,
GuipInput, PromptText, GuipSwitch, GuipFormItem, HoverButton
@ -108,18 +116,55 @@ export default {
},
data(){
return {
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTAwNTM3MjQsIm5iZiI6MTc1MDA1MzcyNCwiZXhwIjoxNzUyNjQ1NzI0LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.xyIqBLelB-k6jCifgRevBJTyg_Qrm6m1e4OcHhOpepU',
info:{},
//
saveBtnStyleObj: {
width: '144px',
height: '46px',
borderRadius: '4px',
background: '#006AFF',
},
}
},
mounted() {
this.info = this.serviceInfo
},
methods:{
onSwitchChange(attr){
this.info[attr] = this.info[attr] === 1 ? 0 : 1
},
saveConfirm() {
let obj = {}
obj.uid = this.info.uid
obj.type = this.info.type
obj.title = this.info.title
obj.subtitle = this.info.subtitle
obj.desc = this.info.desc
obj.is_display_price = this.info.is_display_price
obj.is_index_display = this.info.is_index_display
obj.is_recommend = this.info.is_recommend
const that = this
this.$http('POST', '/agentnew/ajax_update_service_show', obj,{
headers:{
'Auth': this.token
}
}).then(response => {
if(response.status){
that.$message.success('保存成功');
that.$emit('saveEvent', that.info)
return true;
}
that.$message.success(response.info);
}).catch(error => {
console.error(error, 'error')
})
},
}
}
</script>
<style lang="scss">
.flex-right{
text-align: left;
}
.card-item{
padding: 24px;
display: flex;

62
src/components/site/serviceSetting/submitSeoSet.vue

@ -12,19 +12,20 @@
<div class="flex-left">
<GuipFormItem column="column" class="mb24" label="提交页标题(T:title)">
<GuipInput slot="formDom" ref="GuipInput" class=" mb24" width="100%"
placeholder="建议80字内">
placeholder="建议80字内" v-model="info.seo_form_title">
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" label="提交页关键词(K:keyword)">
<GuipInput slot="formDom" ref="GuipInput" width="100%" height="68px" type="textarea">
<GuipInput slot="formDom" ref="GuipInput" width="100%" height="68px"
type="textarea" v-model="info.seo_form_keyword">
</GuipInput>
</GuipFormItem>
</div>
<div class="flex-line "></div>
<div class="flex-right">
<GuipFormItem column="column" label="提交页描述(D:description)">
<GuipInput slot="formDom" ref="GuipInput" width="100%" height="160px" type="textarea">
<GuipInput slot="formDom" ref="GuipInput" width="100%" height="160px"
type="textarea" v-model="info.seo_form_desc">
</GuipInput>
</GuipFormItem>
</div>
@ -33,7 +34,7 @@
</div>
<div class="save-button">
<GuipButton type="primary" :btnstyle="saveBtnStyleObj">保存</GuipButton>
<GuipButton type="primary" :btnstyle="saveBtnStyleObj" @click="saveConfirm">保存</GuipButton>
</div>
</div>
</template>
@ -45,17 +46,60 @@ import GuipButton from "@/components/GuipButton.vue";
import GuipInput from "@/components/GuipInput.vue";
export default {
name: '',
props:[],
name: 'submitSeoSet',
props: {
serviceInfo: {
type: Object,
required: true
}
},
components: {
GuipInput,
GuipButton, PromptText, GuipFormItem
},
data(){
return {}
return {
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTAwNTM3MjQsIm5iZiI6MTc1MDA1MzcyNCwiZXhwIjoxNzUyNjQ1NzI0LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.xyIqBLelB-k6jCifgRevBJTyg_Qrm6m1e4OcHhOpepU',
info: {},
//
saveBtnStyleObj: {
width: '144px',
height: '46px',
borderRadius: '4px',
background: '#006AFF',
},
}
},
methods: {}
mounted() {
this.info = this.serviceInfo
},
methods: {
saveConfirm() {
let obj = {}
obj.uid = this.info.uid
obj.type = this.info.type
obj.submit_title = this.info.seo_form_title
obj.submit_keyword = this.info.seo_form_keyword
obj.submit_desc = this.info.seo_form_desc
const that = this
this.$http('POST', '/agentnew/ajax_update_service_submit_page_seo', obj,{
headers:{
'Auth': this.token
}
}).then(response => {
if(response.status){
that.$message.success('保存成功');
that.$emit('saveEvent', that.info)
return true;
}
that.$message.success(response.info);
}).catch(error => {
console.error(error, 'error')
})
},
}
}
</script>
<style lang="scss">

184
src/views/agent/sitePersonalization.vue

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

280
src/views/agent/siteServiceEdit.vue

@ -2,17 +2,14 @@
<div class="main-content12">
<!-- 参数 在子组件页面一样用 props接收 ref绑定的组件示例 -->
<!-- 默认页面展示 的初始组件 Franchise-->
<component :is="componentsName ? componentsName : 'showSet'" ref="dynamicComponent"
:someProp="payinfo" @customEvent="handleComponentEvent"/>
<component :is="componentsName ? componentsName : 'priceSet'" ref="dynamicComponent" :key="tableKey"
:serviceInfo="siteServiceInfo" @saveEvent="handleSaveEvent"/>
</div>
</template>
<script>
import store from '@/store';
import { mapState } from 'vuex';
import GuipSwitch from '@/components/GuipSwitch.vue';
import GuipButton from '@/components/GuipButton.vue';
import HoverButton from '@/components/HoverButton.vue'
import priceSet from '@/components/site/serviceSetting/priceSet.vue'
import paymentSet from '@/components/site/serviceSetting/paymentSet.vue'
import showSet from '@/components/site/serviceSetting/showSet.vue'
@ -27,9 +24,6 @@ export default {
name: 'siteServiceEdit',
props: [''],
components: {
GuipSwitch,
GuipButton,
HoverButton,
priceSet,
paymentSet,
showSet,
@ -43,6 +37,8 @@ export default {
return {
// AUTH
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTAwNTM3MjQsIm5iZiI6MTc1MDA1MzcyNCwiZXhwIjoxNzUyNjQ1NzI0LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.xyIqBLelB-k6jCifgRevBJTyg_Qrm6m1e4OcHhOpepU',
siteServiceInfo:{},
tableKey:Date.now(),
payinfo: [
{
type: 'a',
@ -59,132 +55,176 @@ export default {
...mapState(['pageTitle', 'componentsName']), // VuexshowSidebar
},
created() {
if(!this.$route.query.uid && !this.$route.query.type) {
this.$message.error('非法请求');
this.$router.push('/agent/siteList')
}
this.uid = this.$route.query.uid;
this.type = this.$route.query.type;
store.commit('SET_CUSTOMIZE', true);
store.commit('SET_SLIDER_MENU', 'siteServiceSettingData');
this.getSiteServiceInfo()
this.getPayList()
},
mounted() {
store.commit('SET_PAGETITLE', '支付授权');
store.commit('SET_PAGETITLE', '服务设置');
},
methods: {
handleComponentEvent(payload) {
handleSaveEvent(payload) {
console.log('收到子组件事件:', payload);
},
submitSave() {
//
//
const componentInstance = this.$refs.dynamicComponent;
console.log('当前组件实例:', componentInstance);
//
if (componentInstance) {
console.log('获取到啦');
//
componentInstance.showDomainModal && componentInstance.showDomainModal()
}
getSiteServiceInfo() {
const that = this
that.payList = []
this.$http('POST', '/agentnew/ajax_get_service_info', {
uid: that.uid,
type: that.type,
},{
headers:{
'Auth': this.token
}
}).then(response => {
that.$nextTick(() => {
that.siteServiceInfo = response.data.service_info
that.siteServiceInfo.paylist = []
this.tableKey = Date.now();
})
}).catch(error => {
console.error(error, 'error')
})
},
getPayList() {
const that = this
that.payList = []
this.$http('POST', '/agentnew/ajax_get_service_pay_list', {
uid: that.uid,
type: that.type,
},{
headers:{
'Auth': this.token
}
}).then(response => {
this.$nextTick(() => {
that.siteServiceInfo.paylist = response.data.paylist
that.tableKey = Date.now();
})
}).catch(error => {
console.error(error, 'error')
})
},
}
}
</script>
<style lang="scss" scoped>
a {
text-decoration: none;
color: #006AFF;
}
.gray {
color: #626573 !important;
}
//a {
// text-decoration: none;
// color: #006AFF;
//}
//
//.gray {
// color: #626573 !important;
//}
//
//.mt-18 {
// margin-top: 18px;
//}
//
//.ml-23 {
// margin-left: 23px;
//}
//
//.justify-content-space-between {
// justify-content: space-between;
//}
//
//.beforeNotice {
//
// h4 {
// margin: 0;
// gap: 8px;
// justify-content: space-between;
// }
//
// margin-bottom: 18px;
// text-align: left;
// box-sizing: border-box;
// padding: 20px 14px;
// border-radius: 4px;
// /* middle/middle_grey_0 */
// background: #FAFAFA;
//
// div {
// margin-top: 2px;
// padding-left: 23px;
//
// p {
// color: #8A9099;
// }
//
// }
//
// p {
// color: #1E2226;
//
// i {
// font-style: normal;
// }
//
// &:last-child {
// display: flex;
// align-items: stretch;
//
// b {
// font-weight: normal;
// color: #8A9099;
// display: inline-flex;
//
// img {
// margin-left: 4px;
// }
// }
// }
// }
//
// a {
// text-decoration: none;
// color: #006AFF;
// margin-right: 10px;
//
// img {
// margin-left: 5px;
// margin-right: 5px;
// }
// }
//}
.mt-18 {
margin-top: 18px;
}
.ml-23 {
margin-left: 23px;
}
//.siteMessage {
// border-radius: 4px;
// transition: all .5s;
// border: 1px solid transparent;
//}
//
//.siteMessage h3 {
// font-size: 14px;
// font-weight: bold;
// line-height: normal;
// letter-spacing: 0.08em;
// color: #1E2226;
//}
//
//.site-setting-wrap {
// width: 100%;
//}
.justify-content-space-between {
justify-content: space-between;
}
.beforeNotice {
h4 {
margin: 0;
gap: 8px;
justify-content: space-between;
}
margin-bottom: 18px;
::v-deep .flex-left{
text-align: left;
box-sizing: border-box;
padding: 20px 14px;
border-radius: 4px;
/* middle/middle_grey_0 */
background: #FAFAFA;
div {
margin-top: 2px;
padding-left: 23px;
p {
color: #8A9099;
}
}
p {
color: #1E2226;
i {
font-style: normal;
}
&:last-child {
display: flex;
align-items: stretch;
b {
font-weight: normal;
color: #8A9099;
display: inline-flex;
img {
margin-left: 4px;
}
}
}
}
a {
text-decoration: none;
color: #006AFF;
margin-right: 10px;
img {
margin-left: 5px;
margin-right: 5px;
}
}
}
.siteMessage {
border-radius: 4px;
transition: all .5s;
border: 1px solid transparent;
}
.siteMessage h3 {
font-size: 14px;
font-weight: bold;
line-height: normal;
letter-spacing: 0.08em;
color: #1E2226;
}
.site-setting-wrap {
width: 100%;
::v-deep .flex-right{
text-align: left;
}
::v-deep .mb16{
@ -221,4 +261,14 @@ a {
padding: 16px 0;
}
::v-deep .payment-item{
width: 540px;
height: 95px;
padding: 0 24px;
background: #FAFAFA;
border-radius: 4px;
border: none;
margin-bottom: 12px;
}
</style>
Loading…
Cancel
Save