mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-22 17:26:46 +08:00
fix:证书上传修改
This commit is contained in:
@@ -462,20 +462,6 @@ export default {
|
|||||||
function CreateCertificate() {
|
function CreateCertificate() {
|
||||||
state.CCertificate = true;
|
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 beforeUpload = (file) => {
|
||||||
const isJpgOrPng =
|
const isJpgOrPng =
|
||||||
@@ -501,19 +487,14 @@ export default {
|
|||||||
fileUp(formDatas).then((res) => {
|
fileUp(formDatas).then((res) => {
|
||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
console.log(file)
|
console.log(file)
|
||||||
state.imageUrl = process.env.VUE_APP_FILE_PATH + res.data.data;
|
state.imageUrl = process.env.VUE_APP_FILE_PATH + res.data.data;
|
||||||
state.imageName = process.env.VUE_APP_FILE_PATH + file.name;
|
state.imageName = process.env.VUE_APP_FILE_PATH + res.data.data;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
// function beforeUpload(file) {
|
|
||||||
// if (!state.fileType.includes(file.name.split(".").slice(-1).join(""))) {
|
|
||||||
// message.error("不支持该格式");
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
//查看证书
|
//查看证书
|
||||||
const getcertificate = () => {
|
const getcertificate = () => {
|
||||||
@@ -528,7 +509,7 @@ export default {
|
|||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
let info = res.data.data;
|
let info = res.data.data;
|
||||||
state.certificateName = info.name; //证书名称
|
state.certificateName = info.name; //证书名称
|
||||||
state.imageUrl = process.env.VUE_APP_FILE_PATH + info.url; //证书封面
|
state.imageUrl = info.url; //证书封面
|
||||||
state.certificateRemark = info.remark; //证书说明
|
state.certificateRemark = info.remark; //证书说明
|
||||||
state.condition = info.finishType; //选择条件
|
state.condition = info.finishType; //选择条件
|
||||||
state.large = info.finishType == 1 ? info.finishValue : null; //选择项目里的全部任务或必修任务
|
state.large = info.finishType == 1 ? info.finishValue : null; //选择项目里的全部任务或必修任务
|
||||||
@@ -634,7 +615,6 @@ export default {
|
|||||||
closeDrawer,
|
closeDrawer,
|
||||||
selectCondition,
|
selectCondition,
|
||||||
selectlarge,
|
selectlarge,
|
||||||
handleChange,
|
|
||||||
beforeUpload,
|
beforeUpload,
|
||||||
CreateCertificate,
|
CreateCertificate,
|
||||||
saveupdatecertificate,
|
saveupdatecertificate,
|
||||||
|
|||||||
Reference in New Issue
Block a user