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 CHANGED
@@ -111,3 +111,7 @@
111
111
  ### v 1.1.13 - 2025.02.14
112
112
 
113
113
  1. 针对restful请求 中台报错返回500,进行特殊处理
114
+
115
+ ### v 1.1.14 - 2025.02.14
116
+
117
+ 1. 针对restful请求 调用时添加拦截器
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fastman3-dfyjapp-request",
3
- "version": "1.1.13",
3
+ "version": "1.1.14",
4
4
  "description": "a network request for dfyj app",
5
5
  "prepublishOnly": "npm run build",
6
6
  "main": "es/request.js",