Commit 94769a57 authored by zhengke's avatar zhengke
parents 7ae44ce8 be61ebc6
......@@ -10,8 +10,8 @@
<div class="content">
<div>
<div class="searchInput">
<el-input style="display:inline-block;width:225px;height:30px" placeholder="请输入搜索内容"
v-model="msg.Title" size="small" clearable @keyup.enter.native="msg.pageIndex=1,getList()">
<el-input style="display:inline-block;width:225px;height:30px" placeholder="请输入搜索内容" v-model="msg.Title"
size="small" clearable @keyup.enter.native="msg.pageIndex=1,getList()">
</el-input>
<span class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"
@click="msg.pageIndex=1,getList()"> </span>
......@@ -146,12 +146,21 @@
}
});
},
//清空数据
clearMsg() {
this.addMsg.Id = 0;
this.addMsg.Title = '';
this.addMsg.SortNum = 0;
this.addMsg.IsDisable = 0;
this.addMsg.Content = '';
},
//保存
saveMsg() {
this.apipost("/api/MContent/SetArticle", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.ArticleIsShowAdd = true;
this.getList();
this.clearMsg();
this.Success(res.data.message);
} else {
this.Info(res.data.message);
......
......@@ -11,8 +11,8 @@
<div class="content">
<div>
<div class="searchInput">
<el-input style="display:inline-block;width:225px;height:30px" placeholder="请输入搜索内容"
v-model="msg.TopicName" size="small" clearable @keyup.enter.native="msg.pageIndex=1,getList()">
<el-input style="display:inline-block;width:225px;height:30px" placeholder="请输入搜索内容" v-model="msg.TopicName"
size="small" clearable @keyup.enter.native="msg.pageIndex=1,getList()">
</el-input>
<span class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"
@click="msg.pageIndex=1,getList()"> </span>
......@@ -131,12 +131,19 @@
}
});
},
clearMsg() {
this.addMsg.Id = 0;
this.addMsg.TopicName = '';
this.addMsg.SortNum = 0;
this.addMsg.IsDisable = 0;
},
//保存
saveMsg() {
this.apipost("/api/MContent/SetTopicType", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.projectClassIsShowAdd = true;
this.getList();
this.clearMsg();
this.Success(res.data.message);
} else {
this.Info(res.data.message);
......
......@@ -11,8 +11,8 @@
<div class="content">
<div>
<div class="searchInput">
<el-input style="display:inline-block;width:225px;height:30px" placeholder="请输入搜索内容"
v-model="msg.TopicName" size="small" clearable @keyup.enter.native="msg.pageIndex=1,getList()">
<el-input style="display:inline-block;width:225px;height:30px" placeholder="请输入搜索内容" v-model="msg.TopicName"
size="small" clearable @keyup.enter.native="msg.pageIndex=1,getList()">
</el-input>
<span class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"
@click="msg.pageIndex=1,getList()"> </span>
......@@ -88,17 +88,25 @@
total: 0,
projectClassIsShowAdd: true,
addMsg: {
Id: 0, //编号
TopicName: '', //专题分类名称
SortNum: 0, //排序
IsDisable: 0, //状态
Id: 0, //门店编号
Name: "", //门店名称
Tel: "", //门店电话
Address: "", //门店地址
LngLat: "", //门店经度纬度
Score: 0, //门店评分
Intro: "", //门店介绍
CoverImg: "", //门店封面图
NavImg: "", //门店轮播图
StartTime: "", //营业开始时间
EndTime: "", //营业结束时间
IsAllDay: 0, //是否全天营业(1-是)
},
rules: {
TopicName: [{
required: true,
message: '专题分类名称',
trigger: 'change'
}],
// TopicName: [{
// required: true,
// message: '专题分类名称',
// trigger: 'change'
// }],
},
};
......@@ -112,7 +120,7 @@
this.getList();
},
getList() {
this.apipost("/api/MContent/GetTopicTypePageList", this.msg, res => {
this.apipost("/api/MContent/GetStoresPageList", this.msg, res => {
if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
......@@ -133,28 +141,52 @@
},
//保存
saveMsg() {
this.apipost("/api/MContent/SetTopicType", this.addMsg, res => {
this.apipost("/api/MContent/SetStores", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.projectClassIsShowAdd = true;
this.getList();
this.clearMsg();
this.Success(res.data.message);
} else {
this.Info(res.data.message);
}
})
},
//清空值
clearMsg() {
this.addMsg.Id = 0;
this.addMsg.Name = '';
this.addMsg.Tel = '';
this.addMsg.Address = '';
this.addMsg.LngLat = '';
this.addMsg.Score = 0;
this.addMsg.Intro = '';
this.addMsg.CoverImg = '';
this.addMsg.NavImg = '';
this.addMsg.StartTime = '';
this.addMsg.EndTime = '';
this.addMsg.IsAllDay = 0;
},
//修改
EditprojectClass(item) {
this.apipost("/api/MContent/GetTopicType", {
this.apipost("/api/MContent/GetStores", {
Id: item.Id
}, res => {
if (res.data.resultCode == 1) {
this.projectClassIsShowAdd = false;
var jsonData = res.data.data;
this.addMsg.Id = jsonData.Id;
this.addMsg.TopicName = jsonData.TopicName;
this.addMsg.SortNum = jsonData.SortNum;
this.addMsg.IsDisable = jsonData.IsDisable;
this.addMsg.Name = jsonData.Name;
this.addMsg.Tel = jsonData.Tel;
this.addMsg.Address = jsonData.Address;
this.addMsg.LngLat = jsonData.LngLat;
this.addMsg.Score = jsonData.Score;
this.addMsg.Intro = jsonData.Intro;
this.addMsg.CoverImg = jsonData.CoverImg;
this.addMsg.NavImg = jsonData.NavImg;
this.addMsg.StartTime = jsonData.StartTime;
this.addMsg.EndTime = jsonData.EndTime;
this.addMsg.IsAllDay = jsonData.IsAllDay;
} else {
this.Info(res.data.message);
}
......@@ -164,7 +196,7 @@
RemoveprojectClass(item) {
var that = this;
that.Confirm("是否要删除?", function () {
that.apipost("/api/MContent/RemoveTopicType", {
that.apipost("/api/MContent/RemoveStores", {
Id: item.Id
}, res => {
if (res.data.resultCode == 1) {
......
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