tx-sider 2.1.47 → 2.1.49
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 +44 -6
- package/lib/TXUI.umd.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/lib/TXUI.mjs
CHANGED
|
@@ -22450,10 +22450,42 @@ class Request {
|
|
|
22450
22450
|
return Promise.reject(response);
|
|
22451
22451
|
}
|
|
22452
22452
|
},
|
|
22453
|
-
(error) => {
|
|
22454
|
-
console.log(error
|
|
22455
|
-
|
|
22456
|
-
|
|
22453
|
+
async (error) => {
|
|
22454
|
+
console.log("🚀 ~ Request ~ constructor ~ error:", error.response);
|
|
22455
|
+
if (error.response.status == 401) {
|
|
22456
|
+
const refresh_token = localStorage.getItem("refresh_token");
|
|
22457
|
+
console.log("🚀 ~ Request ~ refresh_token:", refresh_token);
|
|
22458
|
+
if (refresh_token) {
|
|
22459
|
+
const data3 = await refreshToken({
|
|
22460
|
+
refreshToken: refresh_token,
|
|
22461
|
+
clientId: "admin-client-demo",
|
|
22462
|
+
clientSecret: "1q2w3e*"
|
|
22463
|
+
});
|
|
22464
|
+
if (data3.access_token) {
|
|
22465
|
+
localStorage.setItem("token", data3.access_token);
|
|
22466
|
+
localStorage.setItem("refresh_token", data3.refresh_token);
|
|
22467
|
+
location.reload();
|
|
22468
|
+
return;
|
|
22469
|
+
}
|
|
22470
|
+
}
|
|
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;
|
|
22475
|
+
} else {
|
|
22476
|
+
let tips = "";
|
|
22477
|
+
if (error.response.status in httpCode) {
|
|
22478
|
+
if (error.response.data.error) {
|
|
22479
|
+
console.log(error.response);
|
|
22480
|
+
tips = error.response.data.error.message;
|
|
22481
|
+
} else {
|
|
22482
|
+
tips = "暂无权限,请联系管理员分配";
|
|
22483
|
+
}
|
|
22484
|
+
} else {
|
|
22485
|
+
tips = httpCode[error.response.status];
|
|
22486
|
+
}
|
|
22487
|
+
message.error(tips);
|
|
22488
|
+
}
|
|
22457
22489
|
return Promise.reject(error);
|
|
22458
22490
|
}
|
|
22459
22491
|
);
|
|
@@ -28236,6 +28268,12 @@ const _sfc_main = {
|
|
|
28236
28268
|
console.log("🚀🚀🚀🚀", permissionModuleList.value);
|
|
28237
28269
|
if (permissionModuleList.value.length === 0) {
|
|
28238
28270
|
message.info("你暂无权限,请联系管理员分配");
|
|
28271
|
+
} else {
|
|
28272
|
+
if (permissionModuleList.value.length === 1) {
|
|
28273
|
+
oneModule(permissionModuleList.value[0].permissionModuleName);
|
|
28274
|
+
} else {
|
|
28275
|
+
systemVisibleTrue();
|
|
28276
|
+
}
|
|
28239
28277
|
}
|
|
28240
28278
|
} else if (permissionModuleList.value.length === 1) {
|
|
28241
28279
|
oneModule(permissionModuleList.value[0].permissionModuleName);
|
|
@@ -28301,7 +28339,7 @@ const _sfc_main = {
|
|
|
28301
28339
|
};
|
|
28302
28340
|
}
|
|
28303
28341
|
};
|
|
28304
|
-
const _withScopeId = (n2) => (pushScopeId("data-v-
|
|
28342
|
+
const _withScopeId = (n2) => (pushScopeId("data-v-2b8a4c16"), n2 = n2(), popScopeId(), n2);
|
|
28305
28343
|
const _hoisted_1 = {
|
|
28306
28344
|
class: "bg-white defaultTS funcTC relative",
|
|
28307
28345
|
style: { "padding-bottom": "10px", "margin-bottom": "10px" }
|
|
@@ -29250,7 +29288,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
29250
29288
|
}, 8, ["show"])
|
|
29251
29289
|
], 64);
|
|
29252
29290
|
}
|
|
29253
|
-
const TSider = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
29291
|
+
const TSider = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-2b8a4c16"]]);
|
|
29254
29292
|
const components = [TSider];
|
|
29255
29293
|
installComponents();
|
|
29256
29294
|
function installComponents() {
|