diff --git a/JC-Salon-WeChat/pages/appointment-form/index.js b/JC-Salon-WeChat/pages/appointment-form/index.js index c3323ba4..3fa51657 100644 --- a/JC-Salon-WeChat/pages/appointment-form/index.js +++ b/JC-Salon-WeChat/pages/appointment-form/index.js @@ -165,7 +165,7 @@ function chooseManualProductImagePaths(count) { count: normalizedCount, mediaType: ['image'], sourceType: ['album', 'camera'], - sizeType: ['original'], + sizeType: ['compressed'], success(result) { resolve((result.tempFiles || []).map(file => file && file.tempFilePath).filter(Boolean).slice(0, normalizedCount)) }, diff --git a/JC-Salon-WeChat/pages/backfill-order/index.js b/JC-Salon-WeChat/pages/backfill-order/index.js index 7072b658..a0432a64 100644 --- a/JC-Salon-WeChat/pages/backfill-order/index.js +++ b/JC-Salon-WeChat/pages/backfill-order/index.js @@ -27,7 +27,7 @@ function imagePatch(images) { } function chooseImages(count) { - return new Promise((resolve, reject) => wx.chooseMedia({ count: Math.min(9, Math.max(1, count)), mediaType: ['image'], sourceType: ['album', 'camera'], sizeType: ['original'], success: result => resolve((result.tempFiles || []).map(file => file.tempFilePath).filter(Boolean)), fail: error => String(error && error.errMsg || '').includes('cancel') ? resolve([]) : reject(new Error(`选择图片失败:${error && error.errMsg || '未知错误'}`)) })) + return new Promise((resolve, reject) => wx.chooseMedia({ count: Math.min(9, Math.max(1, count)), mediaType: ['image'], sourceType: ['album', 'camera'], sizeType: ['compressed'], success: result => resolve((result.tempFiles || []).map(file => file.tempFilePath).filter(Boolean)), fail: error => String(error && error.errMsg || '').includes('cancel') ? resolve([]) : reject(new Error(`选择图片失败:${error && error.errMsg || '未知错误'}`)) })) } Page({ diff --git a/JC-Salon-WeChat/utils/upload.js b/JC-Salon-WeChat/utils/upload.js index a757e40a..721093a2 100644 --- a/JC-Salon-WeChat/utils/upload.js +++ b/JC-Salon-WeChat/utils/upload.js @@ -86,7 +86,7 @@ function chooseImageFilePath() { count: 1, mediaType: ['image'], sourceType: ['album', 'camera'], - sizeType: ['original'], + sizeType: ['compressed'], success(result) { const filePath = result.tempFiles && result.tempFiles[0] ? result.tempFiles[0].tempFilePath : '' resolve(filePath)