etherreq 1.0.29 → 1.0.31
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/package.json +1 -1
- package/src/request.js +15 -1
- package/src/types/etherreq.d.ts +1 -1
package/package.json
CHANGED
package/src/request.js
CHANGED
|
@@ -25,7 +25,21 @@ instance.interceptors.request.use((config) => {
|
|
|
25
25
|
|
|
26
26
|
if (cached) {
|
|
27
27
|
console.log("缓存命中");
|
|
28
|
-
return Promise.resolve(cached); // 这里返回的就是 response.data
|
|
28
|
+
// return Promise.resolve(cached); // 这里返回的就是 response.data
|
|
29
|
+
const a={
|
|
30
|
+
"data": {
|
|
31
|
+
"id": 123,
|
|
32
|
+
"name": "张三",
|
|
33
|
+
"email": "zhangsan@example.com"
|
|
34
|
+
},
|
|
35
|
+
"status": 200,
|
|
36
|
+
"statusText": "OK",
|
|
37
|
+
"headers": {
|
|
38
|
+
"content-type": "application/json"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
console.log("返回数据:",a);
|
|
42
|
+
return a;
|
|
29
43
|
}
|
|
30
44
|
}
|
|
31
45
|
|
package/src/types/etherreq.d.ts
CHANGED