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",