From 48c519e5062a448fee305b89f9023a73d1f36a63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E5=90=89=E6=AC=A2?= Date: Fri, 1 Jun 2018 11:38:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=AD=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=E5=B0=8F=E5=8C=BA=E6=8F=90=E4=BA=A4=E4=BF=A1?= =?UTF-8?q?=E6=81=AFbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fangija-zsyf/yfindex.html | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) 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('提交失败,请重试'); } - }) + })*/ } } ]