Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
shidongli 2023-11-09 15:58:56 +08:00
commit 589bc93ce7

View File

@ -111,34 +111,28 @@
type: 'error',
duration: '1500',
})
setTimeout(() => {
if (that.timer) {
clearTimeout(that.timer)
}
that.timer = setTimeout(() => {
uni.redirectTo({
url: '/pages/register/register',
})
})
}, 1500)
} else if (resp.data.code == '1') {
getCurrentUser(resp.data.openid, resp.data.cityCode).then(res => {
if (res.code == 200) {
uni.setStorageSync('patientId', res.data.id);
uni.setStorageSync('userinfo', res.data);
that.$refs.uToast.show({
title: '登录成功',
type: 'success',
duration: '1500'
back: 1
})
uni.setStorageSync('patientId', res.data.id);
uni.setStorageSync('userinfo', res.data);
if (that.timer) {
clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
uni.navigateBack({
delta: 1
})
}, 500)
} else {
that.$refs.uToast.show({
title: '登录失败',
type: 'error',
duration: '1500'
})
}
})