tx-sider 2.1.57 → 2.1.59

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,8 +22451,9 @@ class Request {
22451
22451
  }
22452
22452
  },
22453
22453
  async (error) => {
22454
+ var _a2, _b2, _c2;
22454
22455
  console.log("🚀 ~ Request ~ constructor ~ error:", error.response);
22455
- if (error.response.status == 401) {
22456
+ if (((_a2 = error.response) == null ? void 0 : _a2.status) == 401) {
22456
22457
  const refresh_token = localStorage.getItem("refresh_token");
22457
22458
  localStorage.removeItem("token");
22458
22459
  localStorage.removeItem("refresh_token");
@@ -22473,7 +22474,7 @@ class Request {
22473
22474
  }
22474
22475
  } else {
22475
22476
  let tips = "";
22476
- if (error.response.status in httpCode) {
22477
+ if (((_b2 = error.response) == null ? void 0 : _b2.status) in httpCode) {
22477
22478
  if (error.response.data.error) {
22478
22479
  console.log(error.response);
22479
22480
  tips = error.response.data.error.message;
@@ -22481,9 +22482,9 @@ class Request {
22481
22482
  tips = "暂无权限īŧŒč¯ˇč”įŗģįŽĄį†å‘˜åˆ†é…";
22482
22483
  }
22483
22484
  } else {
22484
- tips = httpCode[error.response.status];
22485
+ tips = httpCode[(_c2 = error.response) == null ? void 0 : _c2.status];
22485
22486
  }
22486
- message.error(tips);
22487
+ tips && message.error(tips);
22487
22488
  }
22488
22489
  return Promise.reject(error);
22489
22490
  }