diff --git a/JC-Salon-Frontend/src/views/admin/AnnouncementsView.vue b/JC-Salon-Frontend/src/views/admin/AnnouncementsView.vue index 125b4484..85810baf 100644 --- a/JC-Salon-Frontend/src/views/admin/AnnouncementsView.vue +++ b/JC-Salon-Frontend/src/views/admin/AnnouncementsView.vue @@ -41,7 +41,7 @@ - + 添加图片 diff --git a/JC-Salon-Frontend/src/views/admin/ShopsView.vue b/JC-Salon-Frontend/src/views/admin/ShopsView.vue index d754c52a..9e8865cb 100644 --- a/JC-Salon-Frontend/src/views/admin/ShopsView.vue +++ b/JC-Salon-Frontend/src/views/admin/ShopsView.vue @@ -292,6 +292,7 @@
首页轮播图,建议尺寸 750x300 像素
店铺详情展示图
- +
上传图片 @@ -35,7 +35,7 @@
每条消息最多上传一张图片。
- 建议使用 JPG/PNG/WebP,图片会在弹窗和通知详情中展示。 + 建议使用 JPG/PNG/WebP/GIF,GIF 会保留动图效果,图片会在弹窗和通知详情中展示。 移除图片
diff --git a/JC-Salon-Frontend/src/views/admin/UsersView.vue b/JC-Salon-Frontend/src/views/admin/UsersView.vue index 24affccf..d5733ab4 100644 --- a/JC-Salon-Frontend/src/views/admin/UsersView.vue +++ b/JC-Salon-Frontend/src/views/admin/UsersView.vue @@ -231,7 +231,7 @@
{ /** beforeUploadWechatQr validates QR image files before upload. */ const beforeUploadWechatQr = (file: File) => { - const isImage = file.type.startsWith('image/') + const isImage = file.type.startsWith('image/') && file.type !== 'image/gif' if (!isImage) { - message.error('只能上传图片文件') + message.error('二维码仅支持 JPG、PNG 或 WebP 图片') } return isImage } diff --git a/JC-Salon-WeChat/pages/appointment-form/index.js b/JC-Salon-WeChat/pages/appointment-form/index.js index 3fa51657..c3323ba4 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: ['compressed'], + sizeType: ['original'], 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 a0432a64..7072b658 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: ['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 || '未知错误'}`)) })) + 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 || '未知错误'}`)) })) } Page({ diff --git a/JC-Salon-WeChat/utils/upload.js b/JC-Salon-WeChat/utils/upload.js index 721093a2..a757e40a 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: ['compressed'], + sizeType: ['original'], success(result) { const filePath = result.tempFiles && result.tempFiles[0] ? result.tempFiles[0].tempFilePath : '' resolve(filePath)