正在显示
1 个修改的文件
包含
14 行增加
和
2 行删除
| ... | ... | @@ -142,13 +142,25 @@ Page({ |
| 142 | 142 | method: "POST", |
| 143 | 143 | success: function(res) { |
| 144 | 144 | if (res && res.data) { |
| 145 | - console.log("res", res) | |
| 146 | - if (res && res.statusCode == 200) { | |
| 145 | + console.log("succ", res) | |
| 146 | + if (res.statusCode == 200) { | |
| 147 | 147 | wx.navigateBack({ |
| 148 | 148 | delta: 1 |
| 149 | 149 | }) |
| 150 | + }else{ | |
| 151 | + wx.showToast({ | |
| 152 | + title: res.data.message, | |
| 153 | + icon:"none" | |
| 154 | + }) | |
| 150 | 155 | } |
| 151 | 156 | } |
| 157 | + }, | |
| 158 | + fail:function(res){ | |
| 159 | + console.log("fail", res) | |
| 160 | + wx.showToast({ | |
| 161 | + title: res.data.message, | |
| 162 | + icon: 'none' | |
| 163 | + }) | |
| 152 | 164 | } |
| 153 | 165 | }) |
| 154 | 166 | }, | ... | ... |
请
注册
或
登录
后发表评论