bug修复

This commit is contained in:
Waiting 2024-06-04 10:21:16 +08:00
parent c56ea0dd73
commit 183a95f48b
2 changed files with 4 additions and 11 deletions

View File

@ -26,29 +26,22 @@
<script setup lang='ts'>
import { useUserStore } from '@/store';
import { assetsUrl } from '@/utils/assets';
import { getRegisterStoreId, showToast } from '@/utils';
import { showToast } from '@/utils';
const userStore = useUserStore();
const isAgreePrivacy = ref(false);
async function wechatLogin() {
function wechatLogin() {
if(!isAgreePrivacy.value) {
showToast('请先阅读并同意小程序隐私保护协议');
return;
}
uni.showLoading();
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 = () => {

View File

@ -120,7 +120,7 @@ const save = async () => {
avatarUrl: avatarUrl.value,
nickName: nickName.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
};