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/dist/ucservice.common.js +4 -2
- package/dist/ucservice.common.js.gz +0 -0
- package/dist/ucservice.common.js.map +1 -1
- package/dist/ucservice.umd.js +4 -2
- package/dist/ucservice.umd.js.gz +0 -0
- package/dist/ucservice.umd.js.map +1 -1
- package/dist/ucservice.umd.min.js +1 -1
- package/dist/ucservice.umd.min.js.gz +0 -0
- package/dist/ucservice.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/common-request.js +4 -2
package/package.json
CHANGED
package/src/common-request.js
CHANGED
|
@@ -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
|
-
'
|
|
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);
|