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.
@@ -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.tokenName) || ""}` };
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.tokenName);
246
+ localStorage.removeItem(`${$Config.productCode}-token`);
247
247
  await router.push($Config.loginPath);
248
248
  MessagePlugin.success("退出成功");
249
249
  destroy();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "befly-admin-ui",
3
- "version": "1.9.3",
4
- "gitHead": "ed00a79ec78c3e43c3b3fa6b40f68e69fe09e57e",
3
+ "version": "1.9.4",
4
+ "gitHead": "3a36e668720e216b840ca2cf8b50f9e40db8c410",
5
5
  "private": false,
6
6
  "description": "Befly - 管理后台功能组件",
7
7
  "keywords": [
@@ -109,7 +109,7 @@ async function apiLogin() {
109
109
  password: hashedPassword
110
110
  });
111
111
 
112
- localStorage.setItem($Config.tokenName, res.data.token);
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.tokenName) || ""}`
96
+ Authorization: `Bearer ${localStorage.getItem(`${$Config.productCode}-token`) || ""}`
97
97
  };
98
98
 
99
99
  const $Data = reactive({