@airpower/web 0.2.12 → 0.2.13
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/dist/config/WebConfig.d.ts +7 -2
- package/dist/main.js +9 -2
- package/package.json +1 -1
|
@@ -303,11 +303,16 @@ export declare class WebConfig {
|
|
|
303
303
|
*/
|
|
304
304
|
static product: string;
|
|
305
305
|
/**
|
|
306
|
-
* ###
|
|
306
|
+
* ### 获取身份令牌
|
|
307
307
|
*/
|
|
308
308
|
static getAccessToken(): string;
|
|
309
309
|
/**
|
|
310
|
-
* ###
|
|
310
|
+
* ### 移除身份令牌
|
|
311
311
|
*/
|
|
312
312
|
static removeAccessToken(): void;
|
|
313
|
+
/**
|
|
314
|
+
* ### 设置身份令牌
|
|
315
|
+
* @param accessToken 身份令牌
|
|
316
|
+
*/
|
|
317
|
+
static saveAccessToken(accessToken: string): void;
|
|
313
318
|
}
|
package/dist/main.js
CHANGED
|
@@ -11749,17 +11749,24 @@ class WebValidator {
|
|
|
11749
11749
|
}
|
|
11750
11750
|
class WebConfig {
|
|
11751
11751
|
/**
|
|
11752
|
-
* ###
|
|
11752
|
+
* ### 获取身份令牌
|
|
11753
11753
|
*/
|
|
11754
11754
|
static getAccessToken() {
|
|
11755
11755
|
return localStorage.getItem(this.authorizationHeaderKey) || "";
|
|
11756
11756
|
}
|
|
11757
11757
|
/**
|
|
11758
|
-
* ###
|
|
11758
|
+
* ### 移除身份令牌
|
|
11759
11759
|
*/
|
|
11760
11760
|
static removeAccessToken() {
|
|
11761
11761
|
localStorage.removeItem(this.authorizationHeaderKey);
|
|
11762
11762
|
}
|
|
11763
|
+
/**
|
|
11764
|
+
* ### 设置身份令牌
|
|
11765
|
+
* @param accessToken 身份令牌
|
|
11766
|
+
*/
|
|
11767
|
+
static saveAccessToken(accessToken) {
|
|
11768
|
+
localStorage.setItem(this.authorizationHeaderKey, accessToken);
|
|
11769
|
+
}
|
|
11763
11770
|
}
|
|
11764
11771
|
/**
|
|
11765
11772
|
* ### 应用标识
|