注册调整

This commit is contained in:
2024-05-24 00:21:47 +08:00
parent 0c0d5e55d5
commit b53dc2dd4f
18 changed files with 1683 additions and 1467 deletions

View File

@@ -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 = () => {