2 Commits 2c73d013db ... b25f9874ca

Autor SHA1 Mensaje Fecha
  weixin_52219567 b25f9874ca Merge branch 'master' of http://8.152.4.3:3000/yp_web/yoe-shop-web hace 3 días
  weixin_52219567 27ee74f80b 优化 hace 3 días
Se han modificado 1 ficheros con 6 adiciones y 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'