提交 fd31c18d 编写于 作者: zhentian.jia's avatar zhentian.jia

status 和 gif问题

上级 3729a532
......@@ -79,7 +79,7 @@
>
<!-- <i v-else class="el-icon-plus avatar-uploader-icon"></i> -->
<div class="limit-text">
<p>尺寸:48*48</p>
<p>尺寸:115*86</p>
<p>限制大小: 500Kb</p>
<p>支持.jpg,.png格式</p>
</div>
......@@ -119,7 +119,7 @@
>
<!-- <i v-else class="el-icon-plus avatar-uploader-icon"></i> -->
<div v-show="formData.type == 1" class="limit-text">
<p>尺寸:750*420</p>
<p>尺寸:375*210</p>
<p>限制大小: 2.0 Mb</p>
<p>支持.jpg,.png格式</p>
</div>
......@@ -773,6 +773,7 @@ export default {
if (option == "edit") {
//编辑
projectModel.id = this.formData.id;
projectModel.projectStatus = this.projectStatus;
for (let i = 0; i < attachmentModel.length; i++) {
attachmentModel[i].portalProjectId = this.formData.id;
}
......@@ -1064,10 +1065,10 @@ export default {
//上传列表图片
beforeUploadListPic(file) {
let fileLimit = {
width: 48,
height: 48,
width: 115,
height: 86,
size: 0.5,
sizeText: "500Kb",
sizeText: "500K",
key: "attachmentUrl1"
};
this.beforeAvatarUpload(file, fileLimit);
......@@ -1075,10 +1076,10 @@ export default {
//上传封面图片
beforeUploadCoverPic(file) {
let fileLimit = {
width: 750,
height: 420,
width: 375,
height: 210,
size: 2,
sizeText: "2.0Mb",
sizeText: "2.0M",
key: "attachmentUrl2"
};
if (this.formData.type == 1) {
......@@ -1125,6 +1126,7 @@ export default {
const isLt = file.size / 1024 / 1024 < 500;
if (!isLt) {
this.$message.error("上传视频大小不能超过500M !");
return;
}
if (!isMP4) {
this.$message.error("请上传MP4格式文件!");
......@@ -1152,11 +1154,13 @@ export default {
const isLt2M = file.size / 1024 / 1024 < fileLimit.size;
if (!isJPG && !isPNG) {
this.$message.error("上传头像图片只能是 JPG 格式!");
return;
}
if (!isLt2M) {
this.$message.error(
"上传头像图片大小不能超过 " + fileLimit.sizeText + "!"
);
return;
}
let _img = new FileReader();
_img.readAsDataURL(file);
......
......@@ -318,6 +318,8 @@ export default {
vm.POST("portalInfo/changeStatus", req).then(res => {
if (res.code == "000000") {
console.log(res);
vm.$message.info(res.message);
this.getProjectList();
}
});
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册