14
0

2 کامیت‌ها 2c73d013db ... b25f9874ca

نویسنده SHA1 پیام تاریخ
  weixin_52219567 b25f9874ca Merge branch 'master' of http://8.152.4.3:3000/yp_web/yoe-shop-web 3 روز پیش
  weixin_52219567 27ee74f80b 优化 3 روز پیش
1فایلهای تغییر یافته به همراه6 افزوده شده و 2 حذف شده
  1. 6 2
      src/utils/request.ts

+ 6 - 2
src/utils/request.ts

@@ -134,8 +134,12 @@ service.interceptors.response.use(
           const devPort = window.location.port || import.meta.env.VITE_APP_PORT;
           url = `${url}:${devPort}/index`;
         }
-        window.location.href = url;
-        isRelogin.show = false;
+        useUserStore()
+          .logout()
+          .then(() => {
+            window.location.href = url;
+            isRelogin.show = false;
+          });
         // ElMessageBox.confirm('登录状态已过期,请重新登录', '登录提示', {
         //   confirmButtonText: '重新登录',
         //   type: 'warning'