eoss-mobiles 0.2.21 → 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.params = external_qs_default.a.stringify(params.params || 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.params = params.params || params;
1753
1755
  }
1754
-
1755
1756
  if (util["a" /* default */].getStorage('token')) {
1756
1757
  config.headers.Authorization = util["a" /* default */].getStorage('token');
1757
1758
  }
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.params = external_qs_default.a.stringify(params.params || 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.params = params.params || params;
1753
1755
  }
1754
-
1755
1756
  if (util["a" /* default */].getStorage('token')) {
1756
1757
  config.headers.Authorization = util["a" /* default */].getStorage('token');
1757
1758
  }
@@ -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.params = external_qs_default.a.stringify(params.params || 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.params = params.params || params;
1757
1759
  }
1758
-
1759
1760
  if (util["a" /* default */].getStorage('token')) {
1760
1761
  config.headers.Authorization = util["a" /* default */].getStorage('token');
1761
1762
  }
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.params = external_qs_default.a.stringify(params.params || 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.params = params.params || params;
1753
1755
  }
1754
-
1755
1756
  if (util["a" /* default */].getStorage('token')) {
1756
1757
  config.headers.Authorization = util["a" /* default */].getStorage('token');
1757
1758
  }
@@ -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.params = external_qs_default.a.stringify(params.params || 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.params = params.params || params;
1753
1755
  }
1754
-
1755
1756
  if (util["a" /* default */].getStorage('token')) {
1756
1757
  config.headers.Authorization = util["a" /* default */].getStorage('token');
1757
1758
  }
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.params = external_qs_default.a.stringify(params.params || 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.params = params.params || params;
1641
1643
  }
1642
-
1643
1644
  if (util["a" /* default */].getStorage('token')) {
1644
1645
  config.headers.Authorization = util["a" /* default */].getStorage('token');
1645
1646
  }
@@ -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.params = _qs2.default.stringify(params.params || 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.params = params.params || params;
48
50
  }
49
-
50
51
  if (_util2.default.getStorage('token')) {
51
52
  config.headers.Authorization = _util2.default.getStorage('token');
52
53
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-mobiles",
3
- "version": "0.2.21",
3
+ "version": "0.2.22",
4
4
  "description": "eoss内部移动端业务组件",
5
5
  "main": "lib/eoss-mobile.common.js",
6
6
  "files": [
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.21',
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.params = qs.stringify(params.params || 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.params = params.params || params;
29
31
  }
30
-
31
32
  if ($.getStorage('token')) {
32
33
  config.headers.Authorization = $.getStorage('token');
33
34
  }