Commit 348eb54e authored by zhangjianguo's avatar zhangjianguo
parents 2dfd8666 59e6fc9a
......@@ -34,6 +34,9 @@
.w100{
width:100px!important;
}
.w120{
width:120px!important;
}
.w200{
width:200px!important;
}
......
......@@ -169,10 +169,10 @@
<li class="menu_item" :class="{'Fchecked':isChecked==1}" @click="isChecked=1,CommonJump('templateManage')">
<i class="el-icon-menu"></i><span>模板管理</span>
</li>
<li class="menu_item" :class="{'Fchecked':isChecked==2}" @click="isChecked=2,CommonJump('wexinappmsg')">
<li class="menu_item" :class="{'Fchecked':isChecked==2}" @click="isChecked=2">
<i class="el-icon-menu"></i><span>模板市场</span>
</li>
<li class="menu_item" :class="{'Fchecked':isChecked==3}" @click="isChecked=3">
<li class="menu_item" :class="{'Fchecked':isChecked==3}" @click="isChecked=3,CommonJump('CustomPage')">
<i class="el-icon-menu"></i><span>自定义页面</span>
</li>
<li class="menu_item" :class="{'Fchecked':isChecked==4}" @click="isChecked=4">
......
<template>
<div>
<script type="text/plain" id="editor"></script>
<textarea type="text/plain" :id="id"></textarea>
<!-- 选择图片 -->
<el-dialog title="选择文件" :visible.sync="changeState" width="1240px">
<ChooseImg @SelectId="SelectId"></ChooseImg>
<ChooseImg @SelectId="SelectId"></ChooseImg>
</el-dialog>
</div>
</template>
......@@ -14,10 +14,13 @@
ChooseImg
},
name: 'UE',
data () {
data() {
return {
id: 'editor' + (Math.floor((Math.random() * 10000) + 1)),
editor: null,
changeState:false,
changeState: false,
isInputChange: false,
tempContent: this.defaultMsg
}
},
props: {
......@@ -29,63 +32,82 @@
},
},
mounted() {
this.loadUe();
},
watch: {
defaultMsg(newVal, oldVal) {
if (!this.isInputChange && newVal) {
if (this.editor && this.editor.isReady === 1) {
this.editor.setContent(newVal);
} else {
this.tempContent = newVal;
}
}
if (this.isInputChange) {
this.isInputChange = false;
}
},
},
methods: {
InitData(){
const _this = this;
this.editor = UE.getEditor('editor', this.config); // 初始化UE
this.editor.addListener("ready", function () {
_this.editor.setContent(_this.defaultMsg); // 确保UE加载完成后,放入内容。
});
this.loadUe();
InitData() {
},
SelectId(e) {
if (e) {
let html = '';
this.ue = UE.getEditor('editor');
html= '<img src="' + this.domainManager().ImageUrl+e.url + '" style="max-width: 100%;">';
this.ue.execCommand('inserthtml', html);
}
this.changeState=false;
if (e) {
let html = '';
this.ue = UE.getEditor(this.id);
html = '<img src="' + this.domainManager().ImageUrl + e.url + '" style="max-width: 100%;">';
this.ue.execCommand('inserthtml', html);
}
this.isInputChange = false;
},
getUEContent() { // 获取内容方法
return this.editor.getContent()
},
loadUe() {
const vm = this;
this.ue = UE.getEditor('editor');
// this.ue.addListener('ready', editor => {
// if (this.tempContent) {
// this.ue.setContent(this.tempContent);
// }
// });
// this.ue.addListener('keyup', editor => {
// this.isInputChange = true;
// this.$emit('input', this.ue.getContent());
// });
// this.ue.addListener('contentChange', editor => {
// this.isInputChange = true;
// this.$emit('input', this.ue.getContent());
// });
const _this = this;
UE.registerUI('appinsertimage', (editor, uiName) => {
return new UE.ui.Button({
name: uiName,
title: '插入图片',
//添加额外样式,指定icon图标,这里默认使用一个重复的icon
cssRules: 'background-position: -381px 0px;',
onclick() {
self.editor = editor;
_this.changeState = true;
},
});
});
this.editor = UE.getEditor(this.id, this.config); // 初始化UE
let self = this;
UE.registerUI('appinsertimage', (editor, uiName) => {
return new UE.ui.Button({
name: uiName,
title: '插入图片',
//添加额外样式,指定icon图标,这里默认使用一个重复的icon
cssRules: 'background-position: -381px 0px;',
onclick() {
self.ue = editor
vm.changeState = true;
},
});
this.editor.addListener("ready", function () {
_this.editor.setContent(_this.defaultMsg); // 确保UE加载完成后,放入内容。
});
this.editor.addListener('ready', editor => {
if (_this.tempContent) {
_this.editor.setContent(_this.tempContent);
}
});
this.editor.addListener('keyup', editor => {
this.isInputChange = false;
_this.$emit('input', _this.editor.getContent());
});
}
this.editor.addListener('contentChange', editor => {
this.isInputChange = false;
_this.$emit('input', _this.editor.getContent());
});
}
},
destroyed() {
this.editor.destroy();
},
}
</script>
\ No newline at end of file
</script>
This diff is collapsed.
This diff is collapsed.
<template>
<div class="CustomPage">
<template v-if="CustomIsShowAdd">
<div class="head-title">
页面管理
<el-button @click="CustomIsShowAdd=false" style="float:right;margin-top: -5px;" size="small" type="primary">
新增页面
</el-button>
</div>
<div class="content">
<el-table :data="dataList" v-loading="loading" border style="width: 100%;margin:20px 0">
<el-table-column prop="Id" label="ID" width="100">
</el-table-column>
<el-table-column prop="PageName" width="436" label="标题">
</el-table-column>
<el-table-column label="导航与模板" prop="DetailsList" width="750">
<template slot-scope="scope">
<div class="templat-list">
<template v-if="scope.row.DetailsList && scope.row.DetailsList.length>0"
v-for="(subItem,subIndex) in scope.row.DetailsList">
<div class="templat-item" :key="subIndex">
<div>{{subItem.NavName}}</div>
<div style="color: rgb(153, 153, 153);">{{subItem.TemplateId}}</div>
</div>
</template>
</div>
</template>
</el-table-column>
<el-table-column prop="IsHome" label="设为首页" width="80">
<template slot-scope="scope">
<el-switch v-model="scope.row.IsHome" active-color="#409EFF" :active-value="1" :inactive-value="0">
</el-switch>
</template>
</el-table-column>
<el-table-column prop="IsUse" label="禁用/启用" width="85">
<template slot-scope="scope">
<el-switch v-model="scope.row.IsUse" active-color="#409EFF" :active-value="1" :inactive-value="0">
</el-switch>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<img @click="EditCustom(scope.row)" style="width:32px;height:32px;margin:0 10px"
src="../../assets/img/userman/edit.png" alt="">
<img @click="RemoveCustom(scope.row,6)" style="width:32px;height:32px;margin:0 10px"
src="../../assets/img/userman/del.png" alt="">
</template>
</el-table-column>
</el-table>
<el-pagination style="text-align:right" background @current-change="handleCurrentChange"
:page-size="msg.pageSize" layout="prev, pager, next" :total="total">
</el-pagination>
</div>
</template>
<template v-else>
<div class="head-title">
<span @click="CustomIsShowAdd=true" style="color:rgb(64, 158, 255);cursor:pointer;">自定义页面</span><span
style="margin:0 9px;color:#C0C4CC">/</span><span>编辑</span>
</div>
<div class="content">
<div class="conten_indder">
<el-form label-width="150px">
<el-form-item label="标题">
<el-input type="text" size="small" v-model="addMsg.PageName"></el-input>
</el-form-item>
<el-form-item label="启用/禁用">
<el-switch v-model="addMsg.IsUse" active-color="#409EFF" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item label="显示导航条">
<el-switch v-model="addMsg.IsShowNav" active-color="#409EFF" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item label="模板和导航">
<div style="max-width:480px;">
<div class="Custom_item" v-for="(item,index) in addMsg.DetailsList" :key="index">
<div flex="box:last">
<el-form label-width="80px">
<el-form-item label="导航名称" style="margin-bottom:20px;">
<el-input type="text" v-model="item.NavName" size="small"></el-input>
</el-form-item>
<el-form-item label="对应模板">
<el-input type="text" size="small" v-model="item.TemplateId">
<el-button slot="append">选择模板</el-button>
</el-input>
</el-form-item>
</el-form>
<div style="padding-left: 15px;">
<el-tooltip class="item" effect="dark" content="删除导航" placement="bottom">
<img @click="delModel(item,index)" style="cursor:pointer;"
src="../../assets/img/userman/del.png" alt="">
</el-tooltip>
</div>
</div>
</div>
<el-button type="text" @click="addModule()">
<i class="el-icon-plus"></i>
<span style="color: rgb(53, 53, 53);">新增模版和导航</span>
</el-button>
</div>
</el-form-item>
</el-form>
</div>
</div>
<el-button size="small" style="margin-top:20px;padding:9px 25px;" type="primary" @click="submitform('addMsg')">保存
</el-button>
</template>
</div>
</template>
<script>
export default {
data() {
return {
loading: false,
CustomIsShowAdd: true,
dataList: [],
msg: {
pageIndex: 1,
pageSize: 10,
},
addMsg: {
Id: 0,
PageName: '',
IsHome: 0,
IsUse: 1,
IsShowNav: 0,
DetailsList: []
},
total: 0,
};
},
components: {
},
created() {
},
methods: {
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
getList() {
this.apipost("/api/Template/GetMiniprogramPageTemplPageList", this.msg, res => {
if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData;
console.log("this.dataList", this.dataList);
this.total = res.data.data.count;
} else {
this.Info(res.data.message);
}
})
},
submitform(addMsg) {
this.apipost("/api/Template/SetMiniprogramPageTempl", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.getList();
this.CustomIsShowAdd = true;
} else {
this.Info(res.data.message);
}
})
},
//编辑
EditCustom(item) {
this.apipost("/api/Template/GetMiniprogramPageTempl", {
Id: item.Id
}, res => {
if (res.data.resultCode == 1) {
var jsonData = res.data.data;
this.addMsg.Id = jsonData.Id;
this.addMsg.PageName = jsonData.PageName;
this.addMsg.IsUse = jsonData.IsUse;
this.addMsg.IsShowNav = jsonData.IsShowNav;
this.addMsg.IsHome = jsonData.IsHome;
this.addMsg.DetailsList = jsonData.DetailsList;
this.CustomIsShowAdd = false;
} else {
this.Info(res.data.message);
}
})
},
//删除
RemoveCustom(item) {
let that = this;
that.Confirm("是否删除?", function () {
that.apipost("/api/Template/RemoveMiniprogramPageTempl", {
Id: item.Id,
Status: 1,
}, res => {
if (res.data.resultCode == 1) {
that.getList();
} else {
that.Info(res.data.message);
}
})
});
},
//新增模板导航
addModule() {
let obj = {
Id: 0,
PageTemplID: 0,
NavName: "",
TemplateId: 0,
}
this.addMsg.DetailsList.push(obj);
},
//删除模板
delModel(item, index) {
let that = this;
if (item.Id > 0) {
that.Confirm("是否删除?", function () {
that.apipost("/api/Template/RemoveMiniprogramPageTemplDetails", {
Id: item.Id,
}, res => {
if (res.data.resultCode == 1) {
that.addMsg.DetailsList.splice(index, 1);
} else {
that.Info(res.data.message);
}
})
});
} else {
that.addMsg.DetailsList.splice(index, 1);
}
}
},
mounted() {
this.getList();
}
};
</script>
<style>
.CustomPage .templat-list {
border: 1px solid #EBEEF5;
}
.CustomPage .templat-item {
line-height: 40px;
height: 40px;
display: flex;
font-size: 13px;
}
.templat-item:nth-child(odd) {
background-color: #f7f7f7;
}
.templat-item:nth-child(even) {
background-color: #fff;
}
.CustomPage .templat-item div {
width: 50%;
padding-left: 20px;
}
.CustomPage .Custom_item {
border: 1px solid #EBEEF5;
background-color: #FFF;
color: #303133;
-webkit-transition: .3s;
transition: .3s;
margin-bottom: 10px;
}
.CustomPage .Custom_item>div {
padding: 20px;
}
.CustomPage .content {
background: #fff;
margin-top: 10px;
padding: 20px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.CustomPage .conten_indder {
padding: 20px;
background-color: #fff;
padding-right: 50%;
min-width: 1100px;
}
</style>
......@@ -358,17 +358,6 @@
this.data.goodsTagPicUrl = msg.url;
this.choicImg = false;
},
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
cGoodsPicStyle(picUrl) {
let style = `background-image: url(${this.getIconLink(picUrl)});` +
`background-size: ${(this.data.fill === 1 ? 'cover' : 'contain')};`;
......
......@@ -433,11 +433,9 @@
<el-form-item v-if="data.type === 'before-video'" label="视频播放链接" prop="video_url">
<el-input v-model="data.video_url" placeholder="请输入视频原地址或选择上传视频">
<template slot="append">
<!-- <app-attachment :multiple="false" :max="1" v-model="data.video_url" type="video"> -->
<el-tooltip class="item" effect="dark" content="支持格式mp4;支持编码H.264;视频大小不能超过50 MB" placement="top">
<el-button size="mini" @click="choicImg=true">添加视频</el-button>
</el-tooltip>
<!-- </app-attachment> -->
<el-tooltip class="item" effect="dark" content="支持格式mp4;支持编码H.264;视频大小不能超过50 MB" placement="top">
<el-button size="mini" @click="changeState1=true">添加视频</el-button>
</el-tooltip>
</template>
</el-input>
<el-link class="box-grow-0" type="primary" style="font-size:12px" v-if='data.video_url' :underline="false"
......@@ -499,20 +497,26 @@
<el-dialog title="选择文件" :visible.sync="choicImg" width="1240px">
<ChooseImg @SelectId="SelectId"></ChooseImg>
</el-dialog>
<!-- 选择视频 -->
<el-dialog title="选择文件" :visible.sync="changeState1" width="1240px">
<Choosevideo @Selectvideo="Selectvideo"></Choosevideo>
</el-dialog>
</div>
</template>
<script>
import ChooseImg from "@/components/global/ChooseImg.vue";
import Choosevideo from "@/components/global/Choosevideo.vue";
export default {
props: ["advData", "index", "dataLeng"],
components: {
ChooseImg
ChooseImg,
Choosevideo
},
data() {
return {
loading: false,
choicImg:false,
changeState1:false,
data: this.advData.data,
};
......@@ -532,22 +536,16 @@
couponClose(row, index) {
row.award_coupons.splice(index, 1);
},
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
//选择图片
SelectId(msg) {
this.data.pic_url = msg.url;
this.choicImg = false;
},
//选择视频
Selectvideo(val){
this.data.video_url=val.Path;
this.changeState1=false;
}
},
computed: {
......
......@@ -350,17 +350,6 @@
this.data.goodsTagPicUrl = msg.url;
this.choicImg = false;
},
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
cGoodsPicStyle(picUrl) {
let style = `background-image: url(${this.getIconLink(picUrl)});` +
`background-size: ${(this.data.fill === 1 ? 'cover' : 'contain')};`;
......
......@@ -330,17 +330,6 @@
this.data.goodsTagPicUrl = msg.url;
this.choicImg = false;
},
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
cGoodsPicStyle(picUrl) {
let style = `background-image: url(${this.getIconLink(picUrl)});` +
`background-size: ${(this.data.fill === 1 ? 'cover' : 'contain')};`;
......
......@@ -95,16 +95,6 @@
this.data.backgroundPicUrl = msg.url;
this.choicImg = false;
},
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
// 热区选择(edit)
selectHotspot(e) {
if (e && e.length) {
......
......@@ -92,16 +92,6 @@
this.data.picUrl = msg.url;
this.choicImg = false;
},
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
//获取选择链接
getChoiceLink() {
//调用子组件方法
......
......@@ -136,16 +136,6 @@
}
this.choicImg = false;
},
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
}
},
computed: {
cListStyle() {
......
......@@ -675,17 +675,6 @@
this.data.goodsTagPicUrl = msg.url;
this.choicImg = false;
},
//判断是否包含http
getIconLink(url){
let str=''
if(url.indexOf('http')!=-1){
str=url
}else{
str= 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com'+url
}
return str;
},
//选择商品分类
getChoiceFenlei(){
var ckedArr=this.$refs.ChooseFenlei.getChoicedFenlei();
......
<style>
.diy-image-text {
width: 100%;
height: 500px;
overflow: hidden;
overflow-y: auto;
}
.bb {
visibility: hidden;
}
.classA {
visibility: visible;
}
</style>
<template>
<div :class="{'active':imageData.isCked}">
<div class="diy-component-options" v-if="imageData.isCked">
<el-button type="primary" icon="el-icon-delete" style="left: -25px; top: 0px;" @click="delPlugin()"></el-button>
<el-button type="primary" icon="el-icon-document-copy" style="left: -25px; top: 30px;"></el-button>
<el-button type="primary" icon="el-icon-arrow-up" v-if="index>0" @click="resetSord(0)"
style="right: -25px; top: 0;"></el-button>
<el-button type="primary" icon="el-icon-arrow-down" v-if="index!=dataLeng-1" @click="resetSord(1)"
style="right: -25px; top: 30px;"></el-button>
</div>
<div class="diy-modal">
<div class="diy-component-preview">
<div class="diy-image-text">
<div v-if="data.content" v-html="data.content"></div>
<div v-else flex="main:center" style="line-height: 500px;color: rgb(173, 177, 184);">图文详情</div>
</div>
</div>
<div class="diy-component-edit bb" :class="{'classA':imageData.isCked}">
<UE :defaultMsg="defaultMsg" :config="config" ref="ue" @input="input"></UE>
</div>
</div>
</div>
</template>
<script>
import UE from '@/components/global/UE.vue'
export default {
props: ["imageData", "index", "dataLeng"],
components: {
UE
},
data() {
return {
data: this.imageData.data,
defaultMsg: '',
config: {
initialFrameWidth: null,
initialFrameHeight: 350,
},
content: ''
};
},
created() {},
methods: {
//向父组件传值 并调用排序
resetSord(IsUp) {
this.$emit('getSord', this.index, IsUp);
},
//点击触发父组件删除
delPlugin() {
this.$emit('comDelPlugin', this.index);
},
input(obj) {
this.data.content = obj
},
},
computed: {},
mounted() {
this.$refs.ue.InitData();
},
watch: {
defaultMsg: {
handler(newVal, oldVal) {
console.log(newVal);
},
deep: true
}
}
};
</script>
......@@ -389,17 +389,6 @@
}
this.choicImg = false;
},
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
cGoodsPicStyle(picUrl) {
let style = `background-image: url(${this.getIconLink(picUrl)});` +
`background-size: ${(this.data.fill === 1 ? 'cover' : 'contain')};`;
......
......@@ -281,16 +281,6 @@
this.data.picUrl = msg.url;
this.choicImg = false;
},
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
//获取选择链接
getChoiceLink() {
//调用子组件方法
......
......@@ -333,16 +333,6 @@
this.data.goodsTagPicUrl = msg.url;
this.choicImg = false;
},
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
cGoodsPicStyle(picUrl) {
let style = `background-image: url(${this.getIconLink(picUrl)});` +
......
......@@ -103,16 +103,6 @@
this.data.backgroundPicUrl = msg.url;
this.choicImg = false;
},
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
//得到地图信息
mapEvent(e) {
this.data.location = e.lat + ',' + e.long;
......
......@@ -205,17 +205,6 @@
this.data.list[this.comImgIndex].link.url = obj.PageUrl;
this.isShowLink = false;
},
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
},
computed: {
......
......@@ -377,16 +377,6 @@
this.commonIndex=index;
this.selectType=2;
},
//判断是否包含http
getIconLink(url){
let str=''
if(url.indexOf('http')!=-1){
str=url
}else{
str= 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com'+url
}
return str;
},
//点击触发父组件删除
delPlugin(){
this.$emit('comDelPlugin', this.index);
......
......@@ -230,16 +230,6 @@
}
this.choicImg = false;
},
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
}
},
computed: {
cStyle() {
......
......@@ -310,16 +310,6 @@
this.data.goodsTagPicUrl = msg.url;
this.choicImg = false;
},
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
cGoodsPicStyle(picUrl) {
let style = `background-image: url(${this.getIconLink(picUrl)});` +
......
......@@ -58,7 +58,6 @@
<el-radio v-model="data.navStyle" :label="2">样式2(全部展示)</el-radio>
</el-form-item>
<el-form-item label="收起图标">
<app-image-upload width="100" height="100" v-model="data.closedPicUrl"></app-image-upload>
<div class="zk_pic_box" @click="choicImg=true,getImgUtl(1)"
flex="main:center cross:center"
:style="{backgroundImage:'url(' + getIconLink(data.closedPicUrl) + ')'}">
......@@ -190,11 +189,17 @@
<el-switch v-model="data.customize.opened"></el-switch>
</el-form-item>
<el-form-item v-if="data.customize.opened" label="图标">
<app-image-upload width="100" height="100" v-model="data.customize.picUrl"></app-image-upload>
<div class="zk_pic_box" @click="choicImg=true,getImgUtl(9)"
flex="main:center cross:center"
:style="{backgroundImage:'url(' + getIconLink(data.customize.picUrl) + ')'}">
<i v-if="data.customize.picUrl==''" class="el-icon-picture-outline"></i>
<el-button type="danger" v-if="data.customize.picUrl!=''" class="image-delete" size="mini"
icon="el-icon-close" @click.stop="data.customize.picUrl=''" circle></el-button>
</div>
</el-form-item>
<el-form-item v-if="data.customize.opened" label="跳转链接">
<el-input :disabled="true" size="small" v-model="data.customize.link_url" autocomplete="off">
<el-button size="mini" @click="isShowLink=true">选择链接</el-button>
<el-button slot="append" size="mini" @click="isShowLink=true">选择链接</el-button>
</el-input>
</el-form-item>
</div>
......@@ -280,6 +285,9 @@
case 8:
this.data.mapNav.picUrl=msg.url;
break;
case 9:
this.data.customize.picUrl=msg.url;
break;
}
this.choicImg = false;
},
......@@ -290,22 +298,12 @@
this.data.customize.link_url = obj.PageUrl;
this.isShowLink = false;
},
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
getImgUtl(type,) {
this.type = type;
},
mapEvent(e) {
this.data.mapNav.location = e.lat + ',' + e.long;
this.isShowMap=false;
},
},
......
......@@ -224,16 +224,6 @@
}
this.choicImg = false;
},
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
deleteStore(index) {
this.data.list.splice(index, 1);
},
......
......@@ -100,16 +100,6 @@
this.data.picUrl = msg.url;
this.choicImg = false;
},
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
//获取选择链接
getChoiceLink() {
//调用子组件方法
......
......@@ -89,16 +89,6 @@
this.data.backgroundPicUrl = msg.url;
this.choicImg = false;
},
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
},
computed: {
cFlexDir() {
......
......@@ -101,16 +101,6 @@
this.data.navs[this.ckedIndex].picUrl = msg.url;
this.choicImg = false;
},
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
//点击选图片
getImgChoice(index) {
this.choicImg = true;
......
......@@ -53,7 +53,7 @@
</label>
<el-input size="small" v-model="data.url" placeholder="请输入视频原地址或选择上传视频">
<template slot="append">
<el-button size="mini" @click="choicImg=true">选择文件</el-button>
<el-button size="mini" @click="changeState1=true">选择文件</el-button>
</template>
</el-input>
</el-form-item>
......@@ -62,19 +62,27 @@
<!-- 选择图片文件 -->
<el-dialog title="选择文件" :visible.sync="choicImg" width="1240px">
<ChooseImg @SelectId="SelectId"></ChooseImg>
</el-dialog>
<!-- 选择视频 -->
<el-dialog title="选择文件" :visible.sync="changeState1" width="1240px">
<Choosevideo @Selectvideo="Selectvideo"></Choosevideo>
</el-dialog>
</div>
</template>
<script>
import ChooseImg from "@/components/global/ChooseImg.vue";
import Choosevideo from "@/components/global/Choosevideo.vue";
export default {
props: ["videoData", "index", "dataLeng"],
components: {
ChooseImg
ChooseImg,
Choosevideo
},
data() {
return {
choicImg: false,
changeState1:false,
data: this.videoData.data,
};
},
......@@ -95,16 +103,11 @@
this.data.pic_url = msg.url;
this.choicImg = false;
},
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
}
//选择视频
Selectvideo(val){
this.data.url=val.Path;
this.changeState1=false;
},
},
computed: {
......
......@@ -311,17 +311,6 @@
}
this.choicImg = false;
},
//判断是否包含http
getIconLink(url) {
let str = ''
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
},
chooseColor() {
this.data.background = this.background;
},
......
......@@ -37,7 +37,7 @@
<h3 class="plugin_ListTitle">已安装</h3>
</div>
<div class="plugin-list el-row">
<div class="el-col el-col-24 el-col-xs-24 el-col-sm-12 el-col-md-8 el-col-lg-6 el-col-xl-4">
<div class="el-col el-col-24 el-col-xs-24 el-col-sm-12 el-col-md-8 el-col-lg-6 el-col-xl-4" @click="goDiyCenter('Fsetting')">
<div flex="dir:left box:first" class="plugin-item">
<div style="padding-right: 12px;"><img src="../../assets/img/sallCenter/icon.png" style="width: 50px; height: 50px; display: block;"></div>
<div>
......@@ -47,7 +47,7 @@
</div>
</div>
</div>
<div class="el-col el-col-24 el-col-xs-24 el-col-sm-12 el-col-md-8 el-col-lg-6 el-col-xl-4" @click="goDiyCenter">
<div class="el-col el-col-24 el-col-xs-24 el-col-sm-12 el-col-md-8 el-col-lg-6 el-col-xl-4" @click="goDiyCenter('Ftemplate')">
<div flex="dir:left box:first" class="plugin-item">
<div style="padding-right: 12px;"><img src="../../assets/img/sallCenter/Diy.png" style="width: 50px; height: 50px; display: block;"></div>
<div>
......@@ -74,9 +74,9 @@
},
methods: {
//跳转微信小程序
goDiyCenter(){
goDiyCenter(path){
let routeData = this.$router.resolve({
name: 'Ftemplate',
name: path,
query: {}
});
window.open(routeData.href, "_blank");
......
......@@ -171,7 +171,7 @@
<div class="all-components">
<el-form label-width="80px">
<el-form-item label="模板名称">
<el-input type="text" size="small"></el-input>
<el-input type="text" size="small" v-model="addMsg.TemplateName"></el-input>
</el-form-item>
<el-form-item label="背景设置">
<el-button size="small">设置</el-button>
......@@ -262,6 +262,8 @@
:index="index" :dataLeng="dataList.length"></modal>
<quickNav v-if="item.Id=='quick-nav'" :quickData="item" @getSord="getSord" @comDelPlugin="comDelPlugin"
:index="index" :dataLeng="dataList.length"></quickNav>
<imageText v-if="item.Id=='image-text'" :imageData="item" @getSord="getSord" @comDelPlugin="comDelPlugin"
:index="index" :dataLeng="dataList.length"></imageText>
</div>
</div>
</div>
......@@ -269,7 +271,7 @@
</div>
</div>
<div class="tpEdit_btmMenu">
<el-button type="primary" size="small" @click="getAllData()">保存</el-button>
<el-button type="primary" size="small" @click="SaveData()">保存</el-button>
</div>
</div>
</template>
......@@ -303,9 +305,17 @@
import advert from "../sallCenter/plugin/advert.vue"
import modal from "../sallCenter/plugin/modal.vue"
import quickNav from "../sallCenter/plugin/quick-nav.vue"
import imageText from "../sallCenter/plugin/image-text.vue"
export default {
data() {
return {
addMsg: {
Id: 0, //编号
TemplateName: '', //模板名称
TemplateData: '',
ComponentDataList:[],
},
allComponents: [],
dataList: [],
//是否为空
......@@ -344,7 +354,8 @@
empty,
advert,
modal,
quickNav
quickNav,
imageText
},
methods: {
//获取左侧菜单
......@@ -667,7 +678,7 @@
Id: 'image-text',
isCked: false,
data: {
position: 'auto'
content: '',
}
}
this.dataList.push(tuwenObj);
......@@ -1081,11 +1092,37 @@
item.isCked = true;
},
//点击保存
getAllData() {
console.log(this.dataList, 'dataListtt');
SaveData() {
this.addMsg.ComponentDataList = this.dataList;
console.log("addMsg", this.addMsg);
this.apipost("/api/Template/SetMiniTemplate", this.addMsg, res => {
console.log(res.data)
if (res.data.resultCode == 1) {
} else {
this.Info(res.data.message);
}
})
},
GetData() {
this.apipost("/api/Template/SetMiniTemplate", {
Id: this.addMsg.Id
}, res => {
console.log(res.data)
if (res.data.resultCode == 1) {} else {
this.Info(res.data.message);
}
})
}
},
mounted() {
if (this.$route.query.Id) {
this.addMsg.Id = this.$route.query.Id;
}
if (this.addMsg.Id > 0) {
this.GetData();
}
this.GetPlugInList();
}
};
......
<style>
.templateManage .template_comheader{
padding: 13px 20px;
border-bottom: 1px solid #EBEEF5;
-webkit-box-sizing: border-box;
box-sizing: border-box;
background: #fff;
}
.templateManage .template_comheader>div{
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: row;
}
.templateManage .temp_content{
margin-top:10px;
background: #fff;
padding:20px;
}
.templateManage .temp_imgStyle{
display:inline-block;
margin-right:10px;
}
.templateManage .template_comheader {
padding: 13px 20px;
border-bottom: 1px solid #EBEEF5;
-webkit-box-sizing: border-box;
box-sizing: border-box;
background: #fff;
}
.templateManage .template_comheader>div {
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: row;
}
.templateManage .temp_content {
margin-top: 10px;
background: #fff;
padding: 20px;
}
.templateManage .temp_imgStyle {
display: inline-block;
margin-right: 10px;
}
</style>
<template>
<div class="templateManage">
<div class="template_comheader">
<div>
<span>模板管理</span>
<el-button type="primary" size="small" @click="CommonJump('templateEdit')">添加模板</el-button>
</div>
</div>
<div class="temp_content">
<el-table :data="tableData" border style="width: 100%">
<el-table-column prop="ID" label="ID"></el-table-column>
<el-table-column prop="name" label="模板名称"></el-table-column>
<el-table-column prop="date" label="创建时间"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="编辑" placement="top" >
<img src="../../assets/img/setup/edit.png" alt="" class="temp_imgStyle" @click="edit(scope.row)">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top" >
<img src="../../assets/img/setup/del.png" alt="" class="temp_imgStyle" @click="delRow(scope.row)">
</el-tooltip>
</template>
</el-table-column>
</el-table>
</div>
<div class="templateManage">
<div class="template_comheader">
<div>
<span>模板管理</span>
<el-button type="primary" size="small" @click="CommonJump('templateEdit',{Id:0})">添加模板</el-button>
</div>
</div>
<div class="temp_content">
<el-table :data="dataList" border style="width: 100%">
<el-table-column prop="Id" label="编号"></el-table-column>
<el-table-column prop="TemplateName" label="模板名称"></el-table-column>
<el-table-column prop="CreateDateStr" label="创建时间"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="编辑" placement="top">
<img src="../../assets/img/setup/edit.png" alt="" class="temp_imgStyle" @click="EditeTemplate(scope.row)">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<img src="../../assets/img/setup/del.png" alt="" class="temp_imgStyle" @click="DeleteTemplate(scope.row)">
</el-tooltip>
</template>
</el-table-column>
</el-table>
</div>
</div>
</template>
<script>
export default {
data() {
return {
tableData: [{
ID: '3542',
name: '微途测试',
date: '2020-04-27 19:20:08',
}]
dataList: [],
qMsg: {
pageIndex: 1,
pageSize: 20,
},
total: 0
};
},
created() {
},
methods: {
getList() {
this.apipost("/api/Template/GetMiniTemplatePageList", this.qMsg, res => {
if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
} else {
this.Info(res.data.message);
}
})
},
//修改模板
EditeTemplate(item) {
this.CommonJump('templateEdit', {
Id: item.Id
});
},
//删除模板
DeleteTemplate(item) {
let that = this;
that.Confirm("是否删除?", function () {
that.apipost("/api/Template/RemoveMiniTemplate", {
Id: item.Id,
Status: 1,
}, res => {
if (res.data.resultCode == 1) {
that.getList();
} else {
that.Info(res.data.message);
}
})
});
}
},
mounted() {
this.getList();
}
};
</script>
</script>
\ No newline at end of file
......@@ -54,9 +54,9 @@ export default {
//域名管理对象
Vue.prototype.domainManager = function () {
let domainUrl = '';
domainUrl = "http://192.168.2.214:8200";
//domainUrl = "http://192.168.2.214:8200";
// domainUrl = "https://localhost:5001";
domainUrl = "http://192.168.2.65";
domainUrl = "http://192.168.0.102:8200";
// domainUrl = "http://192.168.2.17:8088";
let locationName = window.location.hostname;
......@@ -182,7 +182,19 @@ export default {
query: obj
});
}
//公用判断图片地址 判断是否包含http
Vue.prototype.getIconLink = function (url) {
let str = ''
if(url!=''){
if (url.indexOf('http') != -1) {
str = url
} else {
str = 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + url
}
return str;
}
}
//HTTP提交数据
Vue.prototype.apipost = function (cmd, msg, successCall, faildCall, isOnline) {
if (msg == null || msg == "") {
......
......@@ -80,6 +80,10 @@ export default new Router({
path:'/templateEdit',
name: 'templateEdit',
component: resolve => require(['@/components/sallCenter/templateEdit'], resolve),
},{ //自定义页面
path:'/CustomPage',
name: 'CustomPage',
component: resolve => require(['@/components/sallCenter/CustomPage'], resolve),
}]
},
{
......@@ -224,6 +228,18 @@ export default new Router({
name: 'goodsListEdit',
component: resolve => require(['@/components/CommodityMan/goodsListEdit'], resolve),
},
// 商品管理 商品列表新增
{
path: '/orderList',
name: 'orderList',
component: resolve => require(['@/components/orderMan/orderList'], resolve),
},
// 商品管理 商品详情
{
path: '/orderDetails',
name: 'orderDetails',
component: resolve => require(['@/components/orderMan/orderDetails'], resolve),
},
//设置 基础设置
{
path: '/basicSetUp',
......
......@@ -664,6 +664,6 @@ UE.I18N['zh-cn'] = {
},
'autosave': {
'saving':'保存中...',
'success':'本地保存成功'
'success':''
}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment