Commit f7d999b5 by end

修复工作台bug

parent 09f4cfd3
No preview for this file type
......@@ -89,7 +89,7 @@ class UploadImageCover extends Component {
// Upload上传之前函数
beforeUpload = file => {
if (file.size > 20 * 1024 * 1024) {
if (file.size > 30 * 1024 * 1024) {
//bug-13496-liyuan
message.error("该图片超过大小,不支持上传"); //bug 15215
return false;
......@@ -133,9 +133,9 @@ class UploadImageCover extends Component {
.then(res => res.blob())
.then(blob => {
new Compressor(blob, {
quality: 0.7, // 压缩质量(0-1),值越小压缩率越高
maxWidth: 1200, // 最大宽度限制
maxHeight: 1200, // 最大高度限制
quality: 0.3,// 压缩质量(0-1),值越小压缩率越高
maxWidth: 1125, // 最大宽度限制
maxHeight: 540, // 最大高度限制
success: (compressedBlob) => {
// 创建压缩后的文件对象
const file = new File([compressedBlob], `${randomNumber}.jpg`, { type: 'image/jpeg' });
......
......@@ -281,7 +281,7 @@ class addEdit extends React.Component {
label={"封面logo"}
extra={
<div style={{ marginLeft: "164px" }}>
请上传资源附件(支持格式jpeg、jpg、png,大小20m以内)建议尺寸:1125*900
请上传资源附件(支持格式jpeg、jpg、png)建议尺寸:1125*900
</div>
}
>
......
......@@ -345,7 +345,7 @@ class addEdit extends React.Component {
label={"封面logo"}
extra={
<div style={{ marginLeft: "164px" }}>
请上传资源附件(支持格式jpeg、jpg、png,大小20m以内)建议尺寸:1125*900
请上传资源附件(支持格式jpeg、jpg、png)建议尺寸:1125*900
</div>
}
>
......
......@@ -163,7 +163,7 @@ class Community extends Component {
preRatio={["355/100"]}
maxSize={20 * 1024 * 1024}
disabled={this.state.flag}
extra="请上传资源附件(支持格式jpeg、jpg、png,大小20M以内,最佳尺寸:355*100)"
extra="请上传资源附件(支持格式jpeg、jpg、png,最佳尺寸:355*100)"
/>
{/* <span>上传</span> */}
</div>
......
......@@ -616,7 +616,7 @@ class ToolEdit extends Component {
terminalId={this.props.terminalId}
moduleId={this.props.moduleId}
dataList={this.props.pcReducer["m" + this.props.moduleId]}
isPc={true}
/>
)}
{/*培训项目/课程/讲师库*/}
......@@ -678,7 +678,7 @@ class ToolEdit extends Component {
preRatio={["1200/170"]}
maxSize={20 * 1024 * 1024}
// disabled={this.state.flag}
extra="请上传资源附件(支持格式jpeg、jpg、png,大小20M以内,最佳尺寸:1200*170)"
extra="请上传资源附件(支持格式jpeg、jpg、png,最佳尺寸:1200*170)"
/>
{/* <span>上传</span> */}
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment