限制照片大小

This commit is contained in:
Mr.jiang 2024-08-14 17:25:04 +08:00
parent afcd0a537e
commit cf66fcfd3c
1 changed files with 2 additions and 2 deletions

View File

@ -739,7 +739,7 @@
filePath: res.tempFilePaths[i],
success: (infoRes) => {
const size = infoRes.size;
if (size / 1024 / 1024 > 2) {
if (size / 1024 / 1024 > 4) {
// 2MB
uni.showToast({
icon:'error',
@ -793,7 +793,7 @@
filePath: res.tempFilePaths[i],
success: (infoRes) => {
const size = infoRes.size;
if (size / 1024 / 1024 > 2) {
if (size / 1024 / 1024 > 4) {
// 2MB
uni.showToast({
icon:'error',