Commit b198b976 by 冷斌

fix bug

parent d0175327
...@@ -164,6 +164,11 @@ ...@@ -164,6 +164,11 @@
success: function (data) { success: function (data) {
data = data.replace(/<[^>]+>/g, ""); data = data.replace(/<[^>]+>/g, "");
var str = JSON.parse(data); var str = JSON.parse(data);
if (str.ret == 0) {
layer.close(loadingIndex);
let msg = str.msg ? str.msg : '上传失败';
layer.msg(msg);
} else {
if (_this.uploadName === 'front_view') { if (_this.uploadName === 'front_view') {
_this.form.front_view = str.data.url; _this.form.front_view = str.data.url;
} }
...@@ -175,6 +180,7 @@ ...@@ -175,6 +180,7 @@
} }
_this.checkSubmit(); _this.checkSubmit();
layer.close(loadingIndex); layer.close(loadingIndex);
}
}, },
error: function (data) { error: function (data) {
layer.msg("上传失败"); layer.msg("上传失败");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment