注册调整

This commit is contained in:
2024-05-23 15:49:43 +08:00
parent b7461002dc
commit 0c0d5e55d5
6 changed files with 557 additions and 170 deletions

View File

@@ -31,16 +31,19 @@ import { showToast } from '@/utils';
const userStore = useUserStore();
const isAgreePrivacy = ref(false);
function wechatLogin() {
async function wechatLogin() {
if(!isAgreePrivacy.value) {
showToast('请先阅读并同意小程序隐私保护协议');
return;
}
uni.showLoading();
userStore.authLogin().then(() => {
uni.hideLoading();
uni.reLaunch({ url: '/pages/home/index' });
});
await uni.showLoading();
const result = await userStore.login();
uni.hideLoading();
if(result) {
await uni.reLaunch({ url: '/pages/home/index' });
} else {
await uni.navigateTo({ url: '/pages/common/register/index' });
}
}
const bindCheck = () => {