@aliyun-obv/api 0.2.5 → 0.2.6
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/api.es.js +11 -0
- package/package.json +3 -3
package/dist/api.es.js
CHANGED
|
@@ -116,8 +116,19 @@ class BaseFetch {
|
|
|
116
116
|
}
|
|
117
117
|
get(_0) {
|
|
118
118
|
return __async$6(this, arguments, function* (api, params = {}, options = {}) {
|
|
119
|
+
var _a, _b, _c;
|
|
119
120
|
if (isTest) return Promise.resolve({ res: void 0 });
|
|
120
121
|
try {
|
|
122
|
+
let getDefaultInit = (_a = this.defaults.getDefaultInit) != null ? _a : {};
|
|
123
|
+
try {
|
|
124
|
+
if ((_b = window.ALIYUN_CONSOLE_CONFIG) == null ? void 0 : _b.LOCAL) {
|
|
125
|
+
getDefaultInit.headers = (_c = getDefaultInit.headers) != null ? _c : {};
|
|
126
|
+
if (getDefaultInit.headers["X-CSRF-TOKEN"] == null) {
|
|
127
|
+
getDefaultInit.headers["X-CSRF-TOKEN"] = "";
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
} catch (_e) {
|
|
131
|
+
}
|
|
121
132
|
const { url: newApi, init: newInit } = yield this.beforeRequest(
|
|
122
133
|
api,
|
|
123
134
|
params,
|
package/package.json
CHANGED
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"urijs": "^1.19.1",
|
|
12
12
|
"lodash": "^4.17.21",
|
|
13
13
|
"@alicloud/console-base-error-prompt-proxy": "^1.9.12",
|
|
14
|
-
"@aliyun-obv/i18n": "0.2.
|
|
15
|
-
"@aliyun-obv/utils": "0.2.
|
|
14
|
+
"@aliyun-obv/i18n": "0.2.6",
|
|
15
|
+
"@aliyun-obv/utils": "0.2.6",
|
|
16
16
|
"@alifd/next": "^1.27.11",
|
|
17
17
|
"styled-components": "^5.2.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {},
|
|
20
|
-
"version": "0.2.
|
|
20
|
+
"version": "0.2.6"
|
|
21
21
|
}
|