2 Achegas 2c73d013db ... b25f9874ca

Autor SHA1 Mensaxe Data
  weixin_52219567 b25f9874ca Merge branch 'master' of http://8.152.4.3:3000/yp_web/yoe-shop-web hai 3 días
  weixin_52219567 27ee74f80b 优化 hai 3 días
Modificáronse 1 ficheiros con 6 adicións e 2 borrados
  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'