From ac112ab4b30f723a8d55f483687c622e0c4e0503 Mon Sep 17 00:00:00 2001 From: Rain_ <904416525@qq.com> Date: Wed, 26 Mar 2025 17:52:00 +0800 Subject: [PATCH] =?UTF-8?q?flx:=E5=8E=BB=E9=87=8Dapp=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 19 +++++++++++++++- pages/homePage/newhomePage.vue | 2 +- pages/projectEnd/projectIndex/appSettings.vue | 22 +++++++++++++------ .../projectIndex/applicationCenter.vue | 20 +++++++++++++---- .../projectIndex/oldprojectIndex.vue | 2 +- .../projectEnd/projectIndex/projectIndex.vue | 2 +- 6 files changed, 52 insertions(+), 15 deletions(-) diff --git a/main.js b/main.js index 47e74db..2df36d6 100644 --- a/main.js +++ b/main.js @@ -239,11 +239,28 @@ export function createApp() { } return fmt } + + function recursiveSearchFn(dataList, resultList = []) { + dataList.forEach(item => { + if (item.appShow == 1) { + // return item; + item.operation = true; + resultList.push(item); + } + if (Array.isArray(item.menuList) && item.menuList.length > 0) { + return recursiveSearchFn(item.menuList, resultList); + } + }); + return resultList; + }; + app.config.globalProperties.$recursiveSearchFn = recursiveSearchFn; function recursiveSearch(dataList, appPath) { return dataList.find(item => { // console.log(item.path, appPath, item.menuName) - if (item.path == appPath) { + const path = item.path ? item.path : item.modulePath; + if (path == appPath) { + return item; } if (Array.isArray(item.menuList) && item.menuList.length > 0) { diff --git a/pages/homePage/newhomePage.vue b/pages/homePage/newhomePage.vue index fbd5dd5..e8c1918 100644 --- a/pages/homePage/newhomePage.vue +++ b/pages/homePage/newhomePage.vue @@ -316,7 +316,7 @@ success(result) { if (result.success) { that.haveModuleList = result.result.moduleList.filter( - (item) => item.moduleType == 2 && item.pcShow != 2 + (item) => (item.moduleType == 2 || item.moduleType == 10) && item.pcShow != 2 ); uni.setStorageSync("haveModuleList", that.haveModuleList); // alert("获取模块列表成功"); diff --git a/pages/projectEnd/projectIndex/appSettings.vue b/pages/projectEnd/projectIndex/appSettings.vue index c0d9f34..fd44956 100644 --- a/pages/projectEnd/projectIndex/appSettings.vue +++ b/pages/projectEnd/projectIndex/appSettings.vue @@ -50,7 +50,7 @@ - + - +