|
@@ -16,14 +16,17 @@
|
|
|
<!-- <view class="authorize-login" @click="getUserInfo">登录</view> -->
|
|
|
<!-- #ifdef MP-WEIXIN -->
|
|
|
<button class="authorize-login" open-type="getUserInfo" @getuserinfo="getUserinfoWechat" withCredentials="true">
|
|
|
- 登录
|
|
|
+ 微信一键登录
|
|
|
</button>
|
|
|
<!-- #endif -->
|
|
|
<!-- #ifdef APP-PLUS -->
|
|
|
<button class="authorize-login" @click="getUserinfoApp">
|
|
|
- 登录
|
|
|
+ 微信一键登录
|
|
|
</button>
|
|
|
<!-- #endif -->
|
|
|
+ <button class="authorize-login" @click="goIndex">
|
|
|
+ 再逛逛
|
|
|
+ </button>
|
|
|
<view @click="showAgreement = true" class="agreement">点击登录视为同意<text class="underline">平台服务协议</text></view>
|
|
|
</view>
|
|
|
{{tipxx}}
|
|
@@ -165,6 +168,11 @@
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ goIndex() {
|
|
|
+ uni.switchTab({
|
|
|
+ url: '/pages/index/index'
|
|
|
+ });
|
|
|
+ },
|
|
|
// getPhoneNumber(e) {
|
|
|
// if (this.wxLoginData) {
|
|
|
// let _that = this
|
|
@@ -209,7 +217,7 @@
|
|
|
fail: (error) => {
|
|
|
console.log(33333, error)
|
|
|
this.$refs.uTips.show({
|
|
|
- title: '微信登录授权失败',
|
|
|
+ title: '微信登录授权失败,请再试试',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
}
|
|
@@ -266,7 +274,7 @@
|
|
|
fail: (error) => {
|
|
|
console.log(2222, error)
|
|
|
that.$refs.uTips.show({
|
|
|
- title: '微信登录授权失败',
|
|
|
+ title: '微信登录授权失败,请再试试',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
}
|
|
@@ -305,7 +313,6 @@
|
|
|
|
|
|
// 发请求获取个人数据 envType:1小程序 0:app
|
|
|
getUserInfo(envType) {
|
|
|
- debugger
|
|
|
console.log('发请求获取个人数据envType',envType)
|
|
|
NET.request(API.WxLogin, {
|
|
|
...this.wxLoginData,
|
|
@@ -333,7 +340,7 @@
|
|
|
}).catch(error => {
|
|
|
console.log(44444, error)
|
|
|
this.$refs.uTips.show({
|
|
|
- title: '微信登录授权失败',
|
|
|
+ title: '微信登录授权失败,请再试试',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
})
|