diff --git a/libs/login.js b/libs/login.js index ec7161e..bf700c7 100644 --- a/libs/login.js +++ b/libs/login.js @@ -52,8 +52,11 @@ export function toLogin(push, pathLogin) { // #ifdef H5 if (isWeixin()) { if(Cache.get('WECHAT_APPID')){ + // uni.navigateTo({ + // url: '/pages/users/wechat_login/index', + // }); uni.navigateTo({ - url: '/pages/users/wechat_login/index', + url: '/pages/users/login/index', }); }else{ return uni.navigateTo({ @@ -72,9 +75,12 @@ export function toLogin(push, pathLogin) { // #endif // #ifdef MP let url + // uni.navigateTo({ + // url: '/pages/users/wechat_login/index' + // }) uni.navigateTo({ - url: '/pages/users/wechat_login/index' - }) + url: '/pages/users/login/index', + }); // #endif // #ifdef APP-PLUS uni.navigateTo({ diff --git a/pages/users/login/index.vue b/pages/users/login/index.vue index d0f1e27..c023f91 100644 --- a/pages/users/login/index.vue +++ b/pages/users/login/index.vue @@ -73,6 +73,22 @@ + + + + +

其他方式登录

+ +
+ + + + + + +
+ +
@@ -291,6 +307,11 @@ // #endif }, methods: { + wxLoginMp(){ + uni.navigateTo({ + url: '/pages/users/wechat_login/index?source=1' + }) + }, // #ifdef MP getPhoneNumber(e) { let that = this; diff --git a/pages/users/wechat_login/index.vue b/pages/users/wechat_login/index.vue index 59b25fa..31faff8 100644 --- a/pages/users/wechat_login/index.vue +++ b/pages/users/wechat_login/index.vue @@ -109,6 +109,7 @@ configData: Cache.get('BASIC_CONFIG'), bindPhone: false, wechat_phone_switch: 0, + source:0 }; }, computed:{ @@ -122,6 +123,7 @@ }, onLoad(options) { + this.source = options.source if (uni.getUserProfile) { this.canUseGetUserProfile = true } @@ -214,12 +216,19 @@ uni.hideLoading(); self.isShow = true; }else{ - this.$util.Tips({ - title: '授权成功', - icon: 'success' - }, { - tab: 3 - }); + if(self.source==1){ + uni.switchTab({ + url: '/pages/user/index' + }) + }else{ + this.$util.Tips({ + title: '授权成功', + icon: 'success' + }, { + tab: 3 + }); + } + } }else{ uni.setStorageSync('auth_token',res.data.result.key);