Modify the original value jq weui cityPicker.js

1. Background docking interface to get the return value, pay attention to the same data format

var raw;
.ajax $ ({ 
type: "the GET",
URL: "/web/region/list.json",
dataType: "JSON",
contentType: 'file application / JSON; charset = UTF-. 8',
Success: function (Data) {
var ResData = data.data;
RAW ResData =
}
})

2. only if such a change may not find the error messages function "map", because now is ajax asynchronous request, so to add
the async: false 
3. If you still can not find fault report function "map", probably because I only do two cascade, so c.sub not find it here to add a judge:
if(c.sub) {
c.sub.map(function (t) {
if (t.name === tokens[2]) d = t;
})
}

Guess you like

Origin www.cnblogs.com/GGDong/p/10994294.html