From 9a0d8954c3a11e4206a9e40d24a2b2c0c0a9e452 Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Mon, 25 Mar 2024 18:04:52 +0800 Subject: [PATCH] home --- pages/home/home.vue | 6 +++--- utils/mork2.js | 10 +++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/pages/home/home.vue b/pages/home/home.vue index c74982e..9bfa40c 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -48,7 +48,7 @@ export default { data() { return { - userName: 'admin', + userName: '', menuList: [], menuList1: [], menuList2: [], @@ -68,8 +68,8 @@ async _authority () { let res = await authority() if (res.code === '1') { - this.menuList1 = [...res.result.rf_menu0] - this.menuList2 = [...res.result.rf_menu1] + this.menuList1 = [...res.result.rf_menu0.sonTree] + this.menuList2 = [...res.result.rf_menu1.sonTree] this.menuList = [...this.menuList1] } else { uni.showToast({ diff --git a/utils/mork2.js b/utils/mork2.js index 3fa26b5..9fb5bfa 100644 --- a/utils/mork2.js +++ b/utils/mork2.js @@ -2,7 +2,8 @@ export const authority = () => { let res = { code: '1', result: { - rf_menu0: [ + rf_menu0: { + sonTree: [ {menu_id: '1', path: 'RF01', title: '生产管理', sonTree: [ {menu_id: '1', title: '生箔生产进度', path: '/pages/ProductManage/SboProdProgress'}, {menu_id: '2', title: '生箔工序', path: '/pages/ProductManage/SboProcess'}, @@ -51,8 +52,10 @@ export const authority = () => { {menu_id: '1', title: '任务管理', path: '/pages/DispatchManage/TaskManage'}, {menu_id: '2', title: 'RGV状态查询', path: '/pages/DispatchManage/RGVStatus'} ]} - ], - rf_menu1: [ + ] + }, + rf_menu1: { + sonTree: [ {menu_id: '1', path: 'RF08', title: '载具入库', sonTree: [ {menu_id: '1', title: '空载具入库', path: '/pages/SecondPhase/EmptyVehicleInStore'} ]}, @@ -63,6 +66,7 @@ export const authority = () => { {menu_id: '1', title: '发货区解绑', path: '/pages/SecondPhase/DeliveryUnbind'} ]} ] + } }} return res }