From f23ee5b9578ff033230d184d1fdc9742a25fbf98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ookk=E5=88=B0=E5=A4=84=E6=B5=81=E6=B5=AA?= Date: Thu, 14 Apr 2022 09:58:01 +0800 Subject: [PATCH] =?UTF-8?q?=E9=92=88=E5=AF=B9=E6=96=87=E4=BB=B6=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E8=BF=94=E5=9B=9E=E7=BB=93=E6=9E=9C=E9=80=82=E9=85=8D?= =?UTF-8?q?=E9=98=BF=E9=87=8C=E4=BA=91OSS=E4=B8=8A=E4=BC=A0=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload-3.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/upload-3.vue b/upload-3.vue index 2f20c30..5c601e0 100644 --- a/upload-3.vue +++ b/upload-3.vue @@ -896,7 +896,9 @@ export default { return; } if (this.status === 200 || this.status === 201 || this.staus ===202 ) { - resolve(JSON.parse(this.responseText)); + //防止阿里云OSS接口返回为空时报错 + let responseText = this.responseText || "{}" + resolve(JSON.parse(responseText)); } else { reject(this.status); }