From da7329c8b3bf4f2dc647a030bfbca167860d7d34 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Fri, 29 Dec 2023 19:29:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/app.js | 4 ++-- pages/gather/gather.vue | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/config/app.js b/config/app.js index ccbb88f..cdcc9f8 100644 --- a/config/app.js +++ b/config/app.js @@ -11,8 +11,8 @@ let httpApiFive let wsApi // 在打包之前请检查当前环境是否正确 -// const env = 'dev'; // 开发 -const env = 'prod'; // 生产 +const env = 'dev'; // 开发 +// const env = 'prod'; // 生产 // const env = 'prew'; // 预上线 switch (env) { diff --git a/pages/gather/gather.vue b/pages/gather/gather.vue index c9d957d..12fbc25 100644 --- a/pages/gather/gather.vue +++ b/pages/gather/gather.vue @@ -302,10 +302,15 @@ initMenu() { let now = uni.getStorageSync('gatherMenuList'); try { - this.nowMenuList = JSON.parse(now); - this.AllMenuList = this.AllMenuList.filter((item) => { - return this.nowMenuList.find(t => t.name == item.name)?.name != item.name; + let list = JSON.parse(now); + let now = []; + let all = []; + this.AllMenuList.forEach((item) => { + if(list.find(t => t.name == item.name)?.name != item.name) all.push(item); + else now.push(item) }) + this.AllMenuList = all; + this.nowMenuList = now; } catch (e) { this.nowMenuList = []; }