diff --git a/JY-Salon-WeChat/pages/shop-settings/index.js b/JY-Salon-WeChat/pages/shop-settings/index.js index 9460081a..7ee9aa36 100644 --- a/JY-Salon-WeChat/pages/shop-settings/index.js +++ b/JY-Salon-WeChat/pages/shop-settings/index.js @@ -27,6 +27,8 @@ const EXCEPTION_TYPES = [ { value: 'CHANGE_SHIFT', label: '临时改班' } ] +const DEFAULT_SHOP_INTRO = '专注法式、晕染与手绘设计,适合想要温柔质感的客人。' + function copyWorkDays(days) { if (Array.isArray(days)) { return days.map(day => Number(day)).filter(day => day >= 1 && day <= 7).sort() @@ -71,6 +73,10 @@ function resolveFirstImageUrl(urls) { return Array.isArray(urls) ? String(urls[0] || '').trim() : '' } +function introLength(value) { + return String(value || '').length +} + Page({ data: { presets: PRESETS, @@ -85,12 +91,13 @@ Page({ saving: false, coverUploading: false, coverImagePreviewUrl: '', + introLength: introLength(DEFAULT_SHOP_INTRO), form: { shopName: BRAND_CONFIG.defaultShopName, startTime: '10:00', endTime: '22:00', defaultDuration: 60, - rule: '必须选择已有作品作为项目来源', + rule: DEFAULT_SHOP_INTRO, schedulePresetType: 'EVERYDAY', scheduleWorkDays: [1, 2, 3, 4, 5, 6, 7], scheduleRemark: '', @@ -131,6 +138,7 @@ Page({ } this.setData({ form, + introLength: introLength(form.rule), coverImagePreviewUrl: resolveFirstImageUrl(settings.coverImageUrls), presetOptions: buildPresetOptions(form.schedulePresetType), weekdayOptions: buildWeekdayOptions(form.scheduleWorkDays), @@ -149,7 +157,13 @@ Page({ }, onInput(event) { - this.setData({ [`form.${event.currentTarget.dataset.field}`]: event.detail.value }) + const field = event.currentTarget.dataset.field + const value = event.detail.value + const nextData = { [`form.${field}`]: value } + if (field === 'rule') { + nextData.introLength = introLength(value) + } + this.setData(nextData) }, async chooseCoverImage() { @@ -268,10 +282,10 @@ Page({ }) }, - explainBookingRule() { + explainShopIntro() { wx.showModal({ - title: '预约规则', - content: '这是店铺给员工看的预约备注或说明文案,不参与自动排班、容量或冲突校验。', + title: '门店介绍', + content: '这里会保存为门店介绍,并展示在用户端门店详情。预约时间、容量和冲突校验仍由店铺排班、特殊日期和员工排班控制。', showCancel: false, confirmText: '知道了' }) diff --git a/JY-Salon-WeChat/pages/shop-settings/index.wxml b/JY-Salon-WeChat/pages/shop-settings/index.wxml index afe3f75a..533ad5ff 100644 --- a/JY-Salon-WeChat/pages/shop-settings/index.wxml +++ b/JY-Salon-WeChat/pages/shop-settings/index.wxml @@ -1,17 +1,24 @@ 店铺设置加载中 + + 店铺设置 + 把门店气质写进第一眼 + + - 店铺主图 + 店铺封面 + 上传一张能代表风格的作品图 + 门店封面 {{form.shopName || '店铺主图'}} - 我的页顶部展示这张图片 + {{form.rule || '色彩、手作与细节管理的预约空间'}} @@ -21,6 +28,12 @@ + + + 门店档案 + 展示给客户看的第一段介绍 + + 店铺名称 @@ -32,10 +45,21 @@ - 预约规则 - ? + 门店介绍 + ? + + + + {{introLength}}/120 - diff --git a/JY-Salon-WeChat/pages/shop-settings/index.wxss b/JY-Salon-WeChat/pages/shop-settings/index.wxss index 99451585..945d3f36 100644 --- a/JY-Salon-WeChat/pages/shop-settings/index.wxss +++ b/JY-Salon-WeChat/pages/shop-settings/index.wxss @@ -1,12 +1,40 @@ +.page { + background: + linear-gradient(180deg, rgba(255, 250, 242, 0.96), rgba(247, 240, 232, 0.96)), + linear-gradient(135deg, rgba(89, 121, 102, 0.14), rgba(181, 134, 86, 0.12)); +} + +.page-heading { + display: flex; + flex-direction: column; + gap: 8rpx; + margin: 4rpx 0 22rpx; +} + +.page-title { + color: #2f2a25; + font-size: 36rpx; + font-weight: 900; + line-height: 1.25; +} + +.page-subtitle { + color: #8a796a; + font-size: 23rpx; + line-height: 1.4; +} + .cover-card { position: relative; - height: 300rpx; - margin-bottom: 24rpx; + height: 340rpx; + margin-bottom: 26rpx; overflow: hidden; - border-radius: 22rpx; - background: linear-gradient(135deg, #7b9987, #c4996e); - box-shadow: 0 18rpx 36rpx rgba(83, 64, 44, 0.14); + border-radius: 28rpx; + background: + linear-gradient(135deg, rgba(73, 101, 85, 0.95), rgba(179, 131, 90, 0.95)), + radial-gradient(circle at 24% 22%, rgba(255, 245, 223, 0.28), transparent 36%); + box-shadow: 0 22rpx 46rpx rgba(83, 64, 44, 0.18); } .cover-preview, @@ -17,10 +45,34 @@ .cover-empty { display: flex; + flex-direction: column; align-items: center; justify-content: center; + gap: 10rpx; color: rgba(255, 255, 255, 0.82); - font-size: 34rpx; +} + +.cover-empty-title { + font-size: 36rpx; + font-weight: 900; +} + +.cover-empty-desc { + font-size: 23rpx; + font-weight: 600; + opacity: 0.86; +} + +.cover-badge { + position: absolute; + top: 26rpx; + left: 28rpx; + z-index: 2; + padding: 8rpx 20rpx; + border-radius: 999rpx; + background: rgba(255, 244, 222, 0.88); + color: #5b4635; + font-size: 22rpx; font-weight: 900; } @@ -34,8 +86,10 @@ align-items: flex-end; justify-content: space-between; gap: 20rpx; - padding: 28rpx; - background: linear-gradient(180deg, rgba(30, 24, 19, 0.08), rgba(30, 24, 19, 0.48)); + padding: 30rpx; + background: + linear-gradient(180deg, rgba(30, 24, 19, 0.02), rgba(30, 24, 19, 0.6)), + linear-gradient(110deg, rgba(48, 70, 56, 0.36), transparent 58%); } .cover-copy { @@ -50,7 +104,7 @@ .cover-title { overflow: hidden; - font-size: 34rpx; + font-size: 40rpx; font-weight: 900; line-height: 1.25; text-overflow: ellipsis; @@ -59,8 +113,14 @@ .cover-desc { margin-top: 8rpx; - font-size: 23rpx; + display: -webkit-box; + overflow: hidden; + max-width: 430rpx; + font-size: 24rpx; + line-height: 1.45; opacity: 0.9; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; } .cover-actions { @@ -75,17 +135,17 @@ display: flex; align-items: center; justify-content: center; - min-width: 154rpx; - min-height: 58rpx; + min-width: 164rpx; + min-height: 62rpx; padding: 0 20rpx; - border-radius: 16rpx; + border-radius: 20rpx; font-size: 24rpx; font-weight: 900; } .cover-btn { - background: #fffdf8; - color: #72553b; + background: #fff8ed; + color: #6d4d35; } .cover-remove { @@ -95,10 +155,37 @@ .form-card, .rule-card { - padding: 10rpx 0; + padding: 12rpx 0; overflow: hidden; } +.form-card { + box-shadow: 0 18rpx 36rpx rgba(83, 64, 44, 0.08); +} + +.form-header { + display: flex; + justify-content: space-between; + padding: 26rpx 26rpx 8rpx; +} + +.form-header view { + display: flex; + flex-direction: column; + gap: 6rpx; +} + +.form-kicker { + color: #92734f; + font-size: 22rpx; + font-weight: 900; +} + +.form-title { + color: #8d8175; + font-size: 23rpx; +} + .field { min-height: 108rpx; padding: 12rpx 24rpx; @@ -111,15 +198,45 @@ } .field input, -.field-value { +.field-value, +.intro-editor { min-height: 70rpx; padding: 0 22rpx; border: 1rpx solid #eadfd2; border-radius: 18rpx; - background: #fffaf4; + background: #fff8f2; line-height: 70rpx; } +.intro-editor { + position: relative; + flex: 1; + min-height: 156rpx; + padding: 18rpx 22rpx 42rpx; + line-height: 1.5; +} + +.intro-editor textarea { + width: 100%; + height: 104rpx; + color: #3d3128; + font-size: 26rpx; + line-height: 1.5; +} + +.intro-placeholder { + color: #b4a79b; +} + +.intro-count { + position: absolute; + right: 22rpx; + bottom: 12rpx; + color: #b2a396; + font-size: 20rpx; + line-height: 1; +} + .label-with-help { display: flex; align-items: center;