diff --git a/manager/src/views/lili-dialog/link-dialog.vue b/manager/src/views/lili-dialog/link-dialog.vue index 0c68f0e3..e3dadf82 100644 --- a/manager/src/views/lili-dialog/link-dialog.vue +++ b/manager/src/views/lili-dialog/link-dialog.vue @@ -1,16 +1,26 @@ \ No newline at end of file diff --git a/manager/src/views/lili-dialog/wap.js b/manager/src/views/lili-dialog/wap.js index 2d2d675c..a9ee6add 100644 --- a/manager/src/views/lili-dialog/wap.js +++ b/manager/src/views/lili-dialog/wap.js @@ -29,5 +29,10 @@ export default [ title: "其他", url: "3", name: "other" - } + }, + { + title: "专题", + url: "4", + name: "special" + }, ]; diff --git a/manager/src/views/lili-floor-renovation/floorList.vue b/manager/src/views/lili-floor-renovation/floorList.vue index c65b84cd..a0473207 100644 --- a/manager/src/views/lili-floor-renovation/floorList.vue +++ b/manager/src/views/lili-floor-renovation/floorList.vue @@ -82,7 +82,9 @@ export default { pageNumber:1, pageSize:10, sort: 'createTime', - order: 'desc' + order: 'desc', + pageType:"INDEX", + pageClientType:"PC", }, columns: [ // 列表展示的column @@ -106,10 +108,10 @@ export default { type: "INDEX", title: "首页", }, - // { - // type: "SPECIAL", - // title: "专题", - // }, + { + type: "SPECIAL", + title: "专题", + } ], list: [], // 模板列表 }; @@ -125,7 +127,8 @@ export default { const data = this.formData; data.status ? (data.pageShow = "OPEN") : (data.pageShow = "CLOSE"); delete data.status; - (data.pageType = "INDEX"), (data.pageClientType = "PC"); + // (data.pageType = "INDEX"), (data.pageClientType = "PC"); + (data.pageType = this.searchForm.pageType), (data.pageClientType = "PC"); if (data.id) { API_floor.updateHome(data.id, data).then((res) => { this.$Message.success("编辑模板成功"); @@ -144,6 +147,13 @@ export default { } }); }, + + clickType(type,index){ + this.searchForm.pageNumber = 1 + this.searchForm.pageType = type; + this.selectedIndex = index; + this.getTemplateList(); + }, createTemp() { // 新建表单 diff --git a/manager/src/views/lili-floor-renovation/wap/main.vue b/manager/src/views/lili-floor-renovation/wap/main.vue index 62bd675e..423c1afa 100644 --- a/manager/src/views/lili-floor-renovation/wap/main.vue +++ b/manager/src/views/lili-floor-renovation/wap/main.vue @@ -1,8 +1,8 @@ @@ -11,16 +11,21 @@ import layout from "./index"; import navbar from "./navbar"; export default { components: { - navbar, + navbar + }, + mounted() { + this.pagetype = this.$route.query.pagetype; }, data() { return { layout, // 装修模块 name: "index", // 装修的页面 + pagetype: "INDEX" }; }, methods: { - selected(val) { // 顶部栏点击切换 + selected(val) { + // 顶部栏点击切换 this.name = val; } } diff --git a/manager/src/views/lili-floor-renovation/wap/navbar.vue b/manager/src/views/lili-floor-renovation/wap/navbar.vue index 21aa9c28..bcafad62 100644 --- a/manager/src/views/lili-floor-renovation/wap/navbar.vue +++ b/manager/src/views/lili-floor-renovation/wap/navbar.vue @@ -9,9 +9,7 @@ v-for="(item, index) in way" :key="index" :type="item.selected ? 'primary' : ''" - > - {{ item.title }} - + >{{ item.title }}
@@ -21,7 +19,7 @@
临时预览
- --> + -->
- 模板名称 + 模板名称 +
是否立即发布 @@ -45,7 +44,7 @@
- +
@@ -54,6 +53,7 @@ import * as API_Other from "@/api/other.js"; export default { + props: ["pagetype"], data() { return { progress: true, // 展示进度 @@ -61,11 +61,11 @@ export default { saveDialog: false, // 加载状态 way: [ // 装修tab栏切换 - { - title: "首页", - name: "index", - selected: true, - }, + // { + // title: "首页", + // name: "index", + // selected: true, + // }, // { // title: "全屏广告", // name: "advertising", @@ -82,11 +82,23 @@ export default { // 表单信息 pageShow: this.$route.query.type || false, name: this.$route.query.name || "模板名称", - pageClientType: "H5", - }, + pageClientType: "H5" + } }; }, - watch: {}, + watch: { + pagetype: { + handler(val) { + this.way.length = 0; + if (val == "INDEX") { + this.way.push({ title: "首页", name: "index", selected: true }); + } else if (val == "SPECIAL") { + this.way.push({ title: "专题", name: "special", selected: true }); + } + }, + immediate: true + } + }, mounted() {}, methods: { clickBtn(val) { @@ -116,7 +128,8 @@ export default { : (this.submitWay.pageShow = "CLOSE"); this.submitWay.pageData = JSON.stringify(this.$store.state.styleStore); - this.submitWay.pageType = "INDEX"; + // this.submitWay.pageType = "INDEX"; + this.submitWay.pageType = this.pagetype; this.$route.query.id ? this.update() : this.submit(this.submitWay); }, @@ -128,10 +141,11 @@ export default { pageData: JSON.stringify(this.$store.state.styleStore), name: this.submitWay.name, pageShow: this.submitWay.pageShow, - pageType: "INDEX", - pageClientType: "H5", + // pageType: "INDEX", + pageType: this.pagetype, + pageClientType: "H5" }) - .then((res) => { + .then(res => { this.num = 50; if (res.success) { this.num = 80; @@ -147,13 +161,13 @@ export default { } console.log(res); }) - .catch((error) => {}); + .catch(error => {}); }, // 返回查询数据页面 goback() { this.$router.push({ - path: "/wapList", + path: "/wapList" }); }, @@ -161,7 +175,7 @@ export default { submit(submitWay) { this.progress = false; API_Other.setHomeSetup(submitWay) - .then((res) => { + .then(res => { this.num = 50; if (res.success) { this.num = 80; @@ -178,9 +192,9 @@ export default { } console.log(res); }) - .catch((error) => {}); - }, - }, + .catch(error => {}); + } + } };