修复中搜索不到小区提交信息bug

This commit is contained in:
尹吉欢
2018-06-01 11:38:54 +08:00
parent bbbf79f4ac
commit 48c519e506
+17 -3
View File
@@ -2264,13 +2264,27 @@ $(document).on('click','#notFound_btn', function () {
var b = $("#input_address_noFound").val();
var c = $("#input_city").text();
$.ajax({
axios.post("/rest/districts/addNoFoundDistrict", {city:c,name:a, address:b}).then(function (response) {
$('.modal').remove();
$('.modal-overlay').remove();
if(response.data.status){
$.toast('提交成功,我们会尽快完善信息');
}else{
$.toast('提交失败,请重试');
}
}).catch(function (error) {
console.log(error);
$('.modal').remove();
$('.modal-overlay').remove();
$.toast('提交失败,请重试');
});
/*$.ajax({
type : 'post',
url :BASE_PATH + "/rest/districts/addNoFoundDistrict",
data:{city:c,name:a, address:b},
dataType:'json',
success:function(result){
alert(result.);
$('.modal').remove();
$('.modal-overlay').remove();
if(result.data){
@@ -2284,7 +2298,7 @@ $(document).on('click','#notFound_btn', function () {
$('.modal-overlay').remove();
$.toast('提交失败,请重试');
}
})
})*/
}
}
]