mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-20 09:55:53 +08:00
B2C代码提交
This commit is contained in:
@@ -1,29 +1,58 @@
|
||||
<template>
|
||||
<div class="layout">
|
||||
<Alert>
|
||||
企业微信客服设置提示
|
||||
<template slot="desc">
|
||||
<p>1.移动端需配置客服链接地址和企业id <a href="https://work.weixin.qq.com/nl/act/p/a733314375294bdd" target="blank">查看如何配置</a>
|
||||
</p>
|
||||
<p>2.PC端需配置企业微信客服二维码</p>
|
||||
|
||||
</template>
|
||||
</Alert>
|
||||
<Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate">
|
||||
<FormItem label="云IM地址" prop="httpUrl">
|
||||
<Input v-model="formValidate.httpUrl"/>
|
||||
<span class="desc">配置买家端联系客服以及商家端登录客服跳转的路径</span>
|
||||
<FormItem label="客服链接" prop="url">
|
||||
<Input v-model="formValidate.url" />
|
||||
</FormItem>
|
||||
<FormItem label="企业ID" prop="companyId">
|
||||
<Input v-model="formValidate.companyId" />
|
||||
</FormItem>
|
||||
<!-- <FormItem label="客服二维码" prop="qrCode">
|
||||
<div class="label-item-upload">
|
||||
<img v-if="formValidate.qrCode" class="img" :src="formValidate.qrCode" />
|
||||
<img v-else class="img" src="../../../../assets/emptyImg.png" alt="">
|
||||
<Button style @click="onClickImg('qrCode')">选择图片</Button>
|
||||
</div>
|
||||
</FormItem> -->
|
||||
|
||||
<div class="label-btns">
|
||||
<Button type="primary" @click="submit('formValidate')">保存</Button>
|
||||
</div>
|
||||
</Form>
|
||||
<Modal width="1200px" v-model="picModelFlag">
|
||||
<ossManage @callback="callbackSelected" :isComponent="true" :initialize="picModelFlag" ref="ossManage" />
|
||||
</Modal>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {setSetting} from "@/api/index";
|
||||
import {handleSubmit} from "./validate";
|
||||
import { setSetting } from "@/api/index";
|
||||
import { handleSubmit } from "./validate";
|
||||
import ossManage from "@/views/sys/oss-manage/ossManage";
|
||||
|
||||
export default {
|
||||
components:{ossManage},
|
||||
data() {
|
||||
return {
|
||||
ruleValidate: {}, // 验证规则
|
||||
formValidate: { // 表单数据
|
||||
httpUrl: ""
|
||||
url: "",
|
||||
companyId:"",
|
||||
qrCode:""
|
||||
},
|
||||
result:"",
|
||||
picModelFlag: false, // 预览图片显隐
|
||||
selected: "", // 已选数据
|
||||
|
||||
result: "",
|
||||
};
|
||||
},
|
||||
props: ["res", "type"],
|
||||
@@ -31,6 +60,15 @@ export default {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
callbackSelected(val) {
|
||||
this.picModelFlag = false;
|
||||
this.formValidate[this.selected] = val.url;
|
||||
},
|
||||
onClickImg(item) {
|
||||
this.selected = item;
|
||||
this.$refs.ossManage.selectImage = true;
|
||||
this.picModelFlag = true;
|
||||
},
|
||||
// 保存
|
||||
submit(name) {
|
||||
let that = this;
|
||||
@@ -52,7 +90,7 @@ export default {
|
||||
init() {
|
||||
this.result = JSON.parse(this.res);
|
||||
|
||||
this.$set(this, "formValidate", {...this.result});
|
||||
this.$set(this, "formValidate", { ...this.result });
|
||||
Object.keys(this.formValidate).forEach((item) => {
|
||||
this.ruleValidate[item] = [
|
||||
{
|
||||
@@ -83,4 +121,22 @@ export default {
|
||||
width: 300px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
|
||||
.label-item {
|
||||
display: flex;
|
||||
> .ivu-input {
|
||||
width: 200px;
|
||||
margin: 0 10px;
|
||||
}
|
||||
}
|
||||
.label-item-upload {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
img {
|
||||
margin-right: 10px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -60,7 +60,7 @@ export default {
|
||||
//阿里短信配置
|
||||
{
|
||||
type: "IM_SETTING",
|
||||
name: "客服设置",
|
||||
name: "企业微信客服设置",
|
||||
},
|
||||
{
|
||||
type: "DELIVERY_SETTING",
|
||||
|
||||
Reference in New Issue
Block a user