From daae69c6a0147d667288799c68ff54880953468d Mon Sep 17 00:00:00 2001 From: xiaowang <2161656029@qq.com> Date: Sun, 8 Nov 2026 00:27:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0=E6=94=AF?= =?UTF-8?q?=E6=8C=81=20GIF=EF=BC=9A=E7=AE=A1=E7=90=86=E7=AB=AF=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E7=99=BD=E5=90=8D=E5=8D=95=E5=AF=B9=E9=BD=90=20GIF?= =?UTF-8?q?=EF=BC=8C=E5=B0=8F=E7=A8=8B=E5=BA=8F=E5=9B=BE=E7=89=87=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E4=BF=9D=E7=95=99=E5=8E=9F=E5=9B=BE=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E5=8A=A8=E5=9B=BE=E8=A2=AB=E5=8E=8B=E6=88=90=E9=9D=99=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- JC-Salon-Frontend/src/views/admin/AnnouncementsView.vue | 2 +- JC-Salon-Frontend/src/views/admin/ShopsView.vue | 3 +++ JC-Salon-Frontend/src/views/admin/SystemMessagesView.vue | 4 ++-- JC-Salon-Frontend/src/views/admin/UsersView.vue | 6 +++--- JC-Salon-WeChat/pages/appointment-form/index.js | 2 +- JC-Salon-WeChat/pages/backfill-order/index.js | 2 +- JC-Salon-WeChat/utils/upload.js | 2 +- 7 files changed, 12 insertions(+), 9 deletions(-) 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)