注册调整
This commit is contained in:
@@ -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 = () => {
|
||||
|
Reference in New Issue
Block a user