im-ui-mobile 0.0.64 → 0.0.66
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/types/utils/requester.d.ts +1 -2
- package/utils/requester.js +3 -2
package/package.json
CHANGED
|
@@ -4,8 +4,7 @@ declare class Requester {
|
|
|
4
4
|
private baseURL;
|
|
5
5
|
private options;
|
|
6
6
|
private timeout;
|
|
7
|
-
private
|
|
8
|
-
private accessToken;
|
|
7
|
+
private header;
|
|
9
8
|
constructor(baseURL: string, options?: Partial<UniApp.RequestOptions>);
|
|
10
9
|
setToken(token: string): void;
|
|
11
10
|
request<T = any>(options: Partial<UniApp.RequestOptions>): Promise<Response<T>>;
|
package/utils/requester.js
CHANGED
|
@@ -22,11 +22,12 @@ export default class Requester {
|
|
|
22
22
|
...options
|
|
23
23
|
}
|
|
24
24
|
this.header = {
|
|
25
|
+
...this.header,
|
|
25
26
|
...options.header
|
|
26
27
|
}
|
|
27
|
-
this.options = this.baseURL + this.options.url
|
|
28
|
-
this.options.timeout = this.timeout
|
|
28
|
+
this.options.url = this.baseURL + this.options.url
|
|
29
29
|
this.options.header = this.header
|
|
30
|
+
this.options.timeout = this.timeout
|
|
30
31
|
return new Promise((resolve, reject) => {
|
|
31
32
|
uni.request({
|
|
32
33
|
...this.options,
|