修改
This commit is contained in:
parent
e550435756
commit
caeaa309c6
@ -111,34 +111,28 @@
|
|||||||
type: 'error',
|
type: 'error',
|
||||||
duration: '1500',
|
duration: '1500',
|
||||||
})
|
})
|
||||||
setTimeout(() => {
|
if (that.timer) {
|
||||||
|
clearTimeout(that.timer)
|
||||||
|
}
|
||||||
|
that.timer = setTimeout(() => {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pages/register/register',
|
url: '/pages/register/register',
|
||||||
})
|
})
|
||||||
})
|
}, 1500)
|
||||||
} else if (resp.data.code == '1') {
|
} else if (resp.data.code == '1') {
|
||||||
getCurrentUser(resp.data.openid, resp.data.cityCode).then(res => {
|
getCurrentUser(resp.data.openid, resp.data.cityCode).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
uni.setStorageSync('patientId', res.data.id);
|
||||||
|
uni.setStorageSync('userinfo', res.data);
|
||||||
that.$refs.uToast.show({
|
that.$refs.uToast.show({
|
||||||
title: '登录成功',
|
title: '登录成功',
|
||||||
type: 'success',
|
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 {
|
} else {
|
||||||
that.$refs.uToast.show({
|
that.$refs.uToast.show({
|
||||||
title: '登录失败',
|
title: '登录失败',
|
||||||
type: 'error',
|
type: 'error',
|
||||||
duration: '1500'
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user