优化登录功能

This commit is contained in:
2024-10-25 13:39:07 +08:00
parent d648a18935
commit 1017966319
3 changed files with 23 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
{
"name" : "xiaokang-cline",
"appid" : "__UNI__0F46058",
"appid" : "__UNI__5D44D95",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",

View File

@@ -198,12 +198,17 @@
],
info: [],
bgShow: false,
isShow_envVersion: true
isShow_envVersion: false
}
},
onLoad() {
setInterval(() => {
this.isShow_envVersion = uni.getStorageSync('isShow_envVersion')
if (this.isShow_envVersion == false) {
if (this.doctorList.length == 0) {
this.getList();
}
}
}, 500)
},
created() {
@@ -221,9 +226,13 @@
// })
// }
uni.navigateTo({
url: '/pages/home/index'
})
// uni.navigateTo({
// url: '/pages/home/index'
// })
// 跳转到登录页,不要返回的
uni.navigateTo({
url: '/pages/login/login'
})
}
},
@@ -236,7 +245,6 @@
uni.setNavigationBarTitle({
title: this.headerTitle,
success() {
console.log(1111);
}
});
uni.setNavigationBarColor({

View File

@@ -8,7 +8,7 @@
</view>
<image src="@/static/empty/login.png" mode="aspectFit"></image>
<button class="btn" :class="form['check']?'':'bg'" :disabled="!form['check']" open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber">手机号一键注册</button>
@getphonenumber="getPhoneNumber">手机号一键登录</button>
<view class="word">
<u-icon size="35" :color="form['check']?'#2979FF':'#E5E5E5'" name="checkmark-circle-fill"
@@ -211,6 +211,14 @@
uni.setStorageSync('token', res.data.data.token) //存储token
uni.setStorageSync('user_id', res.data.data.data.user.id)
uni.setStorageSync('userinfo', res.data.data.data['user'])
uni.setStorageSync('store_id', res.data.data.data.store_id)
if (res.data.data.data.user.mobile != '') {
uni.reLaunch({
url: '/pages/home/home'
})
}
} else if (res.data.errcode != 0) {
// uni.showToast({