zq-realTimeTem #87

Merged
pengda merged 25 commits from zq-realTimeTem into master 4 days ago
  1. BIN
      src/assets/site/back_icon.png
  2. BIN
      src/assets/site/next-line.png
  3. 1
      src/assets/site/site-h5.svg
  4. 1
      src/assets/site/site-mp.svg
  5. 1
      src/assets/site/site-web.svg
  6. BIN
      src/assets/site/step_error.png
  7. BIN
      src/assets/site/step_success.png
  8. 54
      src/components/CustomDropdown.vue
  9. 7
      src/components/GuipDialog.vue
  10. 207
      src/components/ImgUpload.vue
  11. 359
      src/components/domainBind.vue
  12. 41
      src/components/preview/logoBack_color.vue
  13. 123
      src/components/site/serviceSetting/domainSet.vue
  14. 6
      src/components/site/serviceSetting/linkSet.vue
  15. 118
      src/components/site/serviceSetting/menuColorSet.vue
  16. 8
      src/components/site/serviceSetting/paymentSet.vue
  17. 146
      src/components/site/serviceSetting/priceSet.vue
  18. 6
      src/components/site/serviceSetting/reportSeoSet.vue
  19. 307
      src/components/site/serviceSetting/showSet.vue
  20. 6
      src/components/site/serviceSetting/submitSeoSet.vue
  21. 2
      src/views/agent/siteServiceAdd.vue
  22. 5
      src/views/agent/siteServiceEdit.vue
  23. 6
      src/views/agent/siteServiceList.vue
  24. 9
      src/views/elementGroups.vue

BIN
src/assets/site/back_icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

BIN
src/assets/site/next-line.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

1
src/assets/site/site-h5.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="40" height="40" viewBox="0 0 40 40"><defs><clipPath id="master_svg0_242_042053"><rect x="0" y="0" width="40" height="40" rx="20"/></clipPath><clipPath id="master_svg1_242_042054"><rect x="6" y="6" width="28" height="28" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_242_042053)"><rect x="0" y="0" width="40" height="40" rx="20" fill="#E8F1FD" fill-opacity="1"/><g clip-path="url(#master_svg1_242_042054)"><g><path d="M28.8937,28.7992Q28.8937,29.4882,28.6181,30.0807Q28.3425,30.6732,27.8602,31.128Q27.378,31.5827,26.7303,31.8445Q26.082700000000003,32.106300000000005,25.3386,32.106300000000005L15.55512,32.106300000000005Q14.81102,32.106300000000005,14.16339,31.8445Q13.51575,31.5827,13.03346,31.128Q12.551181,30.6732,12.27559,30.0807Q11.999999465942,29.4882,12,28.7992L12,10.33465Q12,9.645669999999999,12.275591,9.03937Q12.551182,8.43307,13.03347,7.978346Q13.51575,7.523622,14.16339,7.261811Q14.81102,7.000000150204,15.55512,7L25.3386,7Q26.082700000000003,7,26.7303,7.261811Q27.378,7.523622,27.8602,7.978346Q28.3425,8.43307,28.6181,9.03937Q28.8937,9.645669999999999,28.8937,10.33465L28.8937,28.7992ZM26.6614,11.65748L14.20472,11.65748L14.20472,27.4488L26.6614,27.4488L26.6614,11.65748ZM20.43307,28.2205Q19.85433,28.2205,19.42717,28.6339Q19,29.0472,19,29.6535Q19,30.2323,19.42717,30.6594Q19.85433,31.0866,20.43307,31.0866Q21.039369999999998,31.0866,21.452759999999998,30.6594Q21.86614,30.2323,21.86614,29.6535Q21.86614,29.0472,21.452759999999998,28.6339Q21.039369999999998,28.2205,20.43307,28.2205ZM22.6378,9.31496Q22.6378,9.09449,22.5,8.97047Q22.3622,8.84646,22.1969,8.84646L18.69685,8.84646Q18.55906,8.84646,18.40748,8.97047Q18.25591,9.09449,18.25591,9.31496Q18.25591,9.53543,18.3937,9.65945Q18.5315,9.78347,18.69685,9.78347L22.1968,9.78347Q22.3622,9.78347,22.5,9.65945Q22.6378,9.53543,22.6378,9.31496Z" fill="#006AFF" fill-opacity="1"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

1
src/assets/site/site-mp.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.0 KiB

1
src/assets/site/site-web.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="40" height="40" viewBox="0 0 40 40"><defs><clipPath id="master_svg0_242_041966"><rect x="0" y="0" width="40" height="40" rx="20"/></clipPath><clipPath id="master_svg1_242_041967"><rect x="6.2607421875" y="6.26171875" width="27.826087951660156" height="27.826087951660156" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_242_041966)"><rect x="0" y="0" width="40" height="40" rx="20" fill="#E8F1FD" fill-opacity="1"/><g clip-path="url(#master_svg1_242_041967)"><g><path d="M29.9783,9.3046875L10.36957,9.3046875C9.0625,9.3046875,8,10.3807775,8,11.7041475L8,23.9242875C8,25.2475875,9.0625,26.3236875,10.36957,26.3236875L18.4837,26.3236875L14.141300000000001,31.0437875L26.2065,31.0437875L21.8641,26.3236875L29.9783,26.3236875C31.2853,26.3236875,32.3478,25.2475875,32.3478,23.9242875L32.3478,11.7041475C32.3478,10.3807775,31.2853,9.3046875,29.9783,9.3046875ZM9.72283,11.7041475C9.72283,11.3427275,10.01359,11.0492575,10.36957,11.0492575L29.9783,11.0492575C30.3342,11.0492575,30.625,11.3427275,30.625,11.7041475L30.625,19.9948875L9.72283,19.9948875L9.72283,11.7041475Z" fill="#006AFF" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
src/assets/site/step_error.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

BIN
src/assets/site/step_success.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 B

54
src/components/CustomDropdown.vue

@ -1,29 +1,27 @@
<template>
<div class="custom-select" v-clickaway="closeDropdown" ref="dropdown" :class="{ 'is-open': isOpen }"
:style="{ width }">
<div class="custom-select" v-clickaway="closeDropdown" ref="dropdown" :class="{ 'is-open': isOpen }" :style="{width}">
<!-- 触发按钮 -->
<div class="select-trigger" @click="toggleDropdown">
<slot name="trigger">
{{ selectedItem ? selectedItem[displayKey] : placeholder }}
{{ selectedItem && selectedItem[displayKey] ? selectedItem[displayKey] : placeholder }}
</slot>
<img class="arrow-icon"
:src="isOpen ? require('../assets/dropDown_open.png') : require('../assets/dropDown_expand.png')" alt="">
<img class="arrow-icon" :src="isOpen? require('../assets/dropDown_open.png'):require('../assets/dropDown_expand.png')" alt="">
</div>
<!-- 下拉内容 -->
<transition name="slide-fade">
<div v-if="isOpen" class="select-dropdown">
<slot v-if="isOpen" name="normal"></slot>
<div v-if="options">
<div v-for="(item, index) in options" :key="index" class="dropdown-item "
<div v-if="options && options.length">
<div v-for="(item, index) in options" :key="index" class="dropdown-item"
:class="{ 'is-selected': isSelected(item) }" @click="selectItem(item)">
<slot name="item" :item="item">
<div class="flex-between">
<div class="flex-between" v-if="item">
<div class="left">
<p class="one">{{ item[displayKey] }}</p>
</div>
<div class="right">
<img v-if="selectedItem[displayKey] == item[displayKey]"
<img v-if="selectedItem && selectedItem[displayKey] === item[displayKey]"
src="../assets/register/drop-selected.svg" alt="">
</div>
</div>
@ -56,10 +54,15 @@ export default {
options: {
type: Array,
default: () => [],
validator: (value) => {
return Array.isArray(value) && value.every(item =>
item && typeof item === 'object'
)
}
},
options_null: {
type: Object,
default: () => { },
default: () => {},
},
placeholder: {
type: String,
@ -71,7 +74,7 @@ export default {
},
valueKey: {
type: String,
default: "value",
default: "value",
},
displayKey: {
type: String,
@ -88,9 +91,25 @@ export default {
value: {
immediate: true,
handler(newVal) {
this.selectedItem = this.options.find((item) => item[this.valueKey] === newVal);
if (this.options && this.options.length && newVal !== undefined && newVal !== null) {
this.selectedItem = this.options.find((item) =>
item && item[this.valueKey] === newVal
) || null;
}
},
},
options: {
immediate: true,
handler(newVal) {
if (newVal && newVal.length && this.value !== undefined && this.value !== null) {
this.selectedItem = newVal.find((item) =>
item && item[this.valueKey] === this.value
) || null;
} else {
this.selectedItem = null;
}
}
}
},
created() {
//
@ -105,21 +124,24 @@ export default {
this.isOpen = false;
},
toggleDropdown(e) {
if (e) {
e.stopPropagation();
if(e) e.stopPropagation();
if (!this.options || !this.options.length) {
console.warn('Dropdown options are empty');
return;
}
//
EventBus.$emit('close-all-dropdowns')
this.isOpen = !this.isOpen;
},
selectItem(item) {
if (!item) return;
this.selectedItem = item;
this.$emit("input", item[this.valueKey]); // Use the specified valueKey
this.$emit("input", item[this.valueKey]);
this.$emit("change", item);
this.isOpen = false;
},
isSelected(item) {
return this.selectedItem && this.selectedItem[this.valueKey] === item[this.valueKey];
return item && this.selectedItem && this.selectedItem[this.valueKey] === item[this.valueKey];
},
selectNullItem() {
this.$emit("changeNormal", '');

7
src/components/GuipDialog.vue

@ -12,7 +12,7 @@
<!-- 自定义内容 -->
<slot></slot>
<!-- 底部按钮 -->
<span slot="footer" :class="[type == 'center' ? 'dialog-footer-center' : 'dialog-footer-normal', 'flex']" style="justify-content: space-between;">
<span v-if="showFooterButton" slot="footer" :class="[type == 'center' ? 'dialog-footer-center' : 'dialog-footer-normal', 'flex']" style="justify-content: space-between;">
<GuipButton v-if="showCancelButton" @click="handleCancel" type="ignore" >{{ cancelText }}</GuipButton>
<GuipButton type="primary" @click="handleConfirm">{{ confirmText }}</GuipButton>
</span>
@ -54,6 +54,11 @@
type: Boolean,
default: true,
},
//
showFooterButton: {
type: Boolean,
default: true,
},
//
cancelText: {
type: String,

207
src/components/ImgUpload.vue

@ -0,0 +1,207 @@
<template>
<div class="upload-wrapper">
<!-- 预览图片 -->
<div class="image-list" v-if="previewList.length>0">
<div class="image-box"
v-for="(item, index) in previewList" :key="index">
<img :src="item.url" class="image-preview" />
<!-- <i class="el-icon-close delete-icon" @click.stop="removeImage(index)" />-->
</div>
</div>
<!-- 上传按钮 -->
<el-upload
class="image-uploader"
action=""
:http-request="uploadHandler"
:show-file-list="false"
:before-upload="beforeUpload"
:accept="acceptMime"
>
<GuipButton class="upload-button" type="ignore" :btnstyle="btnStyle">
<div class="bgImg"></div>
<span>选择图片</span>
</GuipButton>
</el-upload>
</div>
</template>
<script>
import GuipButton from "@/components/GuipButton.vue";
export default {
name: "ImgUpload",
components: {GuipButton},
props: {
value: {
type: [Array, File, null],
default: () => []
},
defaultUrls: {
type: Array,
default: () => []
},
acceptTypes: {
type: Array,
default: () => ['jpg', 'png']
},
sizeLimit: {
type: Number,
default: 2 // MB
},
btnStyle:{
type: Object,
default() {
return {
width: '118px',
color: '#23242B',
border: '1px solid #BABDC2',
background: '#F2F3F5',
'border-radius': '4px'
};
}
},
maxCount: {
type: Number,
default: 1
}
},
data() {
return {
previewList: [],
initialized: false
};
},
watch: {
defaultUrls(newUrls) {
if (!this.initialized && Array.isArray(newUrls) && newUrls.length) {
this.previewList = newUrls
.filter(url => !!url)
.map(url => ({ url }));
this.initialized = true;
}
}
},
computed: {
// MIME <el-upload accept="">
acceptMime() {
const map = {
jpg: 'image/jpeg',
jpeg: 'image/jpeg',
png: 'image/png',
webp: 'image/webp',
gif: 'image/gif'
};
return this.acceptTypes
.map(ext => map[ext.toLowerCase()])
.filter(Boolean)
.join(',');
}
},
methods: {
beforeUpload(file) {
if(this.maxCount === 1){
this.previewList = []
}
if (this.previewList.length >= this.maxCount) {
this.$message.warning(`最多只能上传 ${this.maxCount} 张图片`);
return false;
}
const isImage = file.type.startsWith("image/");
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isImage) {
this.$message.error("只能上传图片格式!");
return false;
}
if (!isLt2M) {
this.$message.error("图片大小不能超过 2MB!");
return false;
}
const allowedTypes = this.acceptMime.split(',');
if (!allowedTypes.includes(file.type)) {
this.$message.error(`只允许上传 ${this.acceptTypes.join('/').toUpperCase()} 格式图片!`);
return false;
}
const url = URL.createObjectURL(file);
if(this.maxCount === 1){
this.previewList = [{ file, url }];
this.$emit('input', { file, url });
} else {
this.previewList.push({ file, url });
const files = this.previewList
.filter(item => item.file)
.map(item => item.file);
this.$emit('input', files);
}
return false;
},
uploadHandler() {
// 使 file
},
removeImage(index) {
this.previewList.splice(index, 1);
const files = this.previewList
.filter(item => item.file)
.map(item => item.file);
this.$emit('input', files);
}
}
};
</script>
<style scoped>
.upload-wrapper {
}
.image-list {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 10px;
}
.image-box {
position: relative;
width: 100px;
height: 100px;
}
.image-preview {
width: 100%;
height: 100%;
object-fit: cover;
border: 1px solid #ccc;
border-radius: 4px;
}
.delete-icon {
position: absolute;
top: -6px;
right: -6px;
font-size: 16px;
color: white;
background: #f56c6c;
border-radius: 50%;
padding: 2px;
cursor: pointer;
}
.bgImg{
width: 20px;
height: 16px;
margin-right: 6px;
background-image: url(@/assets/site/uploadIcon.svg);
}
.upload-button:hover{
border: 1px solid #006AFF!important;
}
.upload-button:hover .bgImg {
background-image: url(@/assets/site/uploadIcon_light.svg);
}
.upload-button:hover span {
color: #006AFF;
}
</style>

359
src/components/domainBind.vue

@ -0,0 +1,359 @@
<template>
<div>
<el-form class="el-row demo-ruleForm" ref="formRef" v-if="domainOptions.length>0" :rules="rules" :model="data">
<GuipFormItem column="column" class="combo-formItem w540" :label="label" :class="label ? '' : 'combo-formItem-nolabel'">
<div slot="formDom" class="self-drop-wrap flex w540">
<GuipInput prop="prefix" v-model="data.prefix" style="width: 60%;" placeholder="仅支持数字、字母" @blur="inputEnd"></GuipInput>
<!-- 只用作选中内容展示 -->
<div @click="toggleDrop" class="point flex appendDrop" style="width: 40%;">{{data.domain}}</div>
</div>
<!--触发 真实下拉操作 -->
<!-- valueKey="id" displayKey="name" 不添加时默认取值 valuelabel-->
<CustomDropdown slot="formDom" ref="dropDomain" width="100%" v-model="data.domain"
:options="domainOptions" @change="changeSelect" placeholder="请选择">
<template #normal>
<div class="flex flex-between noraml-jump">
<div class="left">
<b>添加新域名</b>
<p class="one ft12">域名需要在阿里云完成ICP备案并解析到平台服务器</p>
<p class="ft12">如果暂时未准备好可先选用平台免费域名随时支持域名修改 </p>
</div>
<div class="right">
<GuipButton size="form" @click="bindNewDomain">前往绑定</GuipButton>
</div>
</div>
</template>
</CustomDropdown>
</GuipFormItem>
</el-form>
<GuipDialog :dialogVisible="dialogVisible" :show-close-button="false" :showFooterButton="false"
type="center" title="温馨提示">
<div class="domain-wrap">
<el-form class="el-row demo-ruleForm" ref="formRef" :rules="formRules" :model="formData">
<p class="p-info">设置自己的域名需要做 2 步站外操作如果暂时未准备好或打算稍后设置可以先选用平台免费域名平台随时支持域名修改 </p>
<p class="p-title"><span>1.</span>域名必须在阿里云完成 ICP 备案</p>
<p class="p-desc mb18">备案网址https://beian.aliyun.com</p>
<p class="p-title"><span>2.</span>域名要解析到平台服务器上</p>
<p class="p-desc mb18">记录类型CNAME记录值lunwen.kuailedns.com</p>
<p class="p-title"><span>3.</span>域名填写</p>
<GuipInput width="458px" placeholder="填写完整域名" class="mb18" prop="domain" v-model="formData.domain"></GuipInput>
<p class="p-title"><span>4.</span>域名备案号</p>
<GuipInput width="458px" placeholder="填写备案号" class="mb32" prop="beian" v-model="formData.beian"></GuipInput>
<div class="flex flex-between">
<GuipButton type="ignore" :btnstyle="{'width': '247px', 'border-radius': '4px'}" @click="handleCancel">先用平台免费域名</GuipButton>
<GuipButton type="primary" :btnstyle="{'width': '247px', 'border-radius': '4px'}" :loading="show_step" @click="handleConfirm" >准备完毕验证自有域名</GuipButton>
</div>
<div class="domain-step" v-if="show_step">
<div class="flex mr12">
<GuipButton v-if="step1 === 1" type="text" :loading="true" :btnstyle="{'color': '#1675FF', 'font-size': '12px'}">
验证域名解析
</GuipButton>
<GuipButton v-if="step1 === 2" type="text" :btnstyle="{'color': '#1675FF', 'font-size': '12px'}">
<img src="@/assets/site/step_success.png" alt="" class="mr5"><span>域名已解析</span>
</GuipButton>
<GuipButton v-if="step1 === 3" type="text" :btnstyle="{'color': '#FF4D4F', 'font-size': '12px'}">
<img src="@/assets/site/step_error.png" alt="" class="mr5"><span>域名未解析</span>
</GuipButton>
</div>
<div class="flex">
<img src="@/assets/site/next-line.png" alt="">
</div>
<div class="flex ml12">
<GuipButton v-if="step2 === 0" type="text" :btnstyle="{'color': '#8A9099', 'font-size': '12px'}">
<img src="@/assets/site/step_wait.png" alt="" class="mr5"><span>验证ICP备案</span>
</GuipButton>
<GuipButton v-if="step2 === 1" type="text" :loading="true" :btnstyle="{'color': '#1675FF', 'font-size': '12px'}">
验证ICP备案
</GuipButton>
<GuipButton v-if="step2 === 3" type="text" :btnstyle="{'color': '#FF4D4F', 'font-size': '12px'}">
<img src="@/assets/site/step_error.png" alt="" class="mr5"><span>ICP未备案</span>
</GuipButton>
</div>
</div>
</el-form>
</div>
</GuipDialog>
</div>
</template>
<script>
import GuipInput from "@/components/GuipInput.vue";
import GuipDialog from "@/components/GuipDialog.vue";
import GuipButton from "@/components/GuipButton.vue";
import GuipFormItem from "@/components/GuipFormItem.vue";
import CustomDropdown from "@/components/CustomDropdown.vue";
export default {
name: 'domainBind',
props:['label'],
components: {
CustomDropdown, GuipFormItem,
GuipButton,
GuipDialog,
GuipInput
},
data(){
return {
domainOptions:[],
prefix: '',
domain: '',
dialogVisible: false,
data: {
prefix: '',
domain: '',
},
rules:{
prefix: [
{ required: true, message: '请输入域名前缀', trigger: 'blur' }
],
},
formData: {
domain: '',
beian: '',
},
formRules: {
domain: [
{ required: true, message: '请输入域名', trigger: 'blur' },
{
pattern: /^[a-zA-Z0-9-]+\.[a-zA-Z]{2,}$/,
message: '格式错误,请输入正确域名',
trigger: 'blur'
}
],
beian: [
{ required: true, message: '请输入域名备案号', trigger: 'blur' }
],
},
show_step: false,
step1: 1, //1 2 3
step2: 0 //0 1 3
}
},
watch: {
formData: {
deep: true,
handler() {
this.show_step = false;
this.step1 = 1
this.step2 = 0
}
}
},
mounted(){
this.getDomainList()
},
methods:{
getDomainList() {
const that = this
that.$http('POST', '/agentnew/ajax_get_private_domains', {}, {
headers: {
'Auth': this.token
}
}).then(response => {
if(response.status){
this.data.domain = '.'+response.data[0]
that.domainOptions = response.data.map(item => ({
label: '.'+item,
value: '.'+item
}));
return true
}
that.$message.error(response.info);
}).catch(error => {
console.error(error, 'error')
})
},
toggleDrop(e) {
this.$refs.dropDomain.toggleDropdown(e)
},
inputEnd(){
this.$emit('handleEvent', this.data)
},
changeSelect() {
this.$emit('handleEvent', this.data)
},
bindNewDomain(){
this.dialogVisible = true
},
handleCancel(){
this.dialogVisible = false
},
handleConfirm(){
this.$refs.formRef.validate((valid) => {
if (valid) this.verfiyDNS();
});
},
verfiyDNS() {
this.show_step = true
const that = this
that.$http('POST', '/agentnew/ajax_check_dns', {
domain: that.formData.domain
}, {
headers: {
'Auth': this.token
}
}).then(response => {
if(response.status){
that.step1 = 2
that.step2 = 1
that.verfiyBeian()
} else {
that.step1 = 3
}
}).catch(error => {
console.error(error, 'error')
})
},
verfiyBeian(){
const that = this
that.$http('POST', '/agentnew/ajax_check_beian', {
domain: that.formData.domain
},{
headers:{
'Auth': this.token
}
}).then(response => {
if(response.status){
that.addDomain()
} else {
that.step2 = 3
}
}).catch(error => {
console.error(error, 'error')
})
},
addDomain(){
const that = this
that.$http('POST', '/agentnew/ajax_add_domain', {
domain: that.formData.domain,
beian: that.formData.beian
},{
headers:{
'Auth': this.token
}
}).then(response => {
if(response.status){
that.data.domain = that.formData.domain
that.domainOptions.unshift({
label: '.'+that.formData.domain,
value: '.'+that.formData.domain
})
that.show_step = false
that.dialogVisible = false
that.$message.success('添加成功');
return true
}
that.$message.error(response.info);
}).catch(error => {
console.error(error, 'error')
})
},
}
}
</script>
<style scoped lang="scss">
.w540 {
width: 540px!important;
}
.mb18{
margin-bottom: 18px;
}
.mb32{
margin-bottom: 32px;
}
.mr12{
margin-right: 12px;
}
.ml12{
margin-left: 12px;
}
.mr5{
margin-right: 5px;
}
.combo-formItem-nolabel{
::v-deep {
.form-item-top{
display: none;
height: 0;
margin: 0;
}
}
}
.combo-formItem {
letter-spacing: 0.08em;
::v-deep {
.form-item-bottom {
position: relative;
}
.select-trigger {
background: #F6F7FA;
border-color: transparent;
}
.is-open .select-trigger {
border-color: #006AFF;
}
.el-input__inner {
border-radius: 2px 0 0 2px;
}
}
.self-drop-wrap {
position: absolute;
z-index: 1;
width: 100%;
}
.appendDrop {
height: 38px;
align-items: center;
border-radius: 0 2px 2px 0;
border: 1px solid #DFE2E6;
border-left-color: transparent;
justify-content: center;
box-sizing: border-box;
padding: 0 30px 0 12px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
&:hover {
border: 1px solid #006AFF;
}
}
}
.domain-wrap{
letter-spacing: 0.08em;
font-size: 14px;
.p-info{
color: #626573;
margin-bottom: 24px;
}
.p-title{
color: #23242B;
margin-bottom: 8px;
span{
width: 23px;
display: inline-block;
}
}
.p-desc{
color: #8A9099;
padding-left: 23px;
}
.domain-step{
margin-top: 16px;
display: flex;
justify-content: center;
align-items: center;
font-size: 12px;
}
}
</style>

41
src/components/preview/logoBack_color.vue

@ -1,6 +1,6 @@
<template>
<div class="preview_color">
<div class="top" :style="{backgroundColor:themeColor}">品牌LOGO</div>
<div class="top" :style="{backgroundColor:effectiveThemeColor}">品牌LOGO</div>
<div class="bottom flex">
<div class="left">
<span class="desc">获取帮助</span>
@ -10,14 +10,14 @@
</div>
<div class="right">
<p class="scroll" >正在检测文章的滚动条</p>
<div class="tab flex" :style="{backgroundColor:navColor}">
<div class="tab_item" :style="{backgroundColor:tabColor}">检测论文</div>
<div class="tab flex" :style="{backgroundColor:effectiveNavColor}">
<div class="tab_item" :style="{backgroundColor:effectiveTabColor}">检测论文</div>
<div class="tab_item">下载检测报告</div>
<div class="tab_item">下载检测报告</div>
</div>
<div class="right_bot column">
<b>检测上传板块</b>
<button :style="{backgroundColor:themeColor}">提交论文</button>
<button :style="{backgroundColor:effectiveThemeColor}">提交论文</button>
</div>
</div>
</div>
@ -28,9 +28,36 @@
export default {
//
name: '',
props: ['themeColor','navColor','tabColor'],
components: {
props: {
themeColor: {
type: String,
default: '#3B82F6'
},
navColor: {
type: String,
default: '#3B82F6'
},
tabColor: {
type: String,
default: '#70A6FF'
},
},
computed: {
effectiveThemeColor() {
return this.themeColor && this.themeColor.trim() !== ''
? this.themeColor
: '#3B82F6';
},
effectiveNavColor() {
return this.navColor && this.navColor.trim() !== ''
? this.navColor
: '#3B82F6';
},
effectiveTabColor() {
return this.tabColor && this.tabColor.trim() !== ''
? this.tabColor
: '#70A6FF';
}
},
data() {
return {

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

@ -1,18 +1,54 @@
<template>
<div>
<div class="main-content12">
<div class="pageheader">
<span class="pagetitle">{{info.type_desc}}-独立域名</span>
</div>
<div class="flex-common">
<div class="domain-area">
<el-form class="el-row demo-ruleForm" ref="formRef">
<div class="domain-from">域名来源</div>
<div class="domain-radio">
<GuipRadio v-model="domainFrom" :options="domainFromOptions"/>
</div>
<div class="flex domain-info">
<span>当前服务域名</span><span>{{info.domain}}</span>
</div>
<domainBind v-show="domainFrom === '1'" label="域名设置" @handleEvent="handleEvent"/>
</el-form>
</div>
</div>
<div class="save-button">
<GuipButton type="primary" :btnstyle="saveBtnStyleObj" @click="saveConfirm">保存</GuipButton>
</div>
</div>
</template>
<script>
import GuipRadio from "@/components/GuipRadio.vue";
import GuipButton from "@/components/GuipButton.vue";
import domainBind from "@/components/domainBind.vue";
export default {
name: 'domainSet',
props:[],
props: {
serviceInfo: {
type: Object,
required: true
}
},
components: {
domainBind,
GuipButton,
GuipRadio
},
data(){
return {
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTAwNTM3MjQsIm5iZiI6MTc1MDA1MzcyNCwiZXhwIjoxNzUyNjQ1NzI0LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.xyIqBLelB-k6jCifgRevBJTyg_Qrm6m1e4OcHhOpepU',
info: {},
//
saveBtnStyleObj: {
width: '144px',
@ -20,13 +56,94 @@ export default {
borderRadius: '4px',
background: '#006AFF',
},
domainFrom: '0',
domainFromOptions: {
'0': '平台免费域名',
'1': '我自己有域名'
},
newDomain: {}
}
},
mounted() {
this.info = JSON.parse(JSON.stringify(this.serviceInfo))
if(this.info.ser_domain) this.domainFrom = '1'
},
methods:{
handleEvent(data){
this.newDomain = data
},
saveConfirm() {
let obj = {}
obj.uid = this.info.uid
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 = ''
}
const that = this
this.$http('POST', '/agentnew/ajax_update_service_domain', obj,{
headers:{
'Auth': this.token
}
}).then(response => {
if(response.status){
that.$message.success('保存成功');
//
const protocol = new URL(that.info.domain).protocol;
that.info.domain = protocol + "//" +obj.domain;
that.info.ser_domain = protocol + "//" +obj.domain;
that.$emit('saveEvent', that.info)
return true;
}
that.$message.error(response.info);
}).catch(error => {
console.error(error, 'error')
})
},
}
}
</script>
<style lang="scss">
.domain-area{
text-align: left;
.domain-from{
font-size: 14px;
letter-spacing: 0.08em;
color: #1E2226;
margin-bottom: 12px;
}
.domain-radio{
.el-form-item{
margin-bottom: 12px;
}
}
.domain-info{
width: 540px;
font-size: 12px;
line-height: 13px;
letter-spacing: 0.08em;
background: #F2F7FF;
padding: 10px;
margin-right: 12px;
margin-bottom: 12px;
box-sizing: border-box;
span{
color: #1E2226;
}
span:first-child{
color: #626573;
}
}
}
</style>

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

@ -1,7 +1,7 @@
<template>
<div class="main-content12">
<div class="pageheader">
<span class="pagetitle">基本设置</span>
<span class="pagetitle">{{info.type_desc}}-自定义导航</span>
</div>
<div class="flex-common">
@ -68,7 +68,7 @@ export default {
}
},
mounted() {
this.info = this.serviceInfo
this.info = JSON.parse(JSON.stringify(this.serviceInfo))
},
methods: {
toggleSetSyncHome(){
@ -97,7 +97,7 @@ export default {
that.$emit('saveEvent', that.info)
return true;
}
that.$message.success(response.info);
that.$message.error(response.info);
}).catch(error => {
console.error(error, 'error')
})

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

@ -1,7 +1,7 @@
<template>
<div class="main">
<div class="pageheader">
<span class="pagetitle">基本设置</span>
<span class="pagetitle">{{info.type_desc}}-页面品牌与颜色</span>
</div>
<div class="flex-common">
@ -9,22 +9,14 @@
<el-form ref="formRef">
<div class="flex-wrap">
<div class="flex-left">
<GuipFormItem column="column" label="提交页Logo上传">
<hover-button slot="formDom" ref="GuipInput" button-text="选择图片"
:default-icon="require('@/assets/upLoad_grey.svg')"
:hover-icon="require('@/assets/upLoad_active.svg')" default-text-color="#23242B"
hover-text-color="#006AFF" />
</GuipFormItem>
<GuipFormItem column="column" label="提交页Logo上传"></GuipFormItem>
<ImgUpload @input="onUploadSub" :accept-types="['jpg', 'png']" :maxCount="1" :defaultUrls="[info.submit_logo_url]"></ImgUpload>
<div slot="tip" class="el-upload__tip desc">支持pngjpg格式尺寸32PX*32PX</div>
</div>
<div class="flex-line "></div>
<div class="flex-right">
<GuipFormItem column="column" label="报告页Logo上传">
<hover-button slot="formDom" ref="GuipInput" button-text="选择图片"
:default-icon="require('@/assets/upLoad_grey.svg')"
:hover-icon="require('@/assets/upLoad_active.svg')" default-text-color="#23242B"
hover-text-color="#006AFF" />
</GuipFormItem>
<GuipFormItem column="column" label="报告页Logo上传"></GuipFormItem>
<ImgUpload @input="onUploadRep" :accept-types="['jpg', 'png']" :maxCount="1" :defaultUrls="[info.report_logo_url]"></ImgUpload>
<div slot="tip" class="el-upload__tip desc">支持pngjpg格式尺寸32PX*32PX</div>
</div>
</div>
@ -75,7 +67,6 @@
<!-- 电脑端内容 -->
<LogoBackColor :themeColor="themeColor" :navColor="navColor" :tabColor="tabColor"/>
</template>
</DevicePreview>
</div>
</div>
@ -83,28 +74,33 @@
</div>
<div class="save-button">
<GuipButton type="primary" :btnstyle="saveBtnStyleObj">保存</GuipButton>
<GuipButton type="primary" :btnstyle="saveBtnStyleObj" @click="saveConfirm">保存</GuipButton>
</div>
</div>
</template>
<script>
import HoverButton from "@/components/HoverButton.vue";
import GuipFormItem from "@/components/GuipFormItem.vue";
import PromptText from "@/components/PromptText.vue";
import GuipButton from "@/components/GuipButton.vue";
import DevicePreview from "@/components/PreviewTab.vue";
import LogoBackColor from "@/components/preview/logoBack_color.vue";
import GuipInput from '@/components/GuipInput.vue';
import ImgUpload from "@/components/ImgUpload.vue";
export default {
name: '',
props: [],
name: 'menuColorSet',
props: {
serviceInfo: {
type: Object,
required: true
}
},
components: {
ImgUpload,
GuipButton,
PromptText,
GuipFormItem,
HoverButton,
DevicePreview,
LogoBackColor,
GuipInput
@ -113,29 +109,95 @@ export default {
options: { styleIsolation: "shared" },
data() {
return {
themeColor:'#3B82F6',
navColor:'#3B82F6',
tabColor:'#70A6FF',
saveBtnStyleObj:{}
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTAwNTM3MjQsIm5iZiI6MTc1MDA1MzcyNCwiZXhwIjoxNzUyNjQ1NzI0LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.xyIqBLelB-k6jCifgRevBJTyg_Qrm6m1e4OcHhOpepU',
info:{},
//
saveBtnStyleObj: {
width: '144px',
height: '46px',
borderRadius: '4px',
background: '#006AFF',
},
themeColor: undefined,
navColor: undefined,
tabColor: undefined,
sub_logo_file: {},
rep_logo_file: {},
}
},
mounted() {
this.info = JSON.parse(JSON.stringify(this.serviceInfo))
console.log(this.info.color_info)
if(this.info.color_info){
this.themeColor = this.info.color_info.link_btn_color ? '#'+ this.info.color_info.link_btn_color : ""
this.navColor = this.info.color_info.selected_nav_bgcolor ? '#'+ this.info.color_info.selected_nav_bgcolor : ""
this.tabColor = this.info.color_info.logo_bgcolor ? '#'+ this.info.color_info.logo_bgcolor : ""
}
},
methods: {
onUploadSub(fileObj){
this.info.submit_logo_url = fileObj.url
this.sub_logo_file = fileObj.file
},
onUploadRep(fileObj){
this.info.report_logo_url = fileObj.url
this.rep_logo_file = fileObj.file
},
changeThemeColor(val){
if (!val.trim().startsWith("#")){
if (val.length > 0 && !val.trim().startsWith("#")){
this.themeColor = '#'+ val.trim()
console.log(this.themeColor,'=====xiugai');
}
},
changetabColor(val){
if (!val.trim().startsWith("#")){
if (val.length > 0 && !val.trim().startsWith("#")){
this.tabColor = '#'+ val.trim()
}
},
changeNavColor(val){
if (!val.trim().startsWith("#")){
if (val.length > 0 && !val.trim().startsWith("#")){
this.navColor = '#'+ val.trim()
}
}
},
saveConfirm() {
let obj = {}
obj.uid = this.info.uid
obj.type = this.info.type
obj.logo_bgcolor = this.tabColor.replace('#','')
obj.link_btn_color = this.themeColor.replace('#','')
obj.selected_nav_bgcolor = this.navColor.replace('#','')
if(!this.sub_logo_file || !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
this.$http('POST', '/agentnew/ajax_update_service_style', obj,{
headers:{
'Auth': this.token,
'Content-Type':'multipart/form-data'
}
}).then(response => {
if(response.status){
that.$message.success('保存成功');
let color_info = {}
color_info.logo_bgcolor = obj.logo_bgcolor
color_info.link_btn_color = obj.link_btn_color
color_info.selected_nav_bgcolor = obj.selected_nav_bgcolor
that.info.color_info = color_info
that.$emit('saveEvent', that.info)
return true;
}
that.$message.error(response.info);
}).catch(error => {
console.error(error, 'error')
})
},
}
}
</script>

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

@ -1,7 +1,7 @@
<template>
<div class="main-content12">
<div class="pageheader">
<span class="pagetitle">收款设置</span>
<span class="pagetitle">{{info.type_desc}}-收款设置</span>
</div>
<div class="flex-common payment-area">
@ -36,6 +36,7 @@ export default {
data(){
return {
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTAwNTM3MjQsIm5iZiI6MTc1MDA1MzcyNCwiZXhwIjoxNzUyNjQ1NzI0LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.xyIqBLelB-k6jCifgRevBJTyg_Qrm6m1e4OcHhOpepU',
info:[],
payList:[],
//
saveBtnStyleObj: {
@ -47,7 +48,8 @@ export default {
}
},
mounted() {
if(this.serviceInfo) this.payList = this.serviceInfo.paylist
this.info = JSON.parse(JSON.stringify(this.serviceInfo))
this.payList = this.info.paylist
},
methods:{
confirmPayment(payList){
@ -81,7 +83,7 @@ export default {
that.$emit('saveEvent', that.payList)
return true;
}
that.$message.success(response.info);
that.$message.error(response.info);
}).catch(error => {
console.error(error, 'error')
})

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

@ -1,18 +1,67 @@
<template>
<div>
<div class="main-content12">
<div class="pageheader">
<span class="pagetitle">{{info.type_desc}}-价格设置</span>
</div>
<div class="flex-common">
<h3>网页支付与售价</h3>
<el-form ref="formRef">
<div class="flex-wrap">
<div class="flex-left">
<div class="set-item">
<div class="set-title flex flex-between">
<p>售价管理</p>
<p>供货价格3.5/</p>
</div>
<div class="set-content flex">
<GuipSelect width="264px" prop="card" :options="options" class="mr12"/>
<GuipInput v-if="!info.price" width="264px" v-model="info.price" ref="GuipInput" unit="元/篇"></GuipInput>
<template v-else>
<GuipInput width="180px" v-model="info.price" ref="GuipInput" unit="元"></GuipInput>
<span class="mr12"></span>
<GuipInput v-model="info.unit_num" ref="GuipInput" width="180px" unit="字符"></GuipInput>
</template>
</div>
</div>
</div>
<div class="flex-line"></div>
<div class="flex-right">
</div>
</div>
</el-form>
</div>
<div class="save-button">
<GuipButton type="primary" :btnstyle="saveBtnStyleObj" @click="saveConfirm">保存</GuipButton>
</div>
</div>
</template>
<script>
import GuipButton from "@/components/GuipButton.vue";
import GuipInput from "@/components/GuipInput.vue";
import GuipSelect from "@/components/GuipSelect.vue";
export default {
name: 'priceSet',
props:[],
props: {
serviceInfo: {
type: Object,
required: true
}
},
components: {
GuipSelect,
GuipInput,
GuipButton
},
data(){
return {
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTAwNTM3MjQsIm5iZiI6MTc1MDA1MzcyNCwiZXhwIjoxNzUyNjQ1NzI0LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.xyIqBLelB-k6jCifgRevBJTyg_Qrm6m1e4OcHhOpepU',
info:{},
//
saveBtnStyleObj: {
width: '144px',
@ -20,13 +69,106 @@ export default {
borderRadius: '4px',
background: '#006AFF',
},
options: [{
value: '选项1',
label1: '黄金hhhhhh',
id1: '1',
id2: '啊11哈哈',
label: '黄金糕'
}, {
value: '选项2',
id1: '12',
id2: '啊22哈哈',
label1: '双皮奶hhhhhhhhh',
label: '双皮奶'
}, {
value: '选项3',
id1: '13',
id2: '啊33哈哈',
label1: '蚵仔煎hhhhhhhhh',
label: '蚵仔煎'
}, {
value: '选项4',
id1: '14',
id2: '啊444哈哈',
label1: '双皮奶hhhhhhhhh',
label: '龙须面'
}, {
value: '选项5',
id1: '155',
id2: '啊55哈哈',
label1: '双皮奶hhhhhhhhh',
label: '北京烤鸭'
}],
form: {
username: '',
language: '',
domain_set: '',
domainSuffix: '11',
domainSuffix1: '.chachongz.com',
card: '1',
input1: '跨年的烟火,绽放天空',
input2: '',
input3: '',
},
}
},
mounted() {
this.info = JSON.parse(JSON.stringify(this.serviceInfo))
},
methods:{
saveConfirm() {
let obj = {}
obj.uid = this.info.uid
obj.type = this.info.type
obj.logo_bgcolor = this.tabColor.replace('#','')
obj.link_btn_color = this.themeColor.replace('#','')
obj.selected_nav_bgcolor = this.navColor.replace('#','')
const that = this
this.$http('POST', '/agentnew/ajax_update_service_style', obj,{
headers:{
'Auth': this.token
}
}).then(response => {
if(response.status){
that.$message.success('保存成功');
let color_info = {}
color_info.logo_bgcolor = obj.logo_bgcolor
color_info.link_btn_color = obj.link_btn_color
color_info.selected_nav_bgcolor = obj.selected_nav_bgcolor
that.info.color_info = color_info
that.$emit('saveEvent', that.info)
return true;
}
that.$message.error(response.info);
}).catch(error => {
console.error(error, 'error')
})
},
}
}
</script>
<style lang="scss">
.mr12{
margin-right: 12px;
}
.set-item{
width: 540px;
letter-spacing: 0.08em;
.set-title{
font-size: 14px;
color: #1E2226;
margin-bottom: 12px;
p:last-child{
color: #8A9099;
}
}
.set-content{
width: 100%;
}
}
</style>

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

@ -1,7 +1,7 @@
<template>
<div class="main-content12">
<div class="pageheader">
<span class="pagetitle">基本设置</span>
<span class="pagetitle">{{info.type_desc}}-报告页SEO</span>
</div>
<div class="flex-common">
@ -72,7 +72,7 @@ export default {
}
},
mounted() {
this.info = this.serviceInfo
this.info = JSON.parse(JSON.stringify(this.serviceInfo))
},
methods: {
saveConfirm() {
@ -94,7 +94,7 @@ export default {
that.$emit('saveEvent', that.info)
return true;
}
that.$message.success(response.info);
that.$message.error(response.info);
}).catch(error => {
console.error(error, 'error')
})

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

@ -1,91 +1,131 @@
<template>
<div class="main-content12">
<div class="pageheader">
<span class="pagetitle">基本设置</span>
<span class="pagetitle">{{info.type_desc}}-展示设置</span>
</div>
<div class="flex-common">
<h3 class="mb16">基础信息</h3>
<PromptText text='温馨提示:服务别名、首页服务广告词和首页服务描述不允许使用"知网"、"pmlc"、"amlc"和"smlc"等关键词。' :type="2" class="mb32"/>
<el-form ref="formRef">
<div class="flex-wrap">
<div class="flex-left">
<GuipFormItem column="column" label="服务别名">
<GuipInput slot="formDom" ref="GuipInput" class=" mb24" width="100%"
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="用来简短概括的解释服务" v-model="info.subtitle">
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" label="服务描述">
<GuipInput slot="formDom" ref="GuipInput" width="100%" height="160px" type="textarea"
desc="用来详细的解释服务" v-model="info.desc">
</GuipInput>
</GuipFormItem>
</div>
<div class="flex-line "></div>
<div class="flex-right">
<GuipFormItem column="column" label="服务Logo">
<hover-button slot="formDom" ref="GuipInput" button-text="选择图片" :default-icon="require('@/assets/upLoad_grey.svg')"
:hover-icon="require('@/assets/upLoad_active.svg')" default-text-color="#23242B"
hover-text-color="#006AFF"/>
</GuipFormItem>
<div slot="tip" class="el-upload__tip desc">支持pngjpg格式尺寸32PX*32PX</div>
<template v-if="!saveSuccess">
<div class="flex-common">
<h3 class="mb16">基础信息</h3>
<PromptText text='温馨提示:服务别名、首页服务广告词和首页服务描述不允许使用"知网"、"pmlc"、"amlc"和"smlc"等关键词。' :type="2" class="mb32"/>
<el-form ref="formRef">
<div class="flex-wrap">
<div class="flex-left">
<GuipFormItem column="column" label="服务别名">
<GuipInput slot="formDom" ref="GuipInput" class=" mb24" width="100%"
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="用来简短概括的解释服务" v-model="info.subtitle">
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" label="服务描述">
<GuipInput slot="formDom" ref="GuipInput" width="100%" height="160px" type="textarea"
desc="用来详细的解释服务" v-model="info.desc">
</GuipInput>
</GuipFormItem>
</div>
<div class="flex-line "></div>
<div class="flex-right">
<GuipFormItem column="column" label="服务Logo"></GuipFormItem>
<ImgUpload @input="onUpload" :accept-types="['jpg', 'png']" :maxCount="1" :defaultUrls="[info.logo_url]"></ImgUpload>
<div slot="tip" class="el-upload__tip desc">支持pngjpg格式尺寸32PX*32PX</div>
</div>
</div>
</div>
</el-form>
</div>
</el-form>
</div>
<div class="flex-common">
<h3>展示开关</h3>
<el-form ref="formRef">
<div class="flex-wrap">
<div class="flex-left">
<div class="card-item">
<div class="card-info">
<p class="card-name">首页服务显示</p>
<p class="card-desc">控制首页是否显示本服务</p>
<div class="flex-common">
<h3>展示开关</h3>
<el-form ref="formRef">
<div class="flex-wrap">
<div class="flex-left">
<div class="card-item">
<div class="card-info">
<p class="card-name">首页服务显示</p>
<p class="card-desc">控制首页是否显示本服务</p>
</div>
<el-form>
<GuipSwitch :modelValue="info.is_index_display" :active-value="1" :inactive-value="0"
activeText="开启" inactiveText="关闭" @change="onSwitchChange('is_index_display')">
</GuipSwitch>
</el-form>
</div>
<div class="card-item">
<div class="card-info">
<p class="card-name">检测页价格展示</p>
<p class="card-desc">本服务检测页面是否展示价格</p>
</div>
<el-form>
<GuipSwitch :modelValue="info.is_display_price" :active-value="1" :inactive-value="0"
activeText="开启" inactiveText="关闭" @change="onSwitchChange('is_display_price')">
</GuipSwitch>
</el-form>
</div>
<el-form>
<GuipSwitch :modelValue="info.is_index_display" :active-value="1" :inactive-value="0"
activeText="开启" inactiveText="关闭" @change="onSwitchChange('is_index_display')">
</GuipSwitch>
</el-form>
</div>
<div class="card-item">
<div class="card-info">
<p class="card-name">检测页价格展示</p>
<p class="card-desc">本服务检测页面是否展示价格</p>
<div class="flex-line "></div>
<div class="flex-right">
<div class="card-item">
<div class="card-info">
<p class="card-name">首页推荐位</p>
<p class="card-desc">开启即上推荐位</p>
</div>
<el-form>
<GuipSwitch :modelValue="info.is_recommend" :active-value="1" :inactive-value="0"
activeText="开启" inactiveText="关闭" @change="onSwitchChange('is_recommend')">
</GuipSwitch>
</el-form>
</div>
<el-form>
<GuipSwitch :modelValue="info.is_display_price" :active-value="1" :inactive-value="0"
activeText="开启" inactiveText="关闭" @change="onSwitchChange('is_display_price')">
</GuipSwitch>
</el-form>
</div>
</div>
<div class="flex-line "></div>
<div class="flex-right">
<div class="card-item">
<div class="card-info">
<p class="card-name">首页推荐位</p>
<p class="card-desc">开启即上推荐位</p>
</div>
<el-form>
<GuipSwitch :modelValue="info.is_recommend" :active-value="1" :inactive-value="0"
activeText="开启" inactiveText="关闭" @change="onSwitchChange('is_recommend')">
</GuipSwitch>
</el-form>
</el-form>
</div>
</template>
<template v-else>
<div class="flex-common">
<div class="back-area" @click="saveBack">
<img src="@/assets/site/back_icon.png" alt="">
返回
</div>
<div class="success-area">
<img src="@/assets/message_Success.png" alt="">
<div>设置保存成功</div>
</div>
<div class="pro-list">
<div class="pro-item">
<img src="@/assets/site/site-web.svg" alt="">
<div class="pro-name">PC端预览</div>
<div class="pro-link">
<a :href="info.domain" class="flex" target="_blank">
<img src="@/assets/site/form_linkActive.svg" alt="">
<span>{{info.domain}}</span>
</a>
</div>
<div class="pro-desc">点击上方网址访问</div>
</div>
<div class="pro-item">
<img src="@/assets/site/site-h5.svg" alt="">
<div class="pro-name">手机H5预览</div>
<div class="pro-link"><img src="@/assets/site/kefuTem.png" alt="" class="link-code"></div>
<div class="pro-desc">微信扫码预览</div>
</div>
<div class="pro-item">
<img src="@/assets/site/site-mp.svg" alt="">
<div class="pro-name">小程序预览</div>
<div class="pro-link"><img src="@/assets/site/kefuTem.png" alt="" class="link-code"></div>
<div class="pro-desc">微信扫码预览</div>
</div>
</div>
</el-form>
</div>
<div class="back-btn" @click="saveBack">
返回展示设置
</div>
</div>
</template>
<div class="save-button">
<GuipButton type="primary" :btnstyle="saveBtnStyleObj" @click="saveConfirm">保存</GuipButton>
@ -94,12 +134,12 @@
</template>
<script>
import HoverButton from "@/components/HoverButton.vue";
import GuipFormItem from "@/components/GuipFormItem.vue";
import GuipSwitch from "@/components/GuipSwitch.vue";
import PromptText from "@/components/PromptText.vue";
import GuipInput from "@/components/GuipInput.vue";
import GuipButton from "@/components/GuipButton.vue";
import ImgUpload from "@/components/ImgUpload.vue";
export default {
name: 'showSet',
@ -111,13 +151,13 @@ export default {
},
components: {
GuipButton,
GuipInput, PromptText, GuipSwitch, GuipFormItem, HoverButton
GuipInput, PromptText, GuipSwitch, GuipFormItem, ImgUpload
},
data(){
return {
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTAwNTM3MjQsIm5iZiI6MTc1MDA1MzcyNCwiZXhwIjoxNzUyNjQ1NzI0LCJ1c2VyIjoic3VidXNlciIsImxvZ2luX3R5cGUiOjAsImFpZCI6IjEifQ.xyIqBLelB-k6jCifgRevBJTyg_Qrm6m1e4OcHhOpepU',
info:{},
saveSuccess: false,
//
saveBtnStyleObj: {
width: '144px',
@ -125,12 +165,20 @@ export default {
borderRadius: '4px',
background: '#006AFF',
},
logo_file: {},
}
},
mounted() {
this.info = this.serviceInfo
this.info = JSON.parse(JSON.stringify(this.serviceInfo))
},
methods:{
onUpload(fileObj) {
this.info.logo_url = fileObj.url
this.logo_file = fileObj.file
},
saveBack(){
this.saveSuccess = false
},
onSwitchChange(attr){
this.info[attr] = this.info[attr] === 1 ? 0 : 1
},
@ -141,22 +189,26 @@ export default {
obj.title = this.info.title
obj.subtitle = this.info.subtitle
obj.desc = this.info.desc
obj.sort_id = this.info.sort_id
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
obj.logo = this.logo_file
const that = this
this.$http('POST', '/agentnew/ajax_update_service_show', obj,{
headers:{
'Auth': this.token
'Auth': this.token,
'Content-Type':'multipart/form-data'
}
}).then(response => {
if(response.status){
that.$message.success('保存成功');
that.$emit('saveEvent', that.info)
// that.saveSuccess = true
return true;
}
that.$message.success(response.info);
that.$message.error(response.info);
}).catch(error => {
console.error(error, 'error')
})
@ -196,4 +248,101 @@ export default {
margin: 0;
}
}
.back-area{
display: flex;
font-size: 14px;
letter-spacing: 0.08em;
color: #626573;
line-height: 16px;
img{
width: 16px;
height: 16px;
margin-right: 6px;
}
}
.success-area{
font-size: 18px;
font-weight: bold;
line-height: 24px;
letter-spacing: 0.06em;
color: #1E2226;
margin-bottom: 52px;
img{
width: 50px;
height: 50px;
margin-bottom: 12px;
}
}
.pro-list{
display: flex;
align-items: center;
justify-content: space-between;
gap: 32px;
letter-spacing: 0.08em;
.pro-item{
width: 300px;
height: 293px;
border-radius: 20px;
border: 1px solid #DFE2E6;
padding: 42px 0;
box-sizing: border-box;
.pro-name{
font-size: 16px;
font-weight: bold;
color: #1E2226;
margin-top: 12px;
}
.pro-link{
margin-top: 32px;
.link-code{
width: 80px;
height: 80px;
}
a{
align-items: center;
justify-content: center;
font-size: 14px;
color: #006AFF;
text-decoration: none;
img{
width: 16px;
height: 16px;
vertical-align: middle;
margin-right: 12px;
}
span{
width: 200px;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
.pro-desc{
font-size: 12px;
color: #8A9099;
margin-top: 12px;
}
}
}
.back-btn{
width: 144px;
height: 46px;
border-radius: 4px;
border: 1px solid #006AFF;
padding: 14px 2px;
gap: 6px;
font-size: 14px;
text-align: center;
letter-spacing: 0.08em;
color: #006AFF;
box-sizing: border-box;
margin: 52px auto 0;
}
</style>

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

@ -1,7 +1,7 @@
<template>
<div class="main-content12">
<div class="pageheader">
<span class="pagetitle">基本设置</span>
<span class="pagetitle">{{info.type_desc}}-提交页SEO</span>
</div>
<div class="flex-common">
@ -72,7 +72,7 @@ export default {
}
},
mounted() {
this.info = this.serviceInfo
this.info = JSON.parse(JSON.stringify(this.serviceInfo))
},
methods: {
saveConfirm() {
@ -94,7 +94,7 @@ export default {
that.$emit('saveEvent', that.info)
return true;
}
that.$message.success(response.info);
that.$message.error(response.info);
}).catch(error => {
console.error(error, 'error')
})

2
src/views/agent/siteServiceAdd.vue

@ -152,7 +152,7 @@ export default {
that.$message.success('保存成功');
return true;
}
that.$message.success(response.info);
that.$message.error(response.info);
}).catch(error => {
console.error(error, 'error')
})

5
src/views/agent/siteServiceEdit.vue

@ -73,7 +73,7 @@ export default {
},
methods: {
handleSaveEvent(payload) {
console.log('收到子组件事件:', payload);
this.siteServiceInfo = payload
},
getSiteServiceInfo() {
const that = this
@ -90,6 +90,8 @@ export default {
that.siteServiceInfo = response.data.service_info
that.siteServiceInfo.paylist = []
this.tableKey = Date.now();
store.commit('SET_BREADRIGHTTEXT', response.data.site_short_name);
})
}).catch(error => {
console.error(error, 'error')
@ -259,6 +261,7 @@ export default {
align-items: center;
justify-content: center;
padding: 16px 0;
z-index: 9;
}
::v-deep .payment-item{

6
src/views/agent/siteServiceList.vue

@ -308,7 +308,7 @@ export default {
})
return true;
}
that.$message.success(response.info);
that.$message.error(response.info);
}).catch(error => {
console.error(error, 'error')
})
@ -340,7 +340,7 @@ export default {
})
return true;
}
that.$message.success(response.info);
that.$message.error(response.info);
}).catch(error => {
console.error(error, 'error')
})
@ -435,7 +435,7 @@ export default {
})
return true;
}
that.$message.success(response.info);
that.$message.error(response.info);
}).catch(error => {
console.error(error, 'error')
})

9
src/views/elementGroups.vue

@ -1,6 +1,7 @@
<template>
<div class="main-content12">
<div class="elementWrap">
<domainBind label="域名设置" @handleEvent="handleEvent" />
<PromptText text='这是一个提示框' :type="1" />
<PromptText text='这是一个提示框' :type="2" />
<PromptText text='这是一个提示框' :type="3" />
@ -577,11 +578,13 @@ import GuipFormItem from '@/components/GuipFormItem.vue'
import SvgIcon from '@/components/SvgIcon.vue';
import PromptText from "@/components/PromptText.vue";
import DevicePreview from "@/components/PreviewTab.vue";
import domainBind from "@/components/domainBind.vue";
export default {
name: 'HomeView',
components: {
domainBind,
PromptText,
GuipTextarea,
GuipTable,
@ -945,6 +948,12 @@ export default {
}
},
methods: {
handleEvent(data){
console.log(data,'data')
},
handleOptions(options){
console.log(options,'options')
},
// copy
handleClickCopy(){
this.$copy(this.form.input1, {

Loading…
Cancel
Save