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;
         // 刷新页面以更新数据