Commit c47fd0fb authored by 黄媛媛's avatar 黄媛媛
parents 6ad24911 cc4c6363
...@@ -18,20 +18,23 @@ ...@@ -18,20 +18,23 @@
</div> </div>
</div> </div>
<el-table :data="dataList" v-loading="loading" border style="width: 100%;margin:20px 0"> <el-table :data="dataList" v-loading="loading" border style="width: 100%;margin:20px 0">
<el-table-column prop="id" label="ID" width="150"> <el-table-column prop="Id" label="ID" width="150">
</el-table-column> </el-table-column>
<el-table-column prop="title" label="标题" width="829"> <el-table-column prop="Title" label="标题" width="829">
</el-table-column> </el-table-column>
<el-table-column prop="sort" label="排序" width="250"> <el-table-column prop="SortNum" label="排序" width="250">
</el-table-column> </el-table-column>
<el-table-column prop="status" label="状态" width="150"> <el-table-column prop="IsDisable" label="状态" width="150">
<template slot-scope="scope">
<el-switch v-model="scope.row.IsDisable" active-color="#409EFF" :active-value="1" :inactive-value="0"
@change="updateIsDisable(scope.row)">
</el-switch>
</template>
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<img @click="EditArticle(scope.row)" class="operatImg" <img @click="EditArticle(scope.row)" class="operatImg" src="../../assets/img/userman/edit.png" alt="">
src="../../assets/img/userman/edit.png" alt=""> <img @click="RemoveArticle(scope.row)" class="operatImg" src="../../assets/img/userman/del.png" alt="">
<img @click="RemoveArticle(scope.row)" class="operatImg"
src="../../assets/img/userman/del.png" alt="">
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -49,19 +52,19 @@ ...@@ -49,19 +52,19 @@
<div class="Article_condiv"> <div class="Article_condiv">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="100px" style="padding:0 20px;"> <el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="100px" style="padding:0 20px;">
<el-form-item label="标题" prop="title"> <el-form-item label="标题" prop="title">
<el-input v-model="addMsg.title" size="small" placeholder="请输入名称" maxlength="20" /> <el-input v-model="addMsg.Title" size="small" placeholder="请输入名称" maxlength="100" />
</el-form-item> </el-form-item>
<el-form-item label="排序"> <el-form-item label="排序">
<el-input type="text" v-model="addMsg.Sort" size="small" placeholder="请输入排序" <el-input type="text" v-model="addMsg.SortNum" @keyup.native="checkInteger(addMsg,'SortNum')" size="small"
maxlength="4" /> placeholder="请输入排序" maxlength="4" />
</el-form-item> </el-form-item>
<el-form-item label="状态"> <el-form-item label="状态">
<el-switch v-model="addMsg.status" active-color="#409EFF" :active-value="1" :inactive-value="0"> <el-switch v-model="addMsg.IsDisable" active-color="#409EFF" :active-value="1" :inactive-value="0">
</el-switch> </el-switch>
</el-form-item> </el-form-item>
<el-form-item label="内容"> <el-form-item label="内容">
<div style="line-height:normal;"> <div style="line-height:normal;">
<UE :defaultMsg="defaultMsg" :config="config" ref="ue" @input="input"></UE> <UE :defaultMsg="addMsg.Content" :config="config" ref="ue" @input="input"></UE>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -80,32 +83,32 @@ ...@@ -80,32 +83,32 @@
//是否线下链接弹窗 //是否线下链接弹窗
loading: false, loading: false,
dataList: [{ dataList: [{
id:123, id: 123,
title:'标题', title: '标题',
sort:1, sort: 1,
status:0 status: 0
}], }],
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 15, pageSize: 15,
NavIconName: "",
MallBaseId: 0,
NavIconIsShow:-1
}, },
total: 0, total: 0,
ArticleIsShowAdd: true, ArticleIsShowAdd: true,
addMsg: { addMsg: {
title:'', //标题 Id: 0, //文章编号
Sort:'', //排序 Title: '', //标题
status:0, //状态 SortNum: 0, //排序
content:'' // 内容 IsDisable: 0, //禁用状态(0-禁用,1-启用)
Content: '' // 内容
}, },
rules:{ rules: {
title: [ Title: [{
{ required: true, message: '标题不能为空', trigger: 'change' } required: true,
], message: '标题不能为空',
trigger: 'change'
}],
}, },
defaultMsg: '',
config: { config: {
initialFrameWidth: null, initialFrameWidth: null,
initialFrameHeight: 350, initialFrameHeight: 350,
...@@ -119,25 +122,19 @@ ...@@ -119,25 +122,19 @@
}, },
methods: { methods: {
getMenu() {
//调用子组件方法
var obj = this.$refs.chooseMeun.getChooseMenu();
this.addMsg.NavIconUrl = obj.PageUrl;
this.isShowLink = false;
},
handleCurrentChange(val) { handleCurrentChange(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getList(); this.getList();
}, },
getList() { getList() {
// this.apipost("/api/Tenant/GetMiniProgrameNaviconPage", this.msg, res => { this.apipost("/api/MContent/GetArticlePageList", this.msg, res => {
// if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
// this.dataList = res.data.data.pageData; this.dataList = res.data.data.pageData;
// this.total = res.data.data.count; this.total = res.data.data.count;
// } else { } else {
// this.Info(res.data.message); this.Info(res.data.message);
// } }
// }) })
}, },
submitform(addMsg) { submitform(addMsg) {
//提交创建、修改表单 //提交创建、修改表单
...@@ -151,18 +148,39 @@ ...@@ -151,18 +148,39 @@
}, },
//保存 //保存
saveMsg() { saveMsg() {
this.apipost("/api/MContent/SetArticle", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.ArticleIsShowAdd = true;
this.getList();
this.Success(res.data.message);
} else {
this.Info(res.data.message);
}
})
}, },
//修改 //修改
EditArticle(item) { EditArticle(item) {
this.apipost("/api/MContent/GetArticle", {
Id: item.Id
}, res => {
if (res.data.resultCode == 1) {
var jsonData = res.data.data;
this.addMsg.Id = jsonData.Id;
this.addMsg.Title = jsonData.Title;
this.addMsg.SortNum = jsonData.SortNum;
this.addMsg.IsDisable = jsonData.IsDisable;
this.addMsg.Content = jsonData.Content
} else {
this.Info(res.data.message);
}
})
}, },
//删除 //删除
RemoveArticle(item) { RemoveArticle(item) {
var that = this; var that = this;
that.Confirm("是否要删除?", function () { that.Confirm("是否要删除?", function () {
that.apipost("/api/Tenant/RemoveMiniProgrameNavicon", { that.apipost("/api/MContent/RemoveArticle", {
NavIconId: item.NavIconId Id: item.Id
}, res => { }, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
that.getList(); that.getList();
...@@ -172,8 +190,21 @@ ...@@ -172,8 +190,21 @@
}) })
}) })
}, },
//更新状态
updateIsDisable(item)
{
this.apipost("/api/MContent/SetArticle", {Id:item.Id,IsDisable:item.IsDisable}, res => {
if (res.data.resultCode == 1) {
this.ArticleIsShowAdd = true;
this.getList();
this.Success(res.data.message);
} else {
this.Info(res.data.message);
}
})
},
input(obj) { input(obj) {
this.addMsg.content = obj this.addMsg.Content = obj;
}, },
}, },
mounted() { mounted() {
...@@ -183,7 +214,6 @@ ...@@ -183,7 +214,6 @@
</script> </script>
<style> <style>
.Article .content .searchInput { .Article .content .searchInput {
border: 1px solid #DCDFE6; border: 1px solid #DCDFE6;
border-radius: 4px; border-radius: 4px;
...@@ -212,15 +242,18 @@ ...@@ -212,15 +242,18 @@
padding: 20px; padding: 20px;
box-sizing: border-box; box-sizing: border-box;
} }
.Article .operatImg{
width:32px; .Article .operatImg {
height:32px; width: 32px;
margin:0 10px height: 32px;
margin: 0 10px
} }
.Article .Article_condiv{
.Article .Article_condiv {
padding: 20px 0; padding: 20px 0;
background-color: #fff; background-color: #fff;
margin-bottom: 20px; margin-bottom: 20px;
padding-right: 50%; padding-right: 50%;
} }
</style> </style>
...@@ -57,7 +57,13 @@ ...@@ -57,7 +57,13 @@
margin-bottom: 10px; margin-bottom: 10px;
position: relative; position: relative;
} }
.diy-rubik .layout .rubik .delete {
position: absolute;
right: -16px;
top: -16px;
padding: 8px;
z-index: 14;
}
</style> </style>
<template> <template>
<div :class="{'active':rubData.isCked}"> <div :class="{'active':rubData.isCked}">
......
...@@ -430,18 +430,18 @@ ...@@ -430,18 +430,18 @@
Id: 'notice', Id: 'notice',
isCked: false, isCked: false,
data: { data: {
name: '公告', name: '公告', //公告名称
content: '', content: '', //公告内容
icon: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/icon-notice.png', icon: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/icon-notice.png', //公告图标
textColor: '#ffffff', textColor: '#ffffff', //文字颜色
background: '#f67f79', background: '#f67f79', //背景颜色
headerUrl: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/icon-notice-title.png', headerUrl: 'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/icon-notice-title.png', //头部图片
btnColor: '#ff4544', btnColor: '#ff4544', //按钮颜色
btnWidth: 500, btnWidth: 500, //按钮宽度
btnHeight: 80, btnHeight: 80, //按钮高度
btnRadius: 40, btnRadius: 40, //按钮圆角
btnText: '我知道了', btnText: '我知道了', //按钮文本内容
btnTextColor: '#ffffff' btnTextColor: '#ffffff' //按钮文本颜色
} }
} }
this.dataList.push(noticeObj); this.dataList.push(noticeObj);
...@@ -558,10 +558,10 @@ ...@@ -558,10 +558,10 @@
Id: 'copyright', Id: 'copyright',
isCked: false, isCked: false,
data: { data: {
picUrl: '', picUrl: '', //版权图标
text: '', text: '', //版权文字
link: '', link: '', //版权链接
backgroundColor: '#fff', backgroundColor: '#fff', //背景颜色
} }
} }
this.dataList.push(copyObj); this.dataList.push(copyObj);
...@@ -587,9 +587,9 @@ ...@@ -587,9 +587,9 @@
Id: 'user-info', Id: 'user-info',
isCked: false, isCked: false,
data: { data: {
style: 1, style: 1, //样式
backgroundPicUrl: '', backgroundPicUrl: '', //背景图片
backgroundColor: '#ffffff', backgroundColor: '#ffffff', //背景颜色
} }
} }
this.dataList.push(userObj); this.dataList.push(userObj);
...@@ -880,29 +880,24 @@ ...@@ -880,29 +880,24 @@
Id: 'advance', Id: 'advance',
isCked: false, isCked: false,
data: { data: {
buttonColor: '#ff4544', buttonColor: '#ff4544', //购买按钮颜色
list: [], list: [], //商品列表
listStyle: 1, listStyle: 1, //列表样式
fill: 1, fill: 1, //商品封面图填充
goodsCoverProportion: '1-1', goodsCoverProportion: '1-1', //商品封面图宽高比例
goodsStyle: 1, goodsStyle: 1, //商品样式
textStyle: 1, textStyle: 1, //文本样式
showGoodsName: true, showGoodsName: true, //显示商品名称
showBuyBtn: true, showBuyBtn: true, //显示购买按钮
buyBtnStyle: 1, buyBtnStyle: 1, //购买按钮样式
buyBtnText: '抢购', buyBtnText: '抢购', //购买按钮文字
showGoodsTag: false, showGoodsTag: false, //显示商品角标
customizeGoodsTag: false, customizeGoodsTag: false, //自定义商品角标样式
goodsTagPicUrl: '', goodsTagPicUrl: '', //自定义商品角标
goodsIndex: 0, backgroundColor: '#fff', //背景颜色
start_x: 0, backgroundPicUrl: '', //背景图
showImg: false, backgroundHeight: 100, //背景高度百分比
backgroundColor: '#fff', backgroundWidth: 100, //背景宽度百分比
backgroundPicUrl: '',
position: 5,
mode: 1,
backgroundHeight: 100,
backgroundWidth: 100,
} }
} }
this.dataList.push(advanceObj); this.dataList.push(advanceObj);
...@@ -913,21 +908,21 @@ ...@@ -913,21 +908,21 @@
Id: 'vip-card', Id: 'vip-card',
isCked: false, isCked: false,
data: { data: {
background: '#FFFFFF', background: '#FFFFFF', //背景色
usePluginConfig: true, usePluginConfig: true, //使用插件配置
top_bottom_padding: 0, top_bottom_padding: 0, //上下间距
buy_bg: 'http://wx.weibaoge.cn/web/statics/img/app/vip_card/buy_bg.png', buy_bg: 'http://wx.weibaoge.cn/web/statics/img/app/vip_card/buy_bg.png', //未购买用户默认背景图
renew_bg: 'http://wx.weibaoge.cn/web/statics/img/app/vip_card/buy_bg.png', renew_bg: 'http://wx.weibaoge.cn/web/statics/img/app/vip_card/buy_bg.png', //未购买用户背景图
buy_big_color: '', buy_big_color: '', //未购买用户-大标题字体颜色
buy_small_color: '', buy_small_color: '', //未购买用户-小标题背景颜色
buy_btn_color: '', buy_btn_color: '', //未购买用户-按钮文字颜色
buy_btn_bg_color: '', buy_btn_bg_color: '', //未购买用户-按钮颜色
buy_big: '', buy_big: '', //未购买用户-大标题文字
buy_small: '', buy_small: '', //未购买用户-小标题文字
buy_btn_text: '', buy_btn_text: '', //未购买用户-按钮文字
renew_text_color: '', renew_text_color: '', //已购买用户-文字颜色
renew_btn_bg_color: '', renew_btn_bg_color: '',//已购买用户-按钮背景色
renew_text: '', renew_text: '', //已购买用户-标题文字
} }
} }
this.dataList.push(vipObj); this.dataList.push(vipObj);
...@@ -938,10 +933,10 @@ ...@@ -938,10 +933,10 @@
Id: 'live', Id: 'live',
isCked: false, isCked: false,
data: { data: {
background: '#f7f7f7', background: '#f7f7f7', //背景颜色
is_show_goods: true, is_show_goods: true, //显示商品
style_type: 1, style_type: 1, //卡片样式
number: 5, number: 5, //直播间数量
} }
} }
this.dataList.push(liveObj); this.dataList.push(liveObj);
...@@ -952,8 +947,8 @@ ...@@ -952,8 +947,8 @@
Id: 'empty', Id: 'empty',
isCked: false, isCked: false,
data: { data: {
background: '#ffffff', background: '#ffffff', //背景颜色
height: 10, height: 10, //高度
} }
} }
this.dataList.push(emptyObj); this.dataList.push(emptyObj);
...@@ -964,21 +959,21 @@ ...@@ -964,21 +959,21 @@
Id: 'ad', Id: 'ad',
isCked: false, isCked: false,
data: { data: {
id: '', id: '', //广告位ID
type: '', type: '', //广告位类型
pic_url: '', pic_url: '', //广告封面图
video: '', video_url: '', //视频播放链接
award_type: '0', award_type: '0', //广告奖励
award_coupons: [ award_coupons: [ //优惠券
/*{ /*{
send_num: 3, send_num: 3,
name: '优惠券', name: '优惠券',
coupon_id: 710, coupon_id: 710,
} */ } */
], ],
award_num: '', award_num: '', //积分数量
award_limit_type: '0', award_limit_type: '0', //奖励发放限制
award_limit: 0, award_limit: 0, //限制次数
} }
} }
this.dataList.push(adObj); this.dataList.push(adObj);
...@@ -989,15 +984,15 @@ ...@@ -989,15 +984,15 @@
Id: 'modal', Id: 'modal',
isCked: false, isCked: false,
data: { data: {
opened: false, opened: false, //是否开启
list: [{ list: [{ //广告图片数组
picUrl: '', picUrl: '',
link: { link: {
url: '', url: '',
openType: '', openType: '',
}, },
}, ], }, ],
times: 0 times: 0 //弹窗次数
} }
} }
this.dataList.push(modalObj); this.dataList.push(modalObj);
...@@ -1008,42 +1003,42 @@ ...@@ -1008,42 +1003,42 @@
Id: 'quick-nav', Id: 'quick-nav',
isCked: false, isCked: false,
data: { data: {
navSwitch: 0, navSwitch: 0, //快捷导航开关
useMallConfig: true, useMallConfig: true, //使用商城配置
navStyle: 1, navStyle: 1, //导航样式
closedPicUrl: '', closedPicUrl: '', //收起图标
openedPicUrl: '', openedPicUrl: '', //展开图标
home: { home: {
opened: false, opened: false, //是否返回首页
picUrl: '', picUrl: '', //图标
}, },
customerService: { customerService: {
opened: false, opened: false, //小程序客服
picUrl: '', picUrl: '', //小程序图片
}, },
tel: { tel: {
opened: false, opened: false, //一键拨号开启
picUrl: '', picUrl: '', //一键拨号图标
number: '', number: '', ////一键拨号电话号码
}, },
web: { web: {
opened: false, opened: false, //网页链接开启
picUrl: '', picUrl: '',
url: '', url: '',
}, },
mApp: { mApp: { //跳转小程序开启
opened: false, opened: false,
picUrl: '', picUrl: '',
appId: '', appId: '',
page: '', page: '',
}, },
mapNav: { mapNav: { //地图导航
opened: false, opened: false,
picUrl: '', picUrl: '',
address: '', address: '',
location: '', location: '',
}, },
customize: { customize: { //自定义按钮
opened: false, opened: false,
picUrl: '', picUrl: '',
open_type: '', open_type: '',
......
...@@ -2,6 +2,13 @@ import Vue from 'vue' ...@@ -2,6 +2,13 @@ import Vue from 'vue'
import Router from 'vue-router' import Router from 'vue-router'
Vue.use(Router) Vue.use(Router)
/**
* 重写路由的push方法
*/
const routerPush = Router.prototype.push
Router.prototype.push = function push(location) {
return routerPush.call(this, location).catch(error=> error)
}
export default new Router({ export default new Router({
routes: [{ routes: [{
......
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