Parcourir la source

fix:用户头像注册图片大小更改

张旭伟 il y a 3 semaines
Parent
commit
be28b0ad1e
2 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 1 1
      src/constants/pageConstants.ts
  2. 2 2
      src/view/register/index.vue

+ 1 - 1
src/constants/pageConstants.ts

@@ -223,7 +223,7 @@ export const scanCodeWxUrl = (terminal: string, type: InstSwitchType) => {
 }
 
 // 用户 头像大小 / M
-export const userImgSize = 3
+export const userImgSize = 4
 
 // 开关设备类型
 export enum InstSwitchType {

+ 2 - 2
src/view/register/index.vue

@@ -643,10 +643,10 @@ const beforeRead = (file: any) => {
       message: '上传图片必须是JPG/PNG/BMP/GIF类型!'
     });
     return false;
-  } else if (file.size / 1024 / 1024 > 2) {
+  } else if (file.size / 1024 / 1024 > 4) {
     showNotify({
       type: 'danger',
-      message: '图片大小不能超过2MB!'
+      message: '图片大小不能超过4MB!'
     });
     return false;
   }