Commit 2464a45f authored by 沈良进's avatar 沈良进

增加是否热门

parent a3d2147a
......@@ -266,7 +266,7 @@ import uploadImg from '../../pubComponents/uploadImg'
}
},
getCateGoryList() {
this.apipost('ws_get_GetNavList', {Level: Number(this.addMsg.Level) - 1, NavTitle: '', pageIndex: 1, pageSize: 100}, res => {
this.apipost('ws_get_GetNavList', {Level: Number(this.addMsg.Level) - 1, Type: this.addMsg.Type, NavTitle: '', pageIndex: 1, pageSize: 100}, res => {
if(res.data.resultCode == 1) {
this.cateGoryList = res.data.data;
}
......
......@@ -84,6 +84,11 @@
<span>{{ getAreaShow(scope) }}</span>
</template>
</el-table-column>
<el-table-column prop="IsHot" label="是否热门" header-align="center" align="center">
<template slot-scope="scope">
<span>{{ scope.row.IsHot === 1 ? '是': '否' }}</span>
</template>
</el-table-column>
<el-table-column prop="ParentName" label="封面图" header-align="center" align="center">
<template slot-scope="scope">
<img @click="showImage(scope.row.ImageList[0])" class="cover" v-if="scope.row.ImageList && scope.row.ImageList.length" :src="scope.row.ImageList[0]" />
......@@ -149,6 +154,9 @@
<el-form-item label="介绍" prop="Introduction">
<el-input type="textarea" :rows="2" v-model="addMsg.Introduction" />
</el-form-item>
<el-form-item label="是否热门" prop="IsHot">
<el-switch v-model="addMsg.IsHot" />
</el-form-item>
<el-form-item label="时区" prop="TimeZones">
<el-input v-model="addMsg.TimeZones" />
</el-form-item>
......@@ -255,6 +263,7 @@ import uploadImg from '../../pubComponents/uploadImg'
outerVisible: false,
dataList: [],
addMsg: {
IsHot: false,
Id: 0, //编号
Level: 0, //等级
ParentId: 0, //父节点编号
......@@ -357,11 +366,8 @@ import uploadImg from '../../pubComponents/uploadImg'
res => {
if (res.data.resultCode == 1) {
var tempData = res.data.data;
tempData.IsHot = tempData.IsHot === 1
this.addMsg = tempData;
// this.addMsg.Id = tempData.Id;
// this.addMsg.Level = tempData.Level;
// this.addMsg.ParentId = tempData.ParentId;
// this.addMsg.AreaName = tempData.AreaName;
if(!this.addMsg.BestTravelTimeList || !this.addMsg.BestTravelTimeList.length) {
this.addMsg.BestTravelTimeList = [{
Month: '',
......@@ -400,6 +406,7 @@ import uploadImg from '../../pubComponents/uploadImg'
//清空数据
clearMsg() {
this.addMsg = {
IsHot: false,
Id: 0, //编号
Level: 0, //等级
ParentId: 0, //父节点编号
......@@ -433,8 +440,10 @@ import uploadImg from '../../pubComponents/uploadImg'
return
}
this.addMsg.ImageList = imageList
let params = {...this.addMsg}
params.IsHot = params.IsHot ? 1 : 2
this.apipost(
"ws_post_SetArea", this.addMsg,
"ws_post_SetArea", params,
res => {
if (res.data.resultCode == 1) {
this.getData();
......
......@@ -283,7 +283,7 @@ import uploadImg from '../../pubComponents/uploadImg'
// return
// }
let params = {...this.addMsg}
params.isHot = params.isHot ? 1 : 2
params.IsHot = params.IsHot ? 1 : 2
params.Enable = params.Enable ? 1 : 2
this.apipost('ws_post_SetCategory', params, res => {
if(res.data.resultCode == 1){
......@@ -299,7 +299,7 @@ import uploadImg from '../../pubComponents/uploadImg'
updateData({Id}) { //修改
this.apipost('ws_post_GetCategory',{Id},res=>{
let params = res.data.data
params.isHot = params.isHot === 1
params.IsHot = params.IsHot === 1
params.Enable = params.Enable === 1
this.addMsg = params
this.$refs.Icon.ImageList = params.Icon ? [params.Icon] : []
......
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