wangjiahai 2 years ago
parent
commit
c9e6845198
  1. 29
      common/wxSilentLogin.js
  2. 6
      pages.json

29
common/wxSilentLogin.js

@ -50,31 +50,12 @@ const wxSilentLogin = () => {
.token) .token)
getApp().globalData.username = res.data.data getApp().globalData.sid = res.data.data
.name .sid
getApp().globalData.token = res.data.data.token
getApp().globalData.sid = res.data.data.sid
getApp().globalData.mobile = res.data.data
.mobile
getApp().globalData.isAdmin = res.data.data
.isAdmin
getApp().globalData.orgSidPath = res.data.data
.orgSidPath
getApp().globalData.orgNamePath = res.data.data
.orgNamePath
getApp().globalData.organizationSid = res.data
.data.organizationSid
getApp().globalData.headImage = res.data.data
.headImage
getApp().globalData.isLogin = true
uni.setStorageSync("Global-Auth-Token", res.data
.data.token)
uni.setStorageSync("sid", res.data.data.sid)
uni.setStorageSync("isLogin", true)
uni.switchTab({
url: '/pages/card/card'
})
} }
} else { } else {
getApp().globalData.isLogin = false getApp().globalData.isLogin = false

6
pages.json

@ -17,7 +17,7 @@
} }
}, },
{ {
"path": "pages/index/index", "path": "pages/home/UserFragment",
"style": { "style": {
"navigationBarTitleText": "绑定账号", "navigationBarTitleText": "绑定账号",
"navigationStyle": "custom", "navigationStyle": "custom",
@ -42,8 +42,8 @@
"pagePath": "pages/card/card", "pagePath": "pages/card/card",
"text": "首页" "text": "首页"
}, { }, {
"pagePath": "pages/index/index", "pagePath": "pages/home/UserFragment",
"text": "通知" "text": "我的"
}] }]
}, },
"uniIdRouter": {} "uniIdRouter": {}

Loading…
Cancel
Save