feat(用户认证): 实现基于角色的页面跳转和登录状态检查

- 在App.vue中添加登录状态检查和用户信息获取
- 修改index.vue实现根据用户角色跳转到不同页面
- 更新pages.json调整底部导航栏和页面配置
- 优化user.js中的用户信息存储逻辑
This commit is contained in:
砂糖
2025-11-03 14:52:41 +08:00
parent d677c293e8
commit 42d858bc6b
5 changed files with 190 additions and 136 deletions

View File

@@ -45,7 +45,8 @@
"path" : "pages/line/line",
"style" :
{
"navigationBarTitleText" : "产线监控"
"navigationBarTitleText" : "产线监控",
"navigationStyle": "custom"
}
}
// {
@@ -110,7 +111,7 @@
"list": [
{
"text": "产线",
"pagePath": "pages/index",
"pagePath": "pages/line/line",
"selectedIconPath": "/static/images/tabbar/home_.png",
"iconPath": "/static/images/tabbar/home.png"
},
@@ -125,13 +126,13 @@
"pagePath": "pages/mine/index",
"selectedIconPath": "/static/images/tabbar/mine_.png",
"iconPath": "/static/images/tabbar/mine.png"
},
{
"text": "扫码2",
"pagePath": "pages/easycode/easycode",
"selectedIconPath": "/static/images/tabbar/work_.png",
"iconPath": "/static/images/tabbar/work.png"
}
// {
// "text": "扫码2",
// "pagePath": "pages/easycode/easycode",
// "selectedIconPath": "/static/images/tabbar/work_.png",
// "iconPath": "/static/images/tabbar/work.png"
// }
]
},