diff --git a/JC-Salon-WeChat/pages/appointment-form/index.wxml b/JC-Salon-WeChat/pages/appointment-form/index.wxml index 3ac94fa2..3656ee4b 100644 --- a/JC-Salon-WeChat/pages/appointment-form/index.wxml +++ b/JC-Salon-WeChat/pages/appointment-form/index.wxml @@ -103,14 +103,16 @@ 款式图片{{form.manualProductImages.length}} / 9 - - - - 封面 - + + + + + 封面 + + + - - + 第一张图片会作为款式封面 diff --git a/JC-Salon-WeChat/pages/appointment-form/index.wxss b/JC-Salon-WeChat/pages/appointment-form/index.wxss index 747b3251..d2d453cc 100644 --- a/JC-Salon-WeChat/pages/appointment-form/index.wxss +++ b/JC-Salon-WeChat/pages/appointment-form/index.wxss @@ -1186,20 +1186,30 @@ button.full{ font-weight: 700; } -.manual-style-image-grid { - display: flex; - flex-wrap: wrap; - justify-content: space-between; +.manual-style-image-scroll { + width: 100%; + height: 218rpx; margin-top: 16rpx; + white-space: nowrap; +} + +.manual-style-image-grid { + display: inline-flex; + align-items: flex-start; + flex-wrap: nowrap; + gap: 16rpx; + min-width: 100%; + height: 206rpx; } .manual-style-image-tile, .manual-style-add-image { position: relative; box-sizing: border-box; - width: calc((100% - 24rpx) / 3); + flex: 0 0 206rpx; + width: 206rpx; height: 206rpx; - margin: 0 0 12rpx; + margin: 0; overflow: hidden; border-radius: 20rpx; } diff --git a/JC-Salon-WeChat/pages/appointment-form/product-selector.test.js b/JC-Salon-WeChat/pages/appointment-form/product-selector.test.js index d4f7c9fd..30f275bb 100644 --- a/JC-Salon-WeChat/pages/appointment-form/product-selector.test.js +++ b/JC-Salon-WeChat/pages/appointment-form/product-selector.test.js @@ -132,6 +132,7 @@ page.confirmManualProduct() assert.strictEqual(page.data.manualProductSheetVisible, false) const wxml = require('fs').readFileSync(require('path').join(__dirname, 'index.wxml'), 'utf8') +const wxss = require('fs').readFileSync(require('path').join(__dirname, 'index.wxss'), 'utf8') assert.ok(wxml.indexOf('美甲款式') < wxml.indexOf('预约信息')) assert.ok(wxml.indexOf('预约信息') < wxml.indexOf('>客户')) assert.match(wxml, /class="appointment-hero"/) @@ -158,11 +159,15 @@ assert.match(wxml, /bind:openmanual="openManualProductFromLibrary"/) assert.match(wxml, /show-manual-action="\{\{true\}\}"/) assert.match(wxml, /本次 \{\{form\.amount \|\| '待填'\}\} 元/) assert.match(wxml, /wx:for="\{\{form\.manualProductImages\}\}"/) +assert.match(wxml, /]*catchtap="removeManualProductImage"/) assert.match(wxml, /manualProductImages\.length\}\} \/ 9/) +assert.match(wxss, /\.manual-style-image-scroll\s*\{[^}]*height:\s*218rpx/s) +assert.match(wxss, /\.manual-style-image-grid\s*\{[^}]*flex-wrap:\s*nowrap/s) +assert.match(wxss, /\.manual-style-image-tile,\s*\.manual-style-add-image\s*\{[^}]*width:\s*206rpx;[^}]*height:\s*206rpx/s) async function testManualProductImages() { selectedImagePaths = ['/tmp/style-1.jpg', '/tmp/style-2.jpg', '/tmp/style-3.jpg'] diff --git a/docs/项目变更记录.md b/docs/项目变更记录.md index 87e7b810..f4e03513 100644 --- a/docs/项目变更记录.md +++ b/docs/项目变更记录.md @@ -407,3 +407,8 @@ - 新增预约款式图片上传后优先使用微信本地临时文件路径预览,同时保留对象存储文件 ID 和服务端 URL;本地预览失效时回退到服务端 URL。 - 原因是私有对象存储的上传响应 URL 不一定能由小程序开发环境直接读取,原页面优先渲染该 URL,导致图片虽已上传成功但预览为空。 - 图片提交仍使用文件 ID,不改变对象存储公开权限或内容审核状态。 + +## 2026-10-29 Salon 预约款式图片横向排列 + +- 款式图片列表改为固定高度的横向滚动区,新增图片不再换行并撑高弹层。 +- 图片和“点击添加图片”入口统一为正方形尺寸,添加入口位于列表末尾;保留封面标识、删除、预览和最多 9 张规则。