im-ui-mobile 0.0.62 → 0.0.64

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "im-ui-mobile",
3
- "version": "0.0.62",
3
+ "version": "0.0.64",
4
4
  "description": "A Vue3.0 + typescript instant messaging component library for Uniapp",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -5,8 +5,6 @@ export default class Requester {
5
5
  this.timeout = options.timeout || 10000;
6
6
  this.header = {
7
7
  'Content-Type': 'application/json',
8
- // 'Authorization': `Bearer ${this.accessToken}`,
9
- // 'AccessToken': this.accessToken,
10
8
  ...options.header
11
9
  };
12
10
  }
@@ -19,13 +17,16 @@ export default class Requester {
19
17
 
20
18
  // 基础请求方法
21
19
  async request(options) {
22
- this.options.url = this.baseURL + this.options.url;
23
- this.options.header = this.header
24
- this.options.timeout = this.timeout
25
20
  this.options = {
21
+ ...this.options,
26
22
  ...options
27
- };
28
-
23
+ }
24
+ this.header = {
25
+ ...options.header
26
+ }
27
+ this.options = this.baseURL + this.options.url
28
+ this.options.timeout = this.timeout
29
+ this.options.header = this.header
29
30
  return new Promise((resolve, reject) => {
30
31
  uni.request({
31
32
  ...this.options,