Commit 9349a9c6 by wufan

fix:修复分享下载海报问题

parent a32ae99d
...@@ -12,6 +12,7 @@ import domtoimage from 'dom-to-image'; ...@@ -12,6 +12,7 @@ import domtoimage from 'dom-to-image';
import html2canvas from 'html2canvas'; import html2canvas from 'html2canvas';
import qrcode from "@/libs/qrcode/qrcode.js"; import qrcode from "@/libs/qrcode/qrcode.js";
import User from '@/common/js/user'; import User from '@/common/js/user';
import $ from 'jquery';
import './ShareLiveModal.less'; import './ShareLiveModal.less';
......
...@@ -114,15 +114,18 @@ class OperateArea extends React.Component { ...@@ -114,15 +114,18 @@ class OperateArea extends React.Component {
// 准备上传 // 准备上传
handleUpload = (event) => { handleUpload = (event) => {
const fileList = event.target.files; const fileList = event.target.files;
debugger
// 判断文件的大小是否超出了限制 // 判断文件的大小是否超出了限制
const nonCompliantFileList = []; const nonCompliantFileList = [];
const _fileList = [...fileList]; const _fileList = [...fileList];
_fileList.map((file, index) => { _fileList.map((file, index) => {
debugger
let { size, type, name } = file; let { size, type, name } = file;
if (!type) { if (!type) {
type = getFileTypeByName(name); type = getFileTypeByName(name);
} }
if (type.indexOf('image') > -1 && size > 50 * DEFAULT_SIZE_UNIT) { if (type.indexOf('image') > -1 && size > 50 * DEFAULT_SIZE_UNIT) {
debugger
nonCompliantFileList.push(file); nonCompliantFileList.push(file);
_fileList.splice(index, 1); _fileList.splice(index, 1);
} }
......
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