|
@@ -324,10 +324,20 @@ export default {
|
|
}
|
|
}
|
|
myFormData.append("file", captureBlob);
|
|
myFormData.append("file", captureBlob);
|
|
|
|
|
|
- await fetch(res.data.formUrl, {
|
|
|
|
- method: "POST",
|
|
|
|
- body: myFormData,
|
|
|
|
- });
|
|
|
|
|
|
+ try {
|
|
|
|
+ await fetch(res.data.formUrl, {
|
|
|
|
+ method: "POST",
|
|
|
|
+ body: myFormData,
|
|
|
|
+ });
|
|
|
|
+ } catch (error) {
|
|
|
|
+ window._hmt.push([
|
|
|
|
+ "_trackEvent",
|
|
|
|
+ "摄像头框",
|
|
|
|
+ "抓拍照片保存失败--upyun",
|
|
|
|
+ error.name + ": " + error.message,
|
|
|
|
+ ]);
|
|
|
|
+ throw error;
|
|
|
|
+ }
|
|
|
|
|
|
// console.log(response);
|
|
// console.log(response);
|
|
resultUrl = res.data.accessUrl;
|
|
resultUrl = res.data.accessUrl;
|