diff --git a/fangija-zsyf/yfindex.html b/fangija-zsyf/yfindex.html index e2af8b9..85ade29 100644 --- a/fangija-zsyf/yfindex.html +++ b/fangija-zsyf/yfindex.html @@ -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('提交失败,请重试'); } - }) + })*/ } } ]