浏览代码

超时提醒

zhuf 1 年之前
父节点
当前提交
d28206343e
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/pages/caiji/rx/name.vue

+ 6 - 0
src/pages/caiji/rx/name.vue

@@ -79,6 +79,12 @@ function afterRead(file: any) {
       file.status = 'failed';
       file.message = '上传失败';
     }
+  }).catch((error: any) => {
+    if (error.code === 'ECONNABORTED') {
+      showFailToast('请求超时,请检查网络连接并重试')
+    }
+    file.status = 'failed';
+    file.message = '上传超时';
   })
 }