Commit f0d4e91e by 冷斌

fix bug

parent 8db2fd45
...@@ -164,17 +164,23 @@ ...@@ -164,17 +164,23 @@
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 (_this.uploadName === 'front_view') { if (str.ret == 0) {
_this.form.front_view = str.data.url; layer.close(loadingIndex);
let msg = str.msg ? str.msg : '上传失败';
layer.msg(msg);
} else {
if (_this.uploadName === 'front_view') {
_this.form.front_view = str.data.url;
}
if (_this.uploadName === 'back_view') {
_this.form.back_view = str.data.url;
}
if (_this.uploadName === 'handset_view') {
_this.form.handset_view = str.data.url;
}
_this.checkSubmit();
layer.close(loadingIndex);
} }
if (_this.uploadName === 'back_view') {
_this.form.back_view = str.data.url;
}
if (_this.uploadName === 'handset_view') {
_this.form.handset_view = str.data.url;
}
_this.checkSubmit();
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