注册调整
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
<script setup lang='ts'>
|
||||
import { useUserStore } from '@/store';
|
||||
import { assetsUrl } from '@/utils/assets';
|
||||
import { showToast } from '@/utils';
|
||||
import { getRegisterStoreId, showToast } from '@/utils';
|
||||
|
||||
const userStore = useUserStore();
|
||||
const isAgreePrivacy = ref(false);
|
||||
@@ -36,14 +36,24 @@ async function wechatLogin() {
|
||||
showToast('请先阅读并同意小程序隐私保护协议');
|
||||
return;
|
||||
}
|
||||
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' });
|
||||
|
||||
if(!getRegisterStoreId()) {
|
||||
showToast('请从公众号消息窗口点击店名打开小程序');
|
||||
return;
|
||||
}
|
||||
|
||||
userStore.login().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