Skip to content

Commit

Permalink
修改成功判断
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonxu committed Jun 6, 2018
1 parent bfcd791 commit e76d06a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion demo/demo-no-sdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ var uploadFile = function () {
},
success: function (res) {
var Location = prefix + Key;
wx.showModal({title: '上传成功', content: Location, showCancel: false});
if (res.statusCode === 200) {
wx.showModal({title: '上传成功', content: Location, showCancel: false});
} else {
wx.showModal({title: '上传失败', content: JSON.stringify(res), showCancel: false});
}
},
fail: function (res) {
wx.showModal({title: '上传失败', content: JSON.stringify(res), showCancel: false});
Expand Down

0 comments on commit e76d06a

Please sign in to comment.