Commit 874e9c124b9d486eeeae91daf8ed1a49ffae20a7

Authored by sqy
1 parent db1d9a86

'fix:[DEFECT-308]平台图片不超过2M'

... ... @@ -44,7 +44,7 @@
44 44 class="ant-upload-text flex"
45 45 style="width: 280px; height: 100px; align-items: center; font-size: 0.5625rem"
46 46 >
47   - 支持.PNG、.JPG格式,建议尺寸为1080*1620px,大小不超过5M</div
  47 + 支持.PNG、.JPG格式,建议尺寸为1920*1080px,大小不超过2M</div
48 48 >
49 49 </div>
50 50 </Upload>
... ... @@ -187,9 +187,9 @@
187 187 if (!isJpgOrPng) {
188 188 createMessage.error('只能上传图片文件!');
189 189 }
190   - const isLt2M = (file.size as number) / 1024 / 1024 < 5;
  190 + const isLt2M = (file.size as number) / 1024 / 1024 < 2;
191 191 if (!isLt2M) {
192   - createMessage.error('图片大小不能超过5MB!');
  192 + createMessage.error('图片大小不能超过2MB!');
193 193 }
194 194 return isJpgOrPng && isLt2M;
195 195 };
... ...
... ... @@ -69,7 +69,7 @@
69 69 class="ant-upload-text flex"
70 70 style="width: 280px; height: 130px; align-items: center; font-size: 0.5625rem"
71 71 >
72   - 支持.PNG、.JPG格式,建议尺寸为1920*1080px以上,大小不超过5M</div
  72 + 支持.PNG、.JPG格式,建议尺寸为1920*1080px以上,大小不超过2M</div
73 73 >
74 74 </div>
75 75 </Upload>
... ... @@ -99,8 +99,6 @@
99 99 import { PlusOutlined } from '@ant-design/icons-vue';
100 100 import { useUserStore } from '/@/store/modules/user';
101 101 import { createLocalStorage } from '/@/utils/cache/index';
102   - import { useTitle } from '@vueuse/core';
103   - import { useGlobSetting } from '/@/hooks/setting';
104 102 export default defineComponent({
105 103 components: {
106 104 BasicForm,
... ... @@ -192,9 +190,9 @@
192 190 if (!isJpgOrPng) {
193 191 createMessage.error('只能上传图片文件!');
194 192 }
195   - const isLt2M = (file.size as number) / 1024 / 1024 < 5;
  193 + const isLt2M = (file.size as number) / 1024 / 1024 < 2;
196 194 if (!isLt2M) {
197   - createMessage.error('图片大小不能超过5MB!');
  195 + createMessage.error('图片大小不能超过2MB!');
198 196 }
199 197 return isJpgOrPng && isLt2M;
200 198 };
... ...