ucservice 1.3.0 → 1.3.1

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,7 +1,7 @@
1
1
  {
2
2
  "name": "ucservice",
3
3
  "private": false,
4
- "version": "1.3.0",
4
+ "version": "1.3.1",
5
5
  "description": "统一通信服务",
6
6
  "main": "dist/ucservice.common.js",
7
7
  "style": "ucservice.css",
@@ -12,7 +12,7 @@ let $ = require('jquery');
12
12
  */
13
13
  export const loadJson = function(url, param, backSuccfn, async, method, headers) {
14
14
  method = (method? method:'POST');
15
- async = (async == undefined? true:async);
15
+ async = ((async == undefined || async == '')? true:async);
16
16
  for(let key in param){ //检测手机号码, 外地号码头部(非杭州)加00,本地号码加0
17
17
  if(/_phone01$/.test(key)){
18
18
  let tel = key.replace(/_phone01$/, "");
@@ -25,11 +25,13 @@ export const loadJson = function(url, param, backSuccfn, async, method, headers)
25
25
  }
26
26
  }
27
27
  let ajaxContent = {
28
- 'method': method,
28
+ 'type': method,
29
29
  'url': url,
30
30
  'data': param,
31
31
  'async' : async
32
32
  }
33
+ console.log("====ajax参数====");
34
+ console.log(ajaxContent);
33
35
  if(headers) Object.assign(ajaxContent, headers);
34
36
  $.ajax(ajaxContent).fail(function(jqXHR,sts){
35
37
  console.error('加载数据失败:' + sts + ", " + url);