zjs_project 1 개월 전
부모
커밋
9269d20ba7
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/permission.ts

+ 1 - 1
src/permission.ts

@@ -25,7 +25,7 @@ const whiteList: string[] = [PageEnum.LOGIN, PageEnum.ERROR_403]
 // 检测店铺ID变化并刷新页面的函数
 function checkShopIdChange() {
     const currentShopId = getShopId();
-    if (shopId !== currentShopId && currentShopId !== '') {
+    if (shopId !== currentShopId && currentShopId && shopId) {
         console.log('检测到店铺ID变化:', shopId, '->', currentShopId);
         shopId = currentShopId;
         // 刷新页面以更新数据