init
Showing
1 changed file
with
7 additions
and
4 deletions
| ... | @@ -68,13 +68,16 @@ | ... | @@ -68,13 +68,16 @@ |
| 68 | dataType:'json', | 68 | dataType:'json', |
| 69 | contentType: "application/json; charset=UTF-8", | 69 | contentType: "application/json; charset=UTF-8", |
| 70 | success:function(data){ | 70 | success:function(data){ |
| 71 | alert('success'); | 71 | if(data.msg){ |
| 72 | alert(data.msg); | ||
| 73 | } else if(data.code != 0){ | ||
| 74 | alert('请求失败'); | ||
| 75 | } else { | ||
| 76 | alert('请求成功'); | ||
| 77 | } | ||
| 72 | }, | 78 | }, |
| 73 | error:function(){ | 79 | error:function(){ |
| 74 | alert("请求失败") | 80 | alert("请求失败") |
| 75 | }, | ||
| 76 | complete:function () { | ||
| 77 | alert('complete') | ||
| 78 | } | 81 | } |
| 79 | }) | 82 | }) |
| 80 | 83 | ... | ... |
-
Please register or sign in to post a comment