登录逻辑调整

This commit is contained in:
Waiting 2024-06-06 17:48:37 +08:00
parent 8f06cf703d
commit 613c0df738
3 changed files with 7 additions and 8 deletions

View File

@ -50,7 +50,7 @@
import { onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app';
import SkuDialog from '@/components/sku-dialog.vue';
import { assetsUrl, defaultImage } from '@/utils/assets';
import { goLogin, goPath, isLogin, showToast } from '@/utils';
import { goPath, isLogin, showToast } from '@/utils';
import { getCategoryList, getGoodsList } from '@/api/goods';
import { CategoryBean, GoodsBean } from '@/api/goods/types';
import useShoppingCartStore from '@/store/modules/shoppingcart';
@ -69,7 +69,6 @@ const currentPageNum = ref<number>(1);
onLoad(() => {
if(!isLogin()) {
goLogin();
return;
}

View File

@ -129,10 +129,10 @@ const cardLink = ref('');
const unPaidOrderCount = ref(0);
onLoad(() => {
if(!isLogin()) {
goLogin();
return;
}
// if(!isLogin()) {
// goLogin();
// return;
// }
});
onShow(async () => {

View File

@ -46,7 +46,7 @@ import { assetsUrl } from '@/utils/assets';
import { generateBarCode, generateQrCode } from '@/api/common';
import { getDynamicCode } from '@/api/user';
import { useUserStore } from '@/store';
import { goLogin, goPath, isLogin } from '@/utils';
import { goPath, isLogin } from '@/utils';
const store = useUserStore();
const { userInfo } = storeToRefs(store);
@ -57,7 +57,7 @@ const codeRefreshInterval = ref(30);
onLoad(() => {
if(!isLogin()) {
goLogin();
// goLogin();
return;
}
generateCode();