Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
0384afb4
提交
0384afb4
编写于
8月 28, 2020
作者:
chendeli
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
店铺logo上传去掉裁剪
上级
a8eacd7a
变更
2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
50 行增加
和
3 行删除
+50
-3
create-good.vue
src/views/goods/create-good.vue
+1
-1
create-shop.vue
src/views/shop/create-shop.vue
+49
-2
未找到文件。
src/views/goods/create-good.vue
浏览文件 @
0384afb4
...
@@ -987,7 +987,7 @@
...
@@ -987,7 +987,7 @@
}
}
if (!isLt200k) {
if (!isLt200k) {
return vm.$message.error("
图片大小
不符合规范,请根据规范上传图片
");
return vm.$message.error("
图片大小
请控制在
200
kb
以内
");
}
}
let _img = new FileReader();
let _img = new FileReader();
_img.readAsDataURL(file);
_img.readAsDataURL(file);
...
...
src/views/shop/create-shop.vue
浏览文件 @
0384afb4
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
</div>
</div>
<div
class=
"limit-text"
>
<div
class=
"limit-text"
>
<p>
限制大小: 200kb
</p>
<p>
限制大小: 200kb
</p>
<p>
最小
尺寸:128*128
</p>
<p>
建议
尺寸:128*128
</p>
<p>
支持jpeg, png格式
</p>
<p>
支持jpeg, png格式
</p>
</div>
</div>
</el-upload>
</el-upload>
...
@@ -874,7 +874,54 @@
...
@@ -874,7 +874,54 @@
more: "
imgUrl1More
",
more: "
imgUrl1More
",
show: "
uploadImgMessage1
"
show: "
uploadImgMessage1
"
};
};
this.beforeUpload1(file, fileLimit);
this.beforeUploadLogo(file,fileLimit)
//this.beforeUpload1(file, fileLimit);
},
//上传logo add
beforeUploadLogo(file, fileLimit) {
let vm = this;
const isJPG = file.type === "
image
/
jpeg
";
const isPNG = file.type === "
image
/
png
";
const isLt2M = file.size / 1024 < 200;
if (!isJPG && !isPNG) {
vm.$message.error("
仅支持
jpeg
,
png
格式
");
// return;
}
if (!isLt2M) {
vm.$message.error("
图片大小请控制在
200
kb
以内
");
return;
}
let _img = new FileReader();
_img.readAsDataURL(file);
_img.onload = function (theFile) {
let image = new Image()
image.src = theFile.target.result
//vm.slide2.oriUrl = theFile.target.result;
image.onload = function () {
let _this = this;
// if (_this.width != fileLimit.width || _this.height != fileLimit.height) {
let l = _this.width/_this.height
if (l != 1) {
vm.$message.error("
图片宽高比例请控制在
1
:
1
");
return;
} else {
openLoading(vm);
doUpload(vm, file, getFilePath(file, null), "
preview4
", "
progress1
", 1).then(function (path) {
closeLoading(vm);
vm.formData[fileLimit.key] = path.fullPath;
vm.formData[fileLimit.more] = {
attachmentName: path.storeName,
attachmentExt: path.ext,
attachmentSize: path.size
};
vm.$message.success("
上传成功
");
});
}
};
};
},
},
setOption(type) {
setOption(type) {
// this.currentOption.aspectRatio = 1/1;
// this.currentOption.aspectRatio = 1/1;
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录