This commit is contained in:
weipengfei 2023-12-29 19:29:12 +08:00
parent 710572e2a7
commit da7329c8b3
2 changed files with 10 additions and 5 deletions

View File

@ -11,8 +11,8 @@ let httpApiFive
let wsApi let wsApi
// 在打包之前请检查当前环境是否正确 // 在打包之前请检查当前环境是否正确
// const env = 'dev'; // 开发 const env = 'dev'; // 开发
const env = 'prod'; // 生产 // const env = 'prod'; // 生产
// const env = 'prew'; // 预上线 // const env = 'prew'; // 预上线
switch (env) { switch (env) {

View File

@ -302,10 +302,15 @@
initMenu() { initMenu() {
let now = uni.getStorageSync('gatherMenuList'); let now = uni.getStorageSync('gatherMenuList');
try { try {
this.nowMenuList = JSON.parse(now); let list = JSON.parse(now);
this.AllMenuList = this.AllMenuList.filter((item) => { let now = [];
return this.nowMenuList.find(t => t.name == item.name)?.name != item.name; 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) { } catch (e) {
this.nowMenuList = []; this.nowMenuList = [];
} }