2 Sitoutukset 2c73d013db ... b25f9874ca

Tekijä SHA1 Viesti Päivämäärä
  weixin_52219567 b25f9874ca Merge branch 'master' of http://8.152.4.3:3000/yp_web/yoe-shop-web 3 päivää sitten
  weixin_52219567 27ee74f80b 优化 3 päivää sitten
1 muutettua tiedostoa jossa 6 lisäystä ja 2 poistoa
  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'