fastman3-dfyjapp-request 1.1.13 → 1.1.14
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/request.js +11 -0
- package/package.json +1 -1
package/README.md
CHANGED
package/es/request.js
CHANGED
|
@@ -164,6 +164,17 @@ var fetch = /** @class */function () {
|
|
|
164
164
|
* @param data 数据,对象类型
|
|
165
165
|
*/
|
|
166
166
|
fetch.prototype.postRouter = function (restfulPath, data) {
|
|
167
|
+
if (!this.init) {
|
|
168
|
+
addInterceptor(endProductInterceptor);
|
|
169
|
+
addInterceptor(transformInterceptor);
|
|
170
|
+
addInterceptor(logInterceptor);
|
|
171
|
+
if (process.env.APP_ENV !== "mock") {
|
|
172
|
+
addInterceptor(securityInterceptor);
|
|
173
|
+
}
|
|
174
|
+
addInterceptor(httpStatusInterceptor);
|
|
175
|
+
addInterceptor(timeoutInterceptor);
|
|
176
|
+
this.init = true;
|
|
177
|
+
}
|
|
167
178
|
if (typeof data != "string") {
|
|
168
179
|
data = JSON.stringify(data);
|
|
169
180
|
}
|