From eed2b6650c10efc2fc37b5ae71a985b66078394f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=8F=B6?= Date: Sat, 18 Sep 2021 15:03:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/channel-tab-bar/index.wxml | 14 +++++++------- components/shop-tab-bar/index.wxml | 14 +++++++------- pages/login/index.js | 26 +++++++++++++++----------- 3 files changed, 29 insertions(+), 25 deletions(-) diff --git a/components/channel-tab-bar/index.wxml b/components/channel-tab-bar/index.wxml index 4e33241..874a831 100644 --- a/components/channel-tab-bar/index.wxml +++ b/components/channel-tab-bar/index.wxml @@ -1,9 +1,9 @@ - - + + - - - {{item.title}} - + + + {{item.title}} + - \ No newline at end of file + \ No newline at end of file diff --git a/components/shop-tab-bar/index.wxml b/components/shop-tab-bar/index.wxml index 4e33241..874a831 100644 --- a/components/shop-tab-bar/index.wxml +++ b/components/shop-tab-bar/index.wxml @@ -1,9 +1,9 @@ - - + + - - - {{item.title}} - + + + {{item.title}} + - \ No newline at end of file + \ No newline at end of file diff --git a/pages/login/index.js b/pages/login/index.js index d7eb0b1..bcf2e2c 100644 --- a/pages/login/index.js +++ b/pages/login/index.js @@ -19,16 +19,15 @@ Page({ onShow: function () { let ukey = app.getStorageByKey("ukey"); - if (!!ukey){ - let pages = getCurrentPages(); - if (pages.length > 1) { - wx.navigateBack(); + if (!!ukey&&!!app.getStorageByKey("userInfo")){ + if(app.getStorageByKey("userInfo").group_id==4){ + wx.navigateTo({ + url: '/pages/channel/index', + }) }else{ - if(app.getStorageByKey("userInfo").group_id==4){ - _.$router.openUrlScheme('/pages/channel/index') - }else{ - _.$router.openUrlScheme('/pages/index/index') - } + wx.navigateTo({ + url: '/pages/index/index', + }) } }else{ this.setData({ @@ -110,10 +109,15 @@ Page({ data: res.data.ukey }) _.apiQuery.getUserInfo().then(res => { + console.log(res) if(res.group_id==4){ - _.$router.openUrlScheme('/pages/channel/index') + wx.navigateTo({ + url: '/pages/channel/index', + }) }else{ - _.$router.openUrlScheme('/pages/index/index') + wx.navigateTo({ + url: '/pages/index/index', + }) } }); });