fastman3-dfyjapp-request 1.1.3 → 1.1.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/README.md +4 -0
- package/es/interceptors/transformInterceptor.js +15 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ var __assign = this && this.__assign || function () {
|
|
|
23
23
|
|
|
24
24
|
import { AppAuthorize } from "fastman3-dfyjapp-jsbridge";
|
|
25
25
|
import { guid } from "../utils";
|
|
26
|
-
import { isFromApp, isFromWeiXin,
|
|
26
|
+
import { isFromApp, isFromWeiXin, isFromWhichPlatform } from "fastman3-common-helper/es/OS.h5";
|
|
27
27
|
import { getVersion } from "fastman3-common-helper/es/version.web";
|
|
28
28
|
import { setStorageSync, getStorageSync } from "fastman3-dfyjapp-syncstorage";
|
|
29
29
|
import { DEVICE_ID_KEY, TOKEN_KEY } from "../constants";
|
|
@@ -33,20 +33,20 @@ var _system;
|
|
|
33
33
|
var transformInterceptor = function transformInterceptor(chain) {
|
|
34
34
|
var requestParams = chain.requestParams;
|
|
35
35
|
if (requestParams === null || requestParams === void 0 ? void 0 : requestParams.isNative) return chain.proceed(requestParams);
|
|
36
|
-
var FUNCNO_POWER_BY_FASTMAN3 = requestParams.FUNCNO_POWER_BY_FASTMAN3; // TODO 随着 CHANNEL 对环境的要求高而增多扩展
|
|
37
|
-
|
|
38
|
-
if (
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
36
|
+
var FUNCNO_POWER_BY_FASTMAN3 = requestParams.FUNCNO_POWER_BY_FASTMAN3; // // TODO 随着 CHANNEL 对环境的要求高而增多扩展
|
|
37
|
+
// if(!_system) {
|
|
38
|
+
// if (isFromWeiXin()) {
|
|
39
|
+
// _system = "Weixin";
|
|
40
|
+
// } else if(isFromIos()) {
|
|
41
|
+
// _system = "iOS";
|
|
42
|
+
// } else if(isFromAndroid()) {
|
|
43
|
+
// _system = "Andriod";
|
|
44
|
+
// }else {
|
|
45
|
+
// _system = "Weixin"; // 添加默认值
|
|
46
|
+
// }
|
|
47
|
+
// }
|
|
48
|
+
|
|
49
|
+
_system = isFromWhichPlatform();
|
|
50
50
|
var body = {
|
|
51
51
|
header: {
|
|
52
52
|
appId: process.env.APP_ID,
|