From ff1d17eb314230de18f39a32cd838b887cfda1ca Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 1 Aug 2022 20:59:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E6=AC=A1=E8=BF=9B=E5=85=A5App?= =?UTF-8?q?=E6=97=B6=E8=BF=9B=E5=85=A5=E7=99=BB=E5=BD=95=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 4 +++- pages.json | 17 +++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/App.vue b/App.vue index d44c8cf..2daafce 100644 --- a/App.vue +++ b/App.vue @@ -13,14 +13,16 @@ // 初始化应用配置 this.initConfig() // 检查用户登录状态 + //#ifdef H5 this.checkLogin() + //#endif }, initConfig() { this.globalData.config = config }, checkLogin() { if (!getToken()) { - uni.reLaunch({ url: '/pages/login' }) + this.$tab.reLaunch('/pages/login') } } } diff --git a/pages.json b/pages.json index 73816d1..cc76d21 100644 --- a/pages.json +++ b/pages.json @@ -1,5 +1,10 @@ { "pages": [{ + "path": "pages/login", + "style": { + "navigationBarTitleText": "登录" + } + }, { "path": "pages/index", "style": { "navigationBarTitleText": "若依移动端框架", @@ -50,12 +55,6 @@ "style": { "navigationBarTitleText": "关于我们" } - }, { - "path": "pages/login", - "style": { - "navigationBarTitleText": "登录" - } - }, { "path": "pages/common/webview/index", "style": { @@ -77,14 +76,12 @@ "iconPath": "static/images/tabbar/home.png", "selectedIconPath": "static/images/tabbar/home_.png", "text": "首页" - }, - { + }, { "pagePath": "pages/work/index", "iconPath": "static/images/tabbar/work.png", "selectedIconPath": "static/images/tabbar/work_.png", "text": "工作台" - }, - { + }, { "pagePath": "pages/mine/index", "iconPath": "static/images/tabbar/mine.png", "selectedIconPath": "static/images/tabbar/mine_.png",