This commit is contained in:
2024-01-24 09:48:16 +08:00
parent b5200d750c
commit 89af95fc1f
2 changed files with 13 additions and 6 deletions

View File

@ -147,6 +147,13 @@
provider: 'weixin',
success: function(loginRes) {
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) {
uni.setStorageSync("openid", resp.data.openid)
uni.setStorageSync("phone", resp.data.phone)
@ -224,4 +231,4 @@
<style lang="scss">
@import "./login.scss";
</style>
</style>

View File

@ -48,12 +48,12 @@
// this.getAddress();
createMobileToken().then(res => {
uni.setStorageSync("token", res.data.token)
setTimeout(() => {
uni.reLaunch({
url: '/pages/homepage/homepage'
});
}, 1000);
})
setTimeout(() => {
uni.reLaunch({
url: '/pages/homepage/homepage'
});
}, 2000);
},
methods: {
//