From 035b348d5d9c3dfe7743bbdd2ca06dcafba2d6a9 Mon Sep 17 00:00:00 2001 From: wyx Date: Fri, 24 Feb 2023 19:10:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=AF=81=E4=B9=A6=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../drawers/project/AddCertificate.vue | 28 +++---------------- 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/src/components/drawers/project/AddCertificate.vue b/src/components/drawers/project/AddCertificate.vue index 3b0c8f27..317a3088 100644 --- a/src/components/drawers/project/AddCertificate.vue +++ b/src/components/drawers/project/AddCertificate.vue @@ -462,20 +462,6 @@ export default { function CreateCertificate() { state.CCertificate = true; } - //上传封面 - const handleChange = (info) => { - if (info.file.status === "uploading") { - return; - } - if (info.file.status === "done") { - console.log("上传图片返回的信息 %o", info.file.name); - state.imageUrl = process.env.VUE_APP_FILE_PATH + info.file.name; - state.imageName = process.env.VUE_APP_FILE_PATH + info.file.name; - } - if (info.file.status === "error") { - message.error("upload error"); - } - }; const beforeUpload = (file) => { const isJpgOrPng = @@ -501,19 +487,14 @@ export default { fileUp(formDatas).then((res) => { if (res.data.code === 200) { console.log(file) - state.imageUrl = process.env.VUE_APP_FILE_PATH + res.data.data; - state.imageName = process.env.VUE_APP_FILE_PATH + file.name; + state.imageUrl = process.env.VUE_APP_FILE_PATH + res.data.data; + state.imageName = process.env.VUE_APP_FILE_PATH + res.data.data; } }); return false; }; - // function beforeUpload(file) { - // if (!state.fileType.includes(file.name.split(".").slice(-1).join(""))) { - // message.error("不支持该格式"); - // return false; - // } - // } + //查看证书 const getcertificate = () => { @@ -528,7 +509,7 @@ export default { if (res.data.code === 200) { let info = res.data.data; state.certificateName = info.name; //证书名称 - state.imageUrl = process.env.VUE_APP_FILE_PATH + info.url; //证书封面 + state.imageUrl = info.url; //证书封面 state.certificateRemark = info.remark; //证书说明 state.condition = info.finishType; //选择条件 state.large = info.finishType == 1 ? info.finishValue : null; //选择项目里的全部任务或必修任务 @@ -634,7 +615,6 @@ export default { closeDrawer, selectCondition, selectlarge, - handleChange, beforeUpload, CreateCertificate, saveupdatecertificate,