bug修复
This commit is contained in:
parent
c56ea0dd73
commit
183a95f48b
@ -26,29 +26,22 @@
|
|||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { useUserStore } from '@/store';
|
import { useUserStore } from '@/store';
|
||||||
import { assetsUrl } from '@/utils/assets';
|
import { assetsUrl } from '@/utils/assets';
|
||||||
import { getRegisterStoreId, showToast } from '@/utils';
|
import { showToast } from '@/utils';
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const isAgreePrivacy = ref(false);
|
const isAgreePrivacy = ref(false);
|
||||||
|
|
||||||
async function wechatLogin() {
|
function wechatLogin() {
|
||||||
if(!isAgreePrivacy.value) {
|
if(!isAgreePrivacy.value) {
|
||||||
showToast('请先阅读并同意小程序隐私保护协议');
|
showToast('请先阅读并同意小程序隐私保护协议');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uni.showLoading();
|
||||||
userStore.login().then(() => {
|
userStore.login().then(() => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
uni.reLaunch({ url: '/pages/home/index' });
|
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 = () => {
|
const bindCheck = () => {
|
||||||
|
@ -120,7 +120,7 @@ const save = async () => {
|
|||||||
avatarUrl: avatarUrl.value,
|
avatarUrl: avatarUrl.value,
|
||||||
nickName: nickName.value,
|
nickName: nickName.value,
|
||||||
telephone: telephone.value,
|
telephone: telephone.value,
|
||||||
birthday: dayjs(birthday.value).format('YYYY-MM-DD HH:mm:ss'),
|
birthday: dayjs(birthday.value).isValid() ? dayjs(birthday.value).format('YYYY-MM-DD HH:mm:ss') : dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
||||||
gender: gender.value
|
gender: gender.value
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user