优化登录功能

This commit is contained in:
2024-10-25 14:47:15 +08:00
parent 1017966319
commit fb05d5b5a1
3 changed files with 28 additions and 23 deletions

View File

@@ -1,5 +1,5 @@
{
"name" : "xiaokang-cline",
"name" : "xk-client-wx",
"appid" : "__UNI__5D44D95",
"description" : "",
"versionName" : "1.0.0",

View File

@@ -214,26 +214,29 @@
created() {
const token = uni.getStorageSync('token')
const userInfo = uni.getStorageSync('userinfo')
if (!token || !userInfo) {
// console.log('token');
// if (this.isShow_envVersion) {
// uni.navigateTo({
// url: '/pages/home/index'
// })
// } else {
// uni.navigateTo({
// url: '/pages/login/login'
// })
// }
setTimeout(function () {
if (!token || !userInfo) {
// console.log('token');
// if (this.isShow_envVersion) {
// uni.navigateTo({
// url: '/pages/home/index'
// })
// } else {
// uni.navigateTo({
// url: '/pages/login/login'
// })
// }
// uni.navigateTo({
// url: '/pages/home/index'
// })
// 跳转到登录页,不要返回的
uni.navigateTo({
url: '/pages/login/login'
})
}
// uni.navigateTo({
// url: '/pages/home/index'
// })
// 跳转到登录页,不要返回的
uni.navigateTo({
url: '/pages/login/login'
})
}
}, 300)
},
onReady() {

View File

@@ -215,9 +215,11 @@
if (res.data.data.data.user.mobile != '') {
uni.reLaunch({
url: '/pages/home/home'
})
setTimeout(function () {
uni.reLaunch({
url: '/pages/home/home'
})
}, 500)
}
} else if (res.data.errcode != 0) {