This commit is contained in:
2024-01-24 08:53:20 +08:00
parent 99e84d6617
commit 28e6df56ab

View File

@ -60,7 +60,6 @@
data() {
return {
phonecode: undefined,
logincode: undefined,
timer: undefined,
cityCode: null,
SOCKETURL: '',
@ -74,14 +73,6 @@
this.getAddress()
}
this.phonecode = undefined
this.logincode = undefined
let that = this
wx.login({
provider: 'weixin',
success: function(loginRes) {
that.logincode = loginRes.code
}
});
// this.scenenurseStationId = uni.getStorageSync('scenenurseStationId');
},
methods: {
@ -153,15 +144,11 @@
}
},
login() {
let that = this;
wx.login({
provider: 'weixin',
success: function(loginRes) {
that.logincode = loginRes.code
}
});
let that = this;
// console.log(that.logincode, that.phonecode)
isRegistered(that.logincode, that.phonecode).then(resp => {
isRegistered(loginRes.code, that.phonecode).then(resp => {
if (resp.data.openid && resp.data.phone) {
uni.setStorageSync("openid", resp.data.openid)
uni.setStorageSync("phone", resp.data.phone)
@ -206,8 +193,15 @@
})
}
})
} else {
that.$refs.uToast.show({
title: '登录失败',
type: 'error',
})
}
})
}
});
},
pwdlogin() {
var that = this