eoss-mobiles 0.2.20 → 0.2.22

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/lib/picker.js CHANGED
@@ -1740,18 +1740,19 @@ var axios_ajax = function ajax(url) {
1740
1740
  withCredentials: false
1741
1741
  });
1742
1742
  http.interceptors.request.use(function (config) {
1743
- if (type === 'post' && format) {
1744
- config.data = external_qs_default.a.stringify(params);
1745
- if (!config.headers['content-type'] && !headers['Content-Type']) {
1746
- config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
1747
- }
1748
- } else {
1749
- if (!config.headers['content-type'] && !headers['Content-Type']) {
1750
- config.headers['content-type'] = 'application/json;charset=UTF-8';
1743
+ if ((params.params || params) instanceof FormData === false) {
1744
+ if (type === 'post' && !format) {
1745
+ config.params = external_qs_default.a.stringify(params.params || params);
1746
+ if (!config.headers['content-type'] && !headers['Content-Type']) {
1747
+ config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
1748
+ }
1749
+ } else {
1750
+ if (!config.headers['content-type'] && !headers['Content-Type']) {
1751
+ config.headers['content-type'] = 'application/json;charset=UTF-8';
1752
+ }
1753
+ config.params = params.params || params;
1751
1754
  }
1752
- config.data = params;
1753
1755
  }
1754
-
1755
1756
  if (util["a" /* default */].getStorage('token')) {
1756
1757
  config.headers.Authorization = util["a" /* default */].getStorage('token');
1757
1758
  }
@@ -1896,6 +1897,7 @@ var base = {
1896
1897
  }, headers, format);
1897
1898
  },
1898
1899
  post: function post(url, params, headers, format) {
1900
+ console.log(params, 'params');
1899
1901
  if (params.params) {
1900
1902
  params.params.userId = params.params.userId || util["a" /* default */].getStorage('userId');
1901
1903
  } else {
@@ -1908,6 +1910,7 @@ var base = {
1908
1910
  // CONCATENATED MODULE: ./src/utils/http.js
1909
1911
 
1910
1912
  var http_request = function request(options) {
1913
+ console.log(options, 'options');
1911
1914
  var fn = void 0;
1912
1915
  switch (options.type) {
1913
1916
  case 'post':
package/lib/radio.js CHANGED
@@ -1740,18 +1740,19 @@ var axios_ajax = function ajax(url) {
1740
1740
  withCredentials: false
1741
1741
  });
1742
1742
  http.interceptors.request.use(function (config) {
1743
- if (type === 'post' && format) {
1744
- config.data = external_qs_default.a.stringify(params);
1745
- if (!config.headers['content-type'] && !headers['Content-Type']) {
1746
- config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
1747
- }
1748
- } else {
1749
- if (!config.headers['content-type'] && !headers['Content-Type']) {
1750
- config.headers['content-type'] = 'application/json;charset=UTF-8';
1743
+ if ((params.params || params) instanceof FormData === false) {
1744
+ if (type === 'post' && !format) {
1745
+ config.params = external_qs_default.a.stringify(params.params || params);
1746
+ if (!config.headers['content-type'] && !headers['Content-Type']) {
1747
+ config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
1748
+ }
1749
+ } else {
1750
+ if (!config.headers['content-type'] && !headers['Content-Type']) {
1751
+ config.headers['content-type'] = 'application/json;charset=UTF-8';
1752
+ }
1753
+ config.params = params.params || params;
1751
1754
  }
1752
- config.data = params;
1753
1755
  }
1754
-
1755
1756
  if (util["a" /* default */].getStorage('token')) {
1756
1757
  config.headers.Authorization = util["a" /* default */].getStorage('token');
1757
1758
  }
@@ -1896,6 +1897,7 @@ var base = {
1896
1897
  }, headers, format);
1897
1898
  },
1898
1899
  post: function post(url, params, headers, format) {
1900
+ console.log(params, 'params');
1899
1901
  if (params.params) {
1900
1902
  params.params.userId = params.params.userId || util["a" /* default */].getStorage('userId');
1901
1903
  } else {
@@ -1908,6 +1910,7 @@ var base = {
1908
1910
  // CONCATENATED MODULE: ./src/utils/http.js
1909
1911
 
1910
1912
  var http_request = function request(options) {
1913
+ console.log(options, 'options');
1911
1914
  var fn = void 0;
1912
1915
  switch (options.type) {
1913
1916
  case 'post':
@@ -1744,18 +1744,19 @@ var axios_ajax = function ajax(url) {
1744
1744
  withCredentials: false
1745
1745
  });
1746
1746
  http.interceptors.request.use(function (config) {
1747
- if (type === 'post' && format) {
1748
- config.data = external_qs_default.a.stringify(params);
1749
- if (!config.headers['content-type'] && !headers['Content-Type']) {
1750
- config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
1751
- }
1752
- } else {
1753
- if (!config.headers['content-type'] && !headers['Content-Type']) {
1754
- config.headers['content-type'] = 'application/json;charset=UTF-8';
1747
+ if ((params.params || params) instanceof FormData === false) {
1748
+ if (type === 'post' && !format) {
1749
+ config.params = external_qs_default.a.stringify(params.params || params);
1750
+ if (!config.headers['content-type'] && !headers['Content-Type']) {
1751
+ config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
1752
+ }
1753
+ } else {
1754
+ if (!config.headers['content-type'] && !headers['Content-Type']) {
1755
+ config.headers['content-type'] = 'application/json;charset=UTF-8';
1756
+ }
1757
+ config.params = params.params || params;
1755
1758
  }
1756
- config.data = params;
1757
1759
  }
1758
-
1759
1760
  if (util["a" /* default */].getStorage('token')) {
1760
1761
  config.headers.Authorization = util["a" /* default */].getStorage('token');
1761
1762
  }
@@ -1900,6 +1901,7 @@ var base = {
1900
1901
  }, headers, format);
1901
1902
  },
1902
1903
  post: function post(url, params, headers, format) {
1904
+ console.log(params, 'params');
1903
1905
  if (params.params) {
1904
1906
  params.params.userId = params.params.userId || util["a" /* default */].getStorage('userId');
1905
1907
  } else {
@@ -1912,6 +1914,7 @@ var base = {
1912
1914
  // CONCATENATED MODULE: ./src/utils/http.js
1913
1915
 
1914
1916
  var http_request = function request(options) {
1917
+ console.log(options, 'options');
1915
1918
  var fn = void 0;
1916
1919
  switch (options.type) {
1917
1920
  case 'post':
package/lib/selector.js CHANGED
@@ -1740,18 +1740,19 @@ var axios_ajax = function ajax(url) {
1740
1740
  withCredentials: false
1741
1741
  });
1742
1742
  http.interceptors.request.use(function (config) {
1743
- if (type === 'post' && format) {
1744
- config.data = external_qs_default.a.stringify(params);
1745
- if (!config.headers['content-type'] && !headers['Content-Type']) {
1746
- config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
1747
- }
1748
- } else {
1749
- if (!config.headers['content-type'] && !headers['Content-Type']) {
1750
- config.headers['content-type'] = 'application/json;charset=UTF-8';
1743
+ if ((params.params || params) instanceof FormData === false) {
1744
+ if (type === 'post' && !format) {
1745
+ config.params = external_qs_default.a.stringify(params.params || params);
1746
+ if (!config.headers['content-type'] && !headers['Content-Type']) {
1747
+ config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
1748
+ }
1749
+ } else {
1750
+ if (!config.headers['content-type'] && !headers['Content-Type']) {
1751
+ config.headers['content-type'] = 'application/json;charset=UTF-8';
1752
+ }
1753
+ config.params = params.params || params;
1751
1754
  }
1752
- config.data = params;
1753
1755
  }
1754
-
1755
1756
  if (util["a" /* default */].getStorage('token')) {
1756
1757
  config.headers.Authorization = util["a" /* default */].getStorage('token');
1757
1758
  }
@@ -1896,6 +1897,7 @@ var base = {
1896
1897
  }, headers, format);
1897
1898
  },
1898
1899
  post: function post(url, params, headers, format) {
1900
+ console.log(params, 'params');
1899
1901
  if (params.params) {
1900
1902
  params.params.userId = params.params.userId || util["a" /* default */].getStorage('userId');
1901
1903
  } else {
@@ -1908,6 +1910,7 @@ var base = {
1908
1910
  // CONCATENATED MODULE: ./src/utils/http.js
1909
1911
 
1910
1912
  var http_request = function request(options) {
1913
+ console.log(options, 'options');
1911
1914
  var fn = void 0;
1912
1915
  switch (options.type) {
1913
1916
  case 'post':
@@ -1740,18 +1740,19 @@ var axios_ajax = function ajax(url) {
1740
1740
  withCredentials: false
1741
1741
  });
1742
1742
  http.interceptors.request.use(function (config) {
1743
- if (type === 'post' && format) {
1744
- config.data = external_qs_default.a.stringify(params);
1745
- if (!config.headers['content-type'] && !headers['Content-Type']) {
1746
- config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
1747
- }
1748
- } else {
1749
- if (!config.headers['content-type'] && !headers['Content-Type']) {
1750
- config.headers['content-type'] = 'application/json;charset=UTF-8';
1743
+ if ((params.params || params) instanceof FormData === false) {
1744
+ if (type === 'post' && !format) {
1745
+ config.params = external_qs_default.a.stringify(params.params || params);
1746
+ if (!config.headers['content-type'] && !headers['Content-Type']) {
1747
+ config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
1748
+ }
1749
+ } else {
1750
+ if (!config.headers['content-type'] && !headers['Content-Type']) {
1751
+ config.headers['content-type'] = 'application/json;charset=UTF-8';
1752
+ }
1753
+ config.params = params.params || params;
1751
1754
  }
1752
- config.data = params;
1753
1755
  }
1754
-
1755
1756
  if (util["a" /* default */].getStorage('token')) {
1756
1757
  config.headers.Authorization = util["a" /* default */].getStorage('token');
1757
1758
  }
@@ -1896,6 +1897,7 @@ var base = {
1896
1897
  }, headers, format);
1897
1898
  },
1898
1899
  post: function post(url, params, headers, format) {
1900
+ console.log(params, 'params');
1899
1901
  if (params.params) {
1900
1902
  params.params.userId = params.params.userId || util["a" /* default */].getStorage('userId');
1901
1903
  } else {
@@ -1908,6 +1910,7 @@ var base = {
1908
1910
  // CONCATENATED MODULE: ./src/utils/http.js
1909
1911
 
1910
1912
  var http_request = function request(options) {
1913
+ console.log(options, 'options');
1911
1914
  var fn = void 0;
1912
1915
  switch (options.type) {
1913
1916
  case 'post':
package/lib/table.js CHANGED
@@ -1628,18 +1628,19 @@ var axios_ajax = function ajax(url) {
1628
1628
  withCredentials: false
1629
1629
  });
1630
1630
  http.interceptors.request.use(function (config) {
1631
- if (type === 'post' && format) {
1632
- config.data = external_qs_default.a.stringify(params);
1633
- if (!config.headers['content-type'] && !headers['Content-Type']) {
1634
- config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
1635
- }
1636
- } else {
1637
- if (!config.headers['content-type'] && !headers['Content-Type']) {
1638
- config.headers['content-type'] = 'application/json;charset=UTF-8';
1631
+ if ((params.params || params) instanceof FormData === false) {
1632
+ if (type === 'post' && !format) {
1633
+ config.params = external_qs_default.a.stringify(params.params || params);
1634
+ if (!config.headers['content-type'] && !headers['Content-Type']) {
1635
+ config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
1636
+ }
1637
+ } else {
1638
+ if (!config.headers['content-type'] && !headers['Content-Type']) {
1639
+ config.headers['content-type'] = 'application/json;charset=UTF-8';
1640
+ }
1641
+ config.params = params.params || params;
1639
1642
  }
1640
- config.data = params;
1641
1643
  }
1642
-
1643
1644
  if (util["a" /* default */].getStorage('token')) {
1644
1645
  config.headers.Authorization = util["a" /* default */].getStorage('token');
1645
1646
  }
@@ -1784,6 +1785,7 @@ var base = {
1784
1785
  }, headers, format);
1785
1786
  },
1786
1787
  post: function post(url, params, headers, format) {
1788
+ console.log(params, 'params');
1787
1789
  if (params.params) {
1788
1790
  params.params.userId = params.params.userId || util["a" /* default */].getStorage('userId');
1789
1791
  } else {
@@ -1796,6 +1798,7 @@ var base = {
1796
1798
  // CONCATENATED MODULE: ./src/utils/http.js
1797
1799
 
1798
1800
  var http_request = function request(options) {
1801
+ console.log(options, 'options');
1799
1802
  var fn = void 0;
1800
1803
  switch (options.type) {
1801
1804
  case 'post':
@@ -35,18 +35,19 @@ var ajax = function ajax(url) {
35
35
  withCredentials: false
36
36
  });
37
37
  http.interceptors.request.use(function (config) {
38
- if (type === 'post' && format) {
39
- config.data = _qs2.default.stringify(params);
40
- if (!config.headers['content-type'] && !headers['Content-Type']) {
41
- config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
42
- }
43
- } else {
44
- if (!config.headers['content-type'] && !headers['Content-Type']) {
45
- config.headers['content-type'] = 'application/json;charset=UTF-8';
38
+ if ((params.params || params) instanceof FormData === false) {
39
+ if (type === 'post' && !format) {
40
+ config.params = _qs2.default.stringify(params.params || params);
41
+ if (!config.headers['content-type'] && !headers['Content-Type']) {
42
+ config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
43
+ }
44
+ } else {
45
+ if (!config.headers['content-type'] && !headers['Content-Type']) {
46
+ config.headers['content-type'] = 'application/json;charset=UTF-8';
47
+ }
48
+ config.params = params.params || params;
46
49
  }
47
- config.data = params;
48
50
  }
49
-
50
51
  if (_util2.default.getStorage('token')) {
51
52
  config.headers.Authorization = _util2.default.getStorage('token');
52
53
  }
@@ -191,6 +192,7 @@ var base = {
191
192
  }, headers, format);
192
193
  },
193
194
  post: function post(url, params, headers, format) {
195
+ console.log(params, 'params');
194
196
  if (params.params) {
195
197
  params.params.userId = params.params.userId || _util2.default.getStorage('userId');
196
198
  } else {
package/lib/utils/http.js CHANGED
@@ -9,6 +9,7 @@ var _axios2 = _interopRequireDefault(_axios);
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
10
 
11
11
  var request = function request(options) {
12
+ console.log(options, 'options');
12
13
  var fn = void 0;
13
14
  switch (options.type) {
14
15
  case 'post':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-mobiles",
3
- "version": "0.2.20",
3
+ "version": "0.2.22",
4
4
  "description": "eoss内部移动端业务组件",
5
5
  "main": "lib/eoss-mobile.common.js",
6
6
  "files": [
@@ -259,7 +259,7 @@
259
259
  />
260
260
  </div>
261
261
  <!-- 主办 -->
262
- <div class="item" v-if="isMainSubProcess">
262
+ <div class="item" v-if="isMainSubProcess && isNodeShowProcess">
263
263
  <!-- <van-field
264
264
  value="主办"
265
265
  label="主办"
@@ -485,6 +485,7 @@ export default {
485
485
  isOtherUnit: true, //是否是外单位
486
486
  isShowNode: false,
487
487
  subProcessInfo: '',
488
+ isNodeShowProcess: false, //是否展示主办
488
489
  isHiddenOftenOpinion: undefined, //是否隐藏常用意见
489
490
  isAddSignList: [{ name: '是', value: '1' }, { name: '否', value: '2' }],
490
491
  form: {
@@ -632,7 +633,7 @@ export default {
632
633
  },
633
634
  computed: {
634
635
  subProcessColumns() {
635
- if (!this.isMainSubProcess) return [];
636
+ if (!this.isMainSubProcess || !this.isNodeShowProcess) return [];
636
637
  let data = [];
637
638
  let obj = { name: '[部门员工]-' };
638
639
  this.nextCurrentOrgObjSelect.map(x => {
@@ -724,7 +725,8 @@ export default {
724
725
  Accept: 'application/json,text/plain'
725
726
  },
726
727
  type: 'post',
727
- params: formData
728
+ params: formData,
729
+ format:false
728
730
  })
729
731
  .then(res => {
730
732
  const { status, message } = res;
@@ -892,7 +894,9 @@ export default {
892
894
  ? taskHandleHtmlImg
893
895
  : taskHandleHtml,
894
896
  type: 'post',
895
- params: formData
897
+ params: formData,
898
+ format:false
899
+
896
900
  }).then(res => {
897
901
  this.$toast.clear();
898
902
  if (res.status == 'success') {
@@ -945,6 +949,7 @@ export default {
945
949
  this.isNextUser = false;
946
950
  this.isShowNode = false;
947
951
  this.isMainSubProcess = false;
952
+ this.isNodeShowProcess = false;
948
953
  this.form.nextNodeId = '';
949
954
  this.form.isReturnSubmitter = 0;
950
955
  this.form.isUndertakeReply = 0;
@@ -1406,6 +1411,9 @@ export default {
1406
1411
  this.countersignaturetypeText = res.data.countersignaturetypeText;
1407
1412
  //如果当前为承办节点/会签节点,则展示本单位外单位办理人选择
1408
1413
  if (this.nodeType === 1 || this.nodeType === 2) {
1414
+ this.isMainSubProcess === true
1415
+ ? (this.isNodeShowProcess = true)
1416
+ : (this.isNodeShowProcess = false);
1409
1417
  this.isMainSubProcess === true
1410
1418
  ? (this.isMainSubProcess = true)
1411
1419
  : (this.isMainSubProcess = false);
@@ -1418,6 +1426,7 @@ export default {
1418
1426
  this.isHideCurrentOrg = false;
1419
1427
  this.isHideOtherOrg = false;
1420
1428
  this.isMainSubProcess = false;
1429
+ this.isNodeShowProcess = false
1421
1430
  this.isNextUser = true;
1422
1431
  // this.isMainSubProcess === true
1423
1432
  // ? (this.isMainSubProcess = true)
@@ -53,13 +53,13 @@ export default {
53
53
  pendingId: String,
54
54
  beforeSubmit: Function,
55
55
  baseUrl: String,
56
- esign: {
56
+ esign: {
57
57
  type: Boolean,
58
58
  default: false
59
59
  },
60
- userId:{
61
- type:String,
62
- default:''
60
+ userId: {
61
+ type: String,
62
+ default: ''
63
63
  }
64
64
  },
65
65
  data() {
@@ -71,9 +71,9 @@ export default {
71
71
  notificationMsg: undefined, //系统消息
72
72
  nextNodeId: undefined,
73
73
  loginType: 2, //登录方式
74
- isImageOpinion:0,
74
+ isImageOpinion: 0
75
75
  },
76
- file:'',
76
+ file: '',
77
77
  processObj: {
78
78
  taskExamine: { nodeName: undefined },
79
79
  nodeInfoMap: { nextUserList: [] }
@@ -114,7 +114,14 @@ export default {
114
114
  },
115
115
  // 提交流程
116
116
  onSubmit() {
117
- if ((!this.form.opinion && this.isBanInputOpinion == 0 && this.form.isImageOpinion == 0)|| (!this.file && this.isBanInputOpinion == 0 && this.form.isImageOpinion == 1)) {
117
+ if (
118
+ (!this.form.opinion &&
119
+ this.isBanInputOpinion == 0 &&
120
+ this.form.isImageOpinion == 0) ||
121
+ (!this.file &&
122
+ this.isBanInputOpinion == 0 &&
123
+ this.form.isImageOpinion == 1)
124
+ ) {
118
125
  this.$toast('请输入审批意见');
119
126
  return;
120
127
  }
@@ -134,7 +141,7 @@ export default {
134
141
  formData.append('file', this.file);
135
142
  }
136
143
  formData.append('pendingId', this.pendingId);
137
- this.form.userId = this.userId
144
+ this.form.userId = this.userId;
138
145
  for (let key in this.form) {
139
146
  if (this.form[key] !== '' && this.form[key] !== undefined) {
140
147
  formData.append(key, this.form[key]);
@@ -151,7 +158,8 @@ export default {
151
158
  request({
152
159
  url: _that.baseUrl ? _that.baseUrl + taskRejectHtml : taskRejectHtml,
153
160
  type: 'post',
154
- params: formData
161
+ params: formData,
162
+ format:false
155
163
  }).then(res => {
156
164
  if (res.status == 'success') {
157
165
  this.$toast('操作成功');
@@ -309,7 +309,8 @@ export default {
309
309
  request({
310
310
  url: _that.apiBaseUrl ? _that.apiBaseUrl + registerNew : registerNew,
311
311
  type: 'post',
312
- params: formData
312
+ params: formData,
313
+ format:false
313
314
  }).then(res => {
314
315
  this.$toast.clear();
315
316
  if (res.rCode == 0) {
@@ -484,7 +484,9 @@ export default {
484
484
  : taskUnionExamine,
485
485
  params: formData,
486
486
  headers: { Accept: 'application/json,text/plain' },
487
- type: 'post'
487
+ type: 'post',
488
+ format:false
489
+
488
490
  };
489
491
  this.$toast.loading({
490
492
  message: '加载中...',
package/src/index.js CHANGED
@@ -101,7 +101,7 @@ if (typeof window !== 'undefined' && window.Vue) {
101
101
  }
102
102
 
103
103
  export default {
104
- version: '0.2.20',
104
+ version: '0.2.22',
105
105
  install,
106
106
  Button,
107
107
  ButtonGroup,
@@ -15,19 +15,20 @@ const ajax = (url, params = {}, headers = {}, format = true, type = 'get') => {
15
15
  });
16
16
  http.interceptors.request.use(
17
17
  config => {
18
- if (type === 'post' && format) {
19
- config.data = qs.stringify(params);
20
- if (!config.headers['content-type'] && !headers['Content-Type']) {
21
- config.headers['content-type'] =
22
- 'application/x-www-form-urlencoded;charset=UTF-8';
23
- }
24
- } else {
25
- if (!config.headers['content-type'] && !headers['Content-Type']) {
26
- config.headers['content-type'] = 'application/json;charset=UTF-8';
18
+ if ((params.params || params) instanceof FormData === false) {
19
+ if (type === 'post' && !format) {
20
+ config.params = qs.stringify(params.params || params);
21
+ if (!config.headers['content-type'] && !headers['Content-Type']) {
22
+ config.headers['content-type'] =
23
+ 'application/x-www-form-urlencoded;charset=UTF-8';
24
+ }
25
+ } else {
26
+ if (!config.headers['content-type'] && !headers['Content-Type']) {
27
+ config.headers['content-type'] = 'application/json;charset=UTF-8';
28
+ }
29
+ config.params = params.params || params;
27
30
  }
28
- config.data = params;
29
31
  }
30
-
31
32
  if ($.getStorage('token')) {
32
33
  config.headers.Authorization = $.getStorage('token');
33
34
  }
@@ -188,6 +189,7 @@ const base = {
188
189
  );
189
190
  },
190
191
  post: (url, params, headers, format) => {
192
+ console.log(params, 'params');
191
193
  if (params.params) {
192
194
  params.params.userId = params.params.userId || $.getStorage('userId');
193
195
  } else {
package/src/utils/http.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import base from './axios';
2
2
  const request = options => {
3
+ console.log(options, 'options');
3
4
  let fn;
4
5
  switch (options.type) {
5
6
  case 'post':
@@ -19,13 +20,13 @@ const request = options => {
19
20
  );
20
21
  break;
21
22
  case 'get':
22
- fn = base.get(options.url, options.params, options.headers = {});
23
+ fn = base.get(options.url, options.params, (options.headers = {}));
23
24
  break;
24
25
  case 'GET':
25
- fn = base.get(options.url, options.params, options.headers = {});
26
+ fn = base.get(options.url, options.params, (options.headers = {}));
26
27
  break;
27
28
  default:
28
- fn = base.get(options.url, options.params, options.headers = {});
29
+ fn = base.get(options.url, options.params, (options.headers = {}));
29
30
  }
30
31
  return fn;
31
32
  };