fastman3-dfyjapp-request 1.2.0 → 1.2.1
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/README.md
CHANGED
|
@@ -19,7 +19,7 @@ import { guid } from "../utils";
|
|
|
19
19
|
import { isFromApp, isFromWeiXin, isFromWhichPlatform } from "fastman3-common-helper/es/OS.h5";
|
|
20
20
|
import { getVersion } from "fastman3-common-helper/es/version.web";
|
|
21
21
|
import { setStorageSync, getStorageSync } from "fastman3-dfyjapp-syncstorage";
|
|
22
|
-
import { DEVICE_ID_KEY } from "../constants";
|
|
22
|
+
import { DEVICE_ID_KEY, TOKEN_KEY } from "../constants";
|
|
23
23
|
var _system;
|
|
24
24
|
var transformInterceptor = function transformInterceptor(chain) {
|
|
25
25
|
var requestParams = chain.requestParams;
|
|
@@ -57,8 +57,13 @@ var transformInterceptor = function transformInterceptor(chain) {
|
|
|
57
57
|
}
|
|
58
58
|
// 微信授权机制 //
|
|
59
59
|
// 2026-2-13: 改用内存变量形式来恢复token
|
|
60
|
+
var tokenStorage = "";
|
|
60
61
|
// var tokenStorage = getStorageSync(TOKEN_KEY);
|
|
61
62
|
var tokenStorage = AppAuthorize.token;
|
|
63
|
+
// 2026-3-24:微信的token通过localStorage来恢复
|
|
64
|
+
if (isFromWeiXin()) {
|
|
65
|
+
tokenStorage = getStorageSync(TOKEN_KEY);
|
|
66
|
+
}
|
|
62
67
|
if (!!tokenStorage) {
|
|
63
68
|
body.header["token"] = tokenStorage;
|
|
64
69
|
}
|