xg
This commit is contained in:
parent
b5200d750c
commit
89af95fc1f
@ -147,6 +147,13 @@
|
|||||||
provider: 'weixin',
|
provider: 'weixin',
|
||||||
success: function(loginRes) {
|
success: function(loginRes) {
|
||||||
isRegistered(loginRes.code, that.phonecode).then(resp => {
|
isRegistered(loginRes.code, that.phonecode).then(resp => {
|
||||||
|
if (!resp.data) {
|
||||||
|
that.$refs.uToast.show({
|
||||||
|
title: '登录失败',
|
||||||
|
type: 'error',
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
if (resp.data.openid && resp.data.phone) {
|
if (resp.data.openid && resp.data.phone) {
|
||||||
uni.setStorageSync("openid", resp.data.openid)
|
uni.setStorageSync("openid", resp.data.openid)
|
||||||
uni.setStorageSync("phone", resp.data.phone)
|
uni.setStorageSync("phone", resp.data.phone)
|
||||||
|
|||||||
@ -48,12 +48,12 @@
|
|||||||
// this.getAddress();
|
// this.getAddress();
|
||||||
createMobileToken().then(res => {
|
createMobileToken().then(res => {
|
||||||
uni.setStorageSync("token", res.data.token)
|
uni.setStorageSync("token", res.data.token)
|
||||||
})
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/homepage/homepage'
|
url: '/pages/homepage/homepage'
|
||||||
});
|
});
|
||||||
}, 2000);
|
}, 1000);
|
||||||
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//获取当前位置
|
//获取当前位置
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user