From 3afad96b8ff6802d8383260912c793c14774b1ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E8=89=AFking?= <2244255345@qq.com> Date: Fri, 23 Dec 2022 15:31:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A5=BC=E5=B1=82=20=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=E6=A8=A1=E6=9D=BF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/lili-dialog/link-dialog.vue | 37 ++++++++++++++++++- .../components/lili-dialog/template/other.vue | 29 ++++++++++++++- manager/src/components/lili-dialog/wap.js | 2 +- 3 files changed, 65 insertions(+), 3 deletions(-) diff --git a/manager/src/components/lili-dialog/link-dialog.vue b/manager/src/components/lili-dialog/link-dialog.vue index 788b2eb0..af69ab70 100644 --- a/manager/src/components/lili-dialog/link-dialog.vue +++ b/manager/src/components/lili-dialog/link-dialog.vue @@ -51,7 +51,42 @@ export default { this.$nextTick(() => { this.$refs["lili-component"][0].type = "single"; //商品页面设置成为单选 }); - + let url = window.location.href + if(url.indexOf('/floorList/renovation') != -1){ + //此处去重防止移动楼层多次点击push 太多数据 + let obj = {}; + this.wap = this.wap.reduce((cur, next) => { + //对象去重 + if (next.title != undefined) { + obj[next.title] + ? "" + : (obj[next.title] = true && cur.push(next)); + } + return cur; + }, []); + this.wap.forEach((items,indexs) => { + if(items.title == '活动'){ + console.log(32323232323232) + this.wap.splice(indexs,1) + } + }) + }else{ + this.wap.push( { + title: "活动", + url: "3", + name: "marketing" + }) + let obj = {}; + this.wap = this.wap.reduce((cur, next) => { + //对象去重 + if (next.title != undefined) { + obj[next.title] + ? "" + : (obj[next.title] = true && cur.push(next)); + } + return cur; + }, []); + } this.wap.forEach((item) => { if (item) { item.selected = false; diff --git a/manager/src/components/lili-dialog/template/other.vue b/manager/src/components/lili-dialog/template/other.vue index 1efbda77..3858a2e2 100644 --- a/manager/src/components/lili-dialog/template/other.vue +++ b/manager/src/components/lili-dialog/template/other.vue @@ -22,6 +22,7 @@
{ + if(items.title == '砍价'){ + console.log(12321322,indexs) + this.linkList.splice(indexs,1) + } + }) + this.linkList.forEach((item,index)=>{ + if(item.title == '小程序直播'){ + this.linkList.splice(index,1) + } + }) + this.linkList.forEach((itemss,indexss)=>{ + if(itemss.title == '积分商城'){ + this.linkList.splice(indexss,1) + } + }) + this.linkVisible = true + }else{ + this.linkVisible = false + } + + }, methods: { handleLink(val, index) { val = { ...val, ___type: "other" }; diff --git a/manager/src/components/lili-dialog/wap.js b/manager/src/components/lili-dialog/wap.js index 226f4ffa..ec9985f0 100644 --- a/manager/src/components/lili-dialog/wap.js +++ b/manager/src/components/lili-dialog/wap.js @@ -21,7 +21,7 @@ export default [ name: "marketing" }, { - title: "页面", + title: "文章", url: "3", name: "pages" },