|
|
@@ -6,30 +6,30 @@
|
|
|
export default {
|
|
|
onLaunch: function() {
|
|
|
let that = this;
|
|
|
- wx.login({
|
|
|
- success(re) {
|
|
|
- that.$api.wxAuthLogin({code:re.code}).then(res=>{
|
|
|
- uni.setStorageSync('userInfo',res.data.data.userInfo)
|
|
|
- uni.setStorageSync('accessToken',res.data.data.access_token)
|
|
|
- uni.setStorageSync('phoneIsBind',res.data.data.phoneIsBind)
|
|
|
-
|
|
|
- if (res.data.data.phoneIsBind){
|
|
|
- uni.switchTab({
|
|
|
- url: '/pages/index/index',
|
|
|
- })
|
|
|
- // uni.navigateTo({
|
|
|
- // url: '/loginPages/bindAccount/index',
|
|
|
- // })
|
|
|
- }else {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/login/login',
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- })
|
|
|
-
|
|
|
- },
|
|
|
- })
|
|
|
+ // wx.login({
|
|
|
+ // success(re) {
|
|
|
+ // that.$api.wxAuthLogin({code:re.code}).then(res=>{
|
|
|
+ // uni.setStorageSync('userInfo',res.data.data.userInfo)
|
|
|
+ // uni.setStorageSync('accessToken',res.data.data.access_token)
|
|
|
+ // uni.setStorageSync('phoneIsBind',res.data.data.phoneIsBind)
|
|
|
+ //
|
|
|
+ // if (res.data.data.phoneIsBind){
|
|
|
+ // uni.switchTab({
|
|
|
+ // url: '/pages/index/index',
|
|
|
+ // })
|
|
|
+ // // uni.navigateTo({
|
|
|
+ // // url: '/loginPages/bindAccount/index',
|
|
|
+ // // })
|
|
|
+ // }else {
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: '/pages/login/login',
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // })
|
|
|
+ //
|
|
|
+ // },
|
|
|
+ // })
|
|
|
console.log('App Launch')
|
|
|
},
|
|
|
onShow: function() {
|