登录逻辑调整
This commit is contained in:
parent
8f06cf703d
commit
613c0df738
@ -50,7 +50,7 @@
|
|||||||
import { onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app';
|
import { onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app';
|
||||||
import SkuDialog from '@/components/sku-dialog.vue';
|
import SkuDialog from '@/components/sku-dialog.vue';
|
||||||
import { assetsUrl, defaultImage } from '@/utils/assets';
|
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 { getCategoryList, getGoodsList } from '@/api/goods';
|
||||||
import { CategoryBean, GoodsBean } from '@/api/goods/types';
|
import { CategoryBean, GoodsBean } from '@/api/goods/types';
|
||||||
import useShoppingCartStore from '@/store/modules/shoppingcart';
|
import useShoppingCartStore from '@/store/modules/shoppingcart';
|
||||||
@ -69,7 +69,6 @@ const currentPageNum = ref<number>(1);
|
|||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
if(!isLogin()) {
|
if(!isLogin()) {
|
||||||
goLogin();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,10 +129,10 @@ const cardLink = ref('');
|
|||||||
const unPaidOrderCount = ref(0);
|
const unPaidOrderCount = ref(0);
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
if(!isLogin()) {
|
// if(!isLogin()) {
|
||||||
goLogin();
|
// goLogin();
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
});
|
});
|
||||||
|
|
||||||
onShow(async () => {
|
onShow(async () => {
|
||||||
|
@ -46,7 +46,7 @@ import { assetsUrl } from '@/utils/assets';
|
|||||||
import { generateBarCode, generateQrCode } from '@/api/common';
|
import { generateBarCode, generateQrCode } from '@/api/common';
|
||||||
import { getDynamicCode } from '@/api/user';
|
import { getDynamicCode } from '@/api/user';
|
||||||
import { useUserStore } from '@/store';
|
import { useUserStore } from '@/store';
|
||||||
import { goLogin, goPath, isLogin } from '@/utils';
|
import { goPath, isLogin } from '@/utils';
|
||||||
|
|
||||||
const store = useUserStore();
|
const store = useUserStore();
|
||||||
const { userInfo } = storeToRefs(store);
|
const { userInfo } = storeToRefs(store);
|
||||||
@ -57,7 +57,7 @@ const codeRefreshInterval = ref(30);
|
|||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
if(!isLogin()) {
|
if(!isLogin()) {
|
||||||
goLogin();
|
// goLogin();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
generateCode();
|
generateCode();
|
||||||
|
Loading…
Reference in New Issue
Block a user