var data = {
"level": 1,
"name": dname,
"brandCode": dcode,
"mcid": dcid
}
//以下url中携带的参数为固定的
$.ajax({
url: mycarhttp + "/api/cars/models?open_id=test&token=1ae954cfb7b05eb7f885524d6ef4a2c4",
type: "get",
data: data,
dataType: "json",
success: function(data) {
...
}
})
//以下url正常情况
$.ajax({
url: mycarhttp + "/api/cars/models",
type: "get",
data: data,
dataType: "json",
success: function(data) {
...
}
})
//get请求携带参数
$.get(myhttp+'/intelligentDirectory/fitProductMatchJfcode.do?auto_type='+SI+'&auto_key=' + txt + "&type_id=" + type,function(data){
console.log(data);
}
//post请求携带参数
$.post('{:U("api/goods/category_sales")}', {
'st': startime,
'et': endtime,
'group_id': sh,
}, function (data) {
console.log(data);
})
|