diff --git a/manager/src/components/lili-dialog/template/marketing.vue b/manager/src/components/lili-dialog/template/marketing.vue index 3715f52b..4585087d 100644 --- a/manager/src/components/lili-dialog/template/marketing.vue +++ b/manager/src/components/lili-dialog/template/marketing.vue @@ -112,6 +112,7 @@ export default { { props: { // type: this.index == params.index ? "primary" : "", + type: 'default', size: "small", }, on: { @@ -204,6 +205,7 @@ export default { { props: { // type: this.index == params.index ? "primary" : "", + type: 'default', size: "small", }, on: { @@ -255,6 +257,7 @@ export default { { props: { // type: this.index == params.index ? "primary" : "", + type: 'default', size: "small", }, on: { diff --git a/manager/src/views/goods/goods-info/goodsApply.vue b/manager/src/views/goods/goods-info/goodsApply.vue index fa7f7222..30deb6a4 100644 --- a/manager/src/views/goods/goods-info/goodsApply.vue +++ b/manager/src/views/goods/goods-info/goodsApply.vue @@ -208,6 +208,7 @@ export default { "Button", { props: { + type: 'default', size: "small", }, on: { diff --git a/manager/src/views/goods/goods-manage/brand.vue b/manager/src/views/goods/goods-manage/brand.vue index 6fac602f..7438def2 100644 --- a/manager/src/views/goods/goods-manage/brand.vue +++ b/manager/src/views/goods/goods-manage/brand.vue @@ -213,6 +213,7 @@ export default { "Button", { props: { + type: 'default', size: "small", }, style: { diff --git a/manager/src/views/page-decoration/renovation.vue b/manager/src/views/page-decoration/renovation.vue index 28b3576a..546a0592 100644 --- a/manager/src/views/page-decoration/renovation.vue +++ b/manager/src/views/page-decoration/renovation.vue @@ -18,6 +18,9 @@
@@ -32,16 +35,57 @@ export default { ModelForm, }, mounted() { + // 先读缓存,如果缓存有值则读缓存。 + const cache = this.getStore('managerPCPageCache') + this.hasCache = !!cache; + if(cache){ + this.$Modal.confirm({ + title: '提示', + content: '获取到本地有缓存数据,是否使用缓存数据?', + okText: '使用', + cancelText: '取消', + onOk: () => { + let pageData = cache; + if (pageData) { + pageData = JSON.parse(pageData); + if (pageData.list[0].type === "topAdvert") { + // topAdvert 为顶部广告 navList为导航栏 + this.$refs.modelForm.topAdvert = pageData.list[0]; + this.$refs.modelForm.navList = pageData.list[1]; + pageData.list.splice(0, 2); + this.modelForm = pageData; + } else { + this.modelForm = { list: [] }; + } + } else { + this.modelForm = { list: [] }; + } + } + }); + } this.getTemplateItem(this.$route.query.id); }, data() { return { + hasCache:false, modelData, // 可选模块数据 modelForm: { list: [] }, // 模板数据 submitLoading: false, // 提交加载状态 }; }, methods: { + clearCache(){ + this.setStore('managerPCPageCache', '') + this.$Message.success('清除成功') + }, + // 将楼层装修的内容写入到本地缓存中 + witeLocalStore(){ + const data ={...this.modelForm} + data.list.unshift(this.$refs.modelForm.navList); + data.list.unshift(this.$refs.modelForm.topAdvert); + this.setStore('managerPCPageCache', data) + this.$Message.success('写入成功') + }, saveTemplate() { // 保存模板 this.submitTemplate(this.$route.query.pageShow ? 'OPEN' : 'CLOSE') diff --git a/manager/src/views/page-decoration/wap/index.vue b/manager/src/views/page-decoration/wap/index.vue index ded9627a..861494b3 100644 --- a/manager/src/views/page-decoration/wap/index.vue +++ b/manager/src/views/page-decoration/wap/index.vue @@ -113,12 +113,29 @@ export default { methods: { // 初始化数据 init() { + // 先读缓存,如果缓存有值则读缓存。 + const cache = this.getStore('managerMobilePageCache') + if(cache){ + this.$Modal.confirm({ + title: '提示', + content: '获取到本地有缓存数据,是否使用缓存数据?', + okText: '使用', + cancelText: '取消', + onOk: () => { + const data = JSON.parse(cache); + this.contentData = data; + } + }); + + } if (!this.$route.query.id) return false; + API_Other.getHomeData(this.$route.query.id).then((res) => { this.contentData = JSON.parse(res.result.pageData); this.handleComponent(this.contentData.list[0], 0); }); + }, // 中间组件拖动,右侧数据绑定不变 diff --git a/manager/src/views/page-decoration/wap/navbar.vue b/manager/src/views/page-decoration/wap/navbar.vue index 58f623c4..fa848aef 100644 --- a/manager/src/views/page-decoration/wap/navbar.vue +++ b/manager/src/views/page-decoration/wap/navbar.vue @@ -20,6 +20,7 @@ --> +