tx-sider 2.1.48 → 2.1.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/TXUI.mjs CHANGED
@@ -22451,9 +22451,12 @@ class Request {
22451
22451
  }
22452
22452
  },
22453
22453
  async (error) => {
22454
+ const router = useRouter();
22454
22455
  console.log("🚀 ~ Request ~ constructor ~ error:", error.response);
22455
22456
  if (error.response.status == 401) {
22456
22457
  const refresh_token = localStorage.getItem("refresh_token");
22458
+ localStorage.removeItem("token");
22459
+ localStorage.removeItem("refresh_token");
22457
22460
  console.log("🚀 ~ Request ~ refresh_token:", refresh_token);
22458
22461
  if (refresh_token) {
22459
22462
  const data3 = await refreshToken({
@@ -22468,10 +22471,9 @@ class Request {
22468
22471
  return;
22469
22472
  }
22470
22473
  }
22471
- window.location.hostname.split(".");
22472
- const protocol2 = window.location.protocol;
22473
- const loginUrl = process.env.NODE_ENV == "development" ? "http://localhost:3000/login" : `${protocol2}//${window.location.hostname}/login`;
22474
- location.href = loginUrl;
22474
+ localStorage.removeItem("token");
22475
+ localStorage.removeItem("refresh_token");
22476
+ router.push("/login");
22475
22477
  } else {
22476
22478
  let tips = "";
22477
22479
  if (error.response.status in httpCode) {
@@ -28268,6 +28270,12 @@ const _sfc_main = {
28268
28270
  console.log("🚀🚀🚀🚀", permissionModuleList.value);
28269
28271
  if (permissionModuleList.value.length === 0) {
28270
28272
  message.info("äŊ æš‚无权限īŧŒč¯ˇč”įŗģįŽĄį†å‘˜åˆ†é…");
28273
+ } else {
28274
+ if (permissionModuleList.value.length === 1) {
28275
+ oneModule(permissionModuleList.value[0].permissionModuleName);
28276
+ } else {
28277
+ systemVisibleTrue();
28278
+ }
28271
28279
  }
28272
28280
  } else if (permissionModuleList.value.length === 1) {
28273
28281
  oneModule(permissionModuleList.value[0].permissionModuleName);
@@ -28333,7 +28341,7 @@ const _sfc_main = {
28333
28341
  };
28334
28342
  }
28335
28343
  };
28336
- const _withScopeId = (n2) => (pushScopeId("data-v-19737f2d"), n2 = n2(), popScopeId(), n2);
28344
+ const _withScopeId = (n2) => (pushScopeId("data-v-2b8a4c16"), n2 = n2(), popScopeId(), n2);
28337
28345
  const _hoisted_1 = {
28338
28346
  class: "bg-white defaultTS funcTC relative",
28339
28347
  style: { "padding-bottom": "10px", "margin-bottom": "10px" }
@@ -29282,7 +29290,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
29282
29290
  }, 8, ["show"])
29283
29291
  ], 64);
29284
29292
  }
29285
- const TSider = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-19737f2d"]]);
29293
+ const TSider = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-2b8a4c16"]]);
29286
29294
  const components = [TSider];
29287
29295
  installComponents();
29288
29296
  function installComponents() {