|
@@ -172,27 +172,32 @@ export default {
|
|
|
} else {
|
|
} else {
|
|
|
this.toastLoading(0, '上传中...', true);
|
|
this.toastLoading(0, '上传中...', true);
|
|
|
}
|
|
}
|
|
|
- uploadImagev(form).then((res) => {
|
|
|
|
|
- this.toastLoading().clear();
|
|
|
|
|
- if (res.code == -1) {
|
|
|
|
|
- // 图匠图片校验接口超时
|
|
|
|
|
- this.requestTimeOut(res);
|
|
|
|
|
- } else if (res.code == 200) {
|
|
|
|
|
- // 图匠校验结果返回
|
|
|
|
|
- if (this.photoIdentifyType) {
|
|
|
|
|
- // 重置loaidng状态
|
|
|
|
|
- this.resetProgress();
|
|
|
|
|
- this.imageAIVerifyFlag = true;
|
|
|
|
|
- console.log('res.data=' + JSON.stringify(res.data));
|
|
|
|
|
- this.imageAIVerifyData = res.data;
|
|
|
|
|
|
|
+ uploadImagev(form)
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ this.toastLoading().clear();
|
|
|
|
|
+ if (res.code == -1) {
|
|
|
|
|
+ // 图匠图片校验接口超时
|
|
|
|
|
+ this.requestTimeOut(res);
|
|
|
|
|
+ } else if (res.code == 200) {
|
|
|
|
|
+ // 图匠校验结果返回
|
|
|
|
|
+ if (this.photoIdentifyType) {
|
|
|
|
|
+ // 重置loaidng状态
|
|
|
|
|
+ this.resetProgress();
|
|
|
|
|
+ this.imageAIVerifyFlag = true;
|
|
|
|
|
+ console.log('res.data=' + JSON.stringify(res.data));
|
|
|
|
|
+ this.imageAIVerifyData = res.data;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 正常流程
|
|
|
|
|
+ this.normalFlow(res);
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
- // 正常流程
|
|
|
|
|
- this.normalFlow(res);
|
|
|
|
|
|
|
+ this.resetProgress();
|
|
|
|
|
+ that.$toast('上传失败!');
|
|
|
}
|
|
}
|
|
|
- } else {
|
|
|
|
|
- that.$toast('上传失败!');
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {
|
|
|
|
|
+ this.resetProgress();
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
progress() {
|
|
progress() {
|
|
|
// 后端接口20000ms后失效,每1000m progress加10,到90停止;
|
|
// 后端接口20000ms后失效,每1000m progress加10,到90停止;
|