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 @@ - + - +