befly-admin-ui 1.9.3 → 1.9.4
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/layouts/default.vue
CHANGED
|
@@ -86,7 +86,7 @@ import { $Config } from "@/plugins/config.js";
|
|
|
86
86
|
|
|
87
87
|
const router = useRouter();
|
|
88
88
|
const route = useRoute();
|
|
89
|
-
const uploadHeaders = { Authorization: `Bearer ${localStorage.getItem($Config.
|
|
89
|
+
const uploadHeaders = { Authorization: `Bearer ${localStorage.getItem(`${$Config.productCode}-token`) || ""}` };
|
|
90
90
|
|
|
91
91
|
function isString(value) {
|
|
92
92
|
return typeof value === "string";
|
|
@@ -243,7 +243,7 @@ async function handleLogout() {
|
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
try {
|
|
246
|
-
localStorage.removeItem($Config.
|
|
246
|
+
localStorage.removeItem(`${$Config.productCode}-token`);
|
|
247
247
|
await router.push($Config.loginPath);
|
|
248
248
|
MessagePlugin.success("退出成功");
|
|
249
249
|
destroy();
|
package/package.json
CHANGED
package/views/login_1/index.vue
CHANGED
|
@@ -109,7 +109,7 @@ async function apiLogin() {
|
|
|
109
109
|
password: hashedPassword
|
|
110
110
|
});
|
|
111
111
|
|
|
112
|
-
localStorage.setItem($Config.
|
|
112
|
+
localStorage.setItem(`${$Config.productCode}-token`, res.data.token);
|
|
113
113
|
|
|
114
114
|
MessagePlugin.success(res.msg || "登录成功");
|
|
115
115
|
|
|
@@ -93,7 +93,7 @@ import { withDefaultColumns } from "befly-admin-ui/utils/withDefaultColumns";
|
|
|
93
93
|
import { $Config } from "@/plugins/config.js";
|
|
94
94
|
|
|
95
95
|
const uploadHeaders = {
|
|
96
|
-
Authorization: `Bearer ${localStorage.getItem($Config.
|
|
96
|
+
Authorization: `Bearer ${localStorage.getItem(`${$Config.productCode}-token`) || ""}`
|
|
97
97
|
};
|
|
98
98
|
|
|
99
99
|
const $Data = reactive({
|