From b36b15806a0e45777fdc802951a4ddc724b7dc9e Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Tue, 12 Oct 2021 08:46:37 +0800
Subject: [PATCH] 上传附件失败判断
---
src/components/attach/attach.vue | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/components/attach/attach.vue b/src/components/attach/attach.vue
index 360051b..0161bf3 100644
--- a/src/components/attach/attach.vue
+++ b/src/components/attach/attach.vue
@@ -222,6 +222,11 @@
},
uploadAfter(res, done, loading, column) {
window.console.log(res.link);
+ var test = /^http:\/\/.*/;
+ if (!test.test(res.link)) {
+ this.$message.error("上传失败");
+ return;
+ }
this.onceLinks = res.link;
var haveit = null;
for (let k in this.saveIds) {
@@ -342,11 +347,11 @@
params["ptype"] = this.ptype;
getTemplate(params, 1, 50).then((res) => {
data = res.data.data.records;
- console.log(data, "::template");
+ // console.log(data, "::template");
params["userid"] = this.$store.getters.userInfo.Id;
getUseInfor(params).then((res) => {
var userInfo = res.data.data.records;
- console.log(userInfo, "::userInfo");
+ // console.log(userInfo, "::userInfo");
if (userInfo.length == 0) {
for (var k in data) {
data[k]["type"] = 1;
--
Gitblit v1.9.3