eoss-mobiles 0.2.21 → 0.2.23

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.23",
4
4
  "description": "eoss内部移动端业务组件",
5
5
  "main": "lib/eoss-mobile.common.js",
6
6
  "files": [
@@ -437,6 +437,7 @@ import Opinion from './Opinion.vue';
437
437
  import Reject from './Reject.vue';
438
438
  import Message from './Message.vue';
439
439
  import FlowMix from '../flowMix';
440
+ import $ from '../../../../src/utils/util'
440
441
  export default {
441
442
  name: 'Handle',
442
443
  inheritAttrs: false,
@@ -701,7 +702,7 @@ export default {
701
702
  pendingId,
702
703
  opinion: this.form.opinion,
703
704
  taskAction: 'complete',
704
- userId: this.userId
705
+ userId: this.userId || $.getStorage('userId')
705
706
  };
706
707
  let formData = new FormData();
707
708
  if (this.form.isImageOpinion == 1) {
@@ -869,7 +870,7 @@ export default {
869
870
  _that.form.processDefinitionId = taskExamineInfo.processDefinitionId;
870
871
  _that.form.isSubFlow = taskExamineInfo.isSubFlow;
871
872
  _that.form.nodeId = taskExamineInfo.nodeId;
872
- _that.form.userId = _that.userId;
873
+ _that.form.userId = _that.userId || $.getStorage('userId');
873
874
  _that.form.nextNodeId =
874
875
  _that.form.nextOperate == 0 || _that.form.nextOperate == 1
875
876
  ? _that.form.nextNodeId || nodeInfoMapInfo.nodeExtAttr.defaultNextNode
@@ -45,6 +45,7 @@ import { taskRejectHtml, toTaskRejectHtml } from '../../../../src/config/api';
45
45
  import request from '../../../../src/utils/http.js';
46
46
  import Opinion from './Opinion.vue';
47
47
  import Message from './Message.vue';
48
+ import $ from '../../../../src/utils/util'
48
49
  export default {
49
50
  name: 'Reject',
50
51
  props: {
@@ -141,7 +142,7 @@ export default {
141
142
  formData.append('file', this.file);
142
143
  }
143
144
  formData.append('pendingId', this.pendingId);
144
- this.form.userId = this.userId;
145
+ this.form.userId = this.userId || $.getStorage('userId');
145
146
  for (let key in this.form) {
146
147
  if (this.form[key] !== '' && this.form[key] !== undefined) {
147
148
  formData.append(key, this.form[key]);
@@ -116,6 +116,7 @@ import request from '../../../../src/utils/http.js';
116
116
  import Opinion from './Opinion.vue';
117
117
  import Message from './Message.vue';
118
118
  import { Dialog } from 'eoss-mobile-vant';
119
+ import $ from '../../../../src/utils/util'
119
120
  export default {
120
121
  name: 'StartFlow',
121
122
  inheritAttrs: false,
@@ -282,7 +283,7 @@ export default {
282
283
  notificationMsg: this.form.notificationMsg,
283
284
  loginType: 2, //登录方式
284
285
  isImageOpinion:this.form.isImageOpinion,
285
- userId: this.userId
286
+ userId: this.userId || $.getStorage('userId')
286
287
  };
287
288
  if (this.beforeSubmit) {
288
289
  this.beforeSubmit(info);
@@ -292,7 +293,6 @@ export default {
292
293
  if (this.form.isImageOpinion == 1) {
293
294
  formData.append('file', this.file);
294
295
  }
295
- formData.append('pendingId', this.pendingId);
296
296
  for (let key in info) {
297
297
  if (info[key] !== '' && info[key] !== undefined) {
298
298
  formData.append(key, info[key]);
@@ -99,6 +99,7 @@ import {
99
99
  import request from '../../../../src/utils/http.js';
100
100
  import Opinion from './Opinion.vue';
101
101
  import Message from './Message.vue';
102
+ import $ from '../../../../src/utils/util'
102
103
  export default {
103
104
  name: 'TaskUnionExamine',
104
105
  props: {
@@ -457,7 +458,7 @@ export default {
457
458
  choiceDeptId,
458
459
  isSubFlow,
459
460
  choiceOrgId,
460
- userId: this.userId
461
+ userId: this.userId || $.getStorage('userId')
461
462
  }
462
463
  let formData = new FormData();
463
464
  if (isImageOpinion == 1) {
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.23',
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
  }