fix: 收敛模板编辑发布契约并还原餐饮页面视觉
No files matched your search
|
After Width: | Height: | Size: 2.5 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#d97706" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 6v6l4 2"/></svg>
|
||||
|
After Width: | Height: | Size: 238 B |
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#f97316" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><path d="M14 2v6h6M9 15l2 2 4-4"/></svg>
|
||||
|
After Width: | Height: | Size: 287 B |
|
After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#f97316" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m11 17 2 2a2 2 0 1 0 3-3M14 14l3 3a2 2 0 1 0 3-3l-5-5M8 17l3 3a2 2 0 0 0 3-3M2 12l3-7 5 1 4-1 7 3 1 4-3 2M5 14l-3-2M5 14l3 3M10 6 7 9a2 2 0 0 0 3 3l3-3"/></svg>
|
||||
|
After Width: | Height: | Size: 346 B |
|
After Width: | Height: | Size: 105 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#10b981" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 22s8-4 8-11V5l-8-3-8 3v6c0 7 8 11 8 11z"/><path d="m9 12 2 2 4-4"/></svg>
|
||||
|
After Width: | Height: | Size: 263 B |
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#3b82f6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m12 3 1.9 5.8L20 11l-6.1 2.2L12 19l-1.9-5.8L4 11l6.1-2.2L12 3zM20 2v4M18 4h4M3 17v4M1 19h4"/></svg>
|
||||
|
After Width: | Height: | Size: 285 B |
|
After Width: | Height: | Size: 2.4 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#3b82f6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="5.5" cy="17.5" r="3.5"/><circle cx="18.5" cy="17.5" r="3.5"/><path d="m15 6 2 4h3M12 17.5l-5-8H4m3 0h9l-4 8 5-8M9 6h3"/></svg>
|
||||
|
After Width: | Height: | Size: 315 B |
|
After Width: | Height: | Size: 2.4 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#f97316" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="5.5" cy="17.5" r="3.5"/><circle cx="18.5" cy="17.5" r="3.5"/><path d="m15 6 2 4h3M12 17.5l-5-8H4m3 0h9l-4 8 5-8M9 6h3"/></svg>
|
||||
|
After Width: | Height: | Size: 315 B |
|
After Width: | Height: | Size: 3.4 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#f97316" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 6v6l4 2"/></svg>
|
||||
|
After Width: | Height: | Size: 238 B |
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#f97316" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 16v-2.4a3 3 0 0 1 6 0V16a3 3 0 0 1-6 0Zm10-8V5.6a3 3 0 0 1 6 0V8a3 3 0 0 1-6 0Z"/><path d="M7 21h0M17 13h0"/></svg>
|
||||
|
After Width: | Height: | Size: 304 B |
|
After Width: | Height: | Size: 674 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#f97316" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 6h11M10 12h11M10 18h11M3 5h1v2M3 11h2l-2 2h2M3 17h2v2H3"/></svg>
|
||||
|
After Width: | Height: | Size: 254 B |
@@ -1 +1 @@
|
||||
<view class="page"><view class="brand-card"><view class="identity"><image src="{{brand.avatarUrl}}" mode="aspectFill"/><view><text class="name">{{brand.founder}}</text><text class="title">{{brand.title}}</text><text class="slogan">“{{brand.slogan}}”</text></view></view><view class="notice"><text class="notice-title">{{presentation.stallTitle || '服务地点'}}</text><text>{{brand.studioAddress || brand.address}}</text><text wx:if="{{presentation.stallTime}}" class="notice-time">{{presentation.stallTime}}</text><text wx:for="{{trustItems}}" wx:if="{{item.type === 'schedule'}}" wx:key="title" class="notice-desc">{{item.content}}</text></view><view class="actions"><button bindtap="openInquiry">咨询 / 预订</button><button class="muted" bindtap="openOfferings">查看餐品</button></view></view><view class="scene-wrap"><view class="section-head"><text class="eyebrow">{{brand.name}}</text></view><image src="{{brand.heroImage}}" mode="aspectFill" bindtap="openService"/></view><view class="section-head"><view><text class="eyebrow">{{presentation.worksEyebrow || '餐品与服务'}}</text><text class="heading">{{presentation.worksTitle || '可选餐品'}}</text></view><text class="more" bindtap="openOfferings">查看全部 ›</text></view><view class="dish-grid"><view wx:for="{{offerings}}" wx:key="id" class="dish" data-id="{{item.id}}" bindtap="openOffering"><image src="{{item.image}}" mode="aspectFill"/><view class="dish-copy"><text class="dish-name">{{item.name}}</text><text class="dish-sub">{{item.desc}}</text><text class="price">{{item.priceRange}}</text></view></view></view><view wx:for="{{trustItems}}" wx:if="{{item.type === 'promise' || item.type === 'case'}}" wx:key="title" class="promise"><text class="eyebrow light">{{item.title}}</text><text class="promise-title">{{item.summary}}</text><text class="quote">{{item.content}}</text></view></view>
|
||||
<view class="page"><view class="brand-card"><view class="identity"><image src="{{brand.avatarUrl}}" mode="aspectFill"/><view><text class="name">{{brand.founder}}</text><text class="title">{{brand.title}}</text><text class="slogan">“{{brand.slogan}}”</text></view></view><view class="notice"><text class="notice-title">{{presentation.stallTitle || '服务地点'}}</text><text>{{brand.studioAddress || brand.address}}</text><text wx:if="{{presentation.stallTime}}" class="notice-time">{{presentation.stallTime}}</text></view><view class="actions"><button bindtap="openInquiry">咨询 / 预订</button><button class="muted" bindtap="openOfferings">查看餐品</button></view></view><view class="scene-wrap"><view class="section-head"><text class="eyebrow">{{brand.name}}</text></view><image class="scene" src="{{brand.heroImage}}" mode="aspectFill" bindtap="openService"/></view><view class="section-head"><view><text class="eyebrow">{{presentation.worksEyebrow || '餐品与服务'}}</text><text class="heading">{{presentation.worksTitle || '可选餐品'}}</text></view><text class="more" bindtap="openOfferings">查看全部 ›</text></view><view class="dish-grid"><view wx:for="{{offerings}}" wx:key="id" class="dish" data-id="{{item.id}}" bindtap="openOffering"><image src="{{item.image}}" mode="aspectFill"/><view class="dish-copy"><text class="dish-name">{{item.name}}</text><text class="dish-sub">{{item.desc}}</text><text class="price">{{item.priceRange}}</text></view></view></view><view wx:for="{{trustItems}}" wx:if="{{item.type === 'promise' || item.type === 'case'}}" wx:key="title" class="promise"><text class="eyebrow light">{{item.title}}</text><text wx:if="{{item.summary}}" class="promise-title">{{item.summary}}</text><text class="quote">{{item.content}}</text></view></view>
|
||||
@@ -1,18 +1,7 @@
|
||||
Component({
|
||||
properties: {
|
||||
brand: { type: Object, value: {} },
|
||||
credentials: { type: Array, value: [] },
|
||||
presentation: { type: Object, value: {} },
|
||||
recordsCount: { type: Number, value: 0 },
|
||||
},
|
||||
methods: {
|
||||
call() {
|
||||
this.triggerEvent("call");
|
||||
},
|
||||
copy() {
|
||||
this.triggerEvent("copy");
|
||||
},
|
||||
records() {
|
||||
this.triggerEvent("records");
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -1 +1,23 @@
|
||||
<view class="page"><view class="profile-card"><image src="{{brand.avatarUrl}}" mode="aspectFill"/><text class="name">{{brand.founder}}</text><text class="title">{{brand.title}}</text><text class="bio">{{brand.slogan}}</text><view class="contact"><button bindtap="call">电话联系</button><button bindtap="copy">复制微信</button></view></view><view class="card"><text class="card-title">{{presentation.coverageTitle || '服务地点与方式'}}</text><text>{{brand.studioAddress || brand.address}}</text><text wx:if="{{presentation.coverageContent}}">{{presentation.coverageContent}}</text></view><view class="card" bindtap="records"><text class="card-title">我的预约记录</text><text>{{recordsCount}} 条记录 ›</text></view></view>
|
||||
<view class="profile-card">
|
||||
<view class="portrait">
|
||||
<image wx:if="{{brand.avatarUrl}}" src="{{brand.avatarUrl}}" mode="aspectFill" />
|
||||
<view class="identity">
|
||||
<text wx:if="{{presentation.badge}}" class="badge">{{presentation.badge}}</text>
|
||||
<text class="name">{{brand.founder || brand.name}}</text>
|
||||
<text wx:if="{{brand.title}}" class="title">{{brand.title}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{brand.description || presentation.storyLead || credentials.length}}" class="story">
|
||||
<text wx:if="{{presentation.storyLead}}" class="story-lead">{{presentation.storyLead}}</text>
|
||||
<text wx:if="{{brand.description}}" class="bio">{{brand.description}}</text>
|
||||
<block wx:for="{{credentials}}" wx:key="id">
|
||||
<view wx:if="{{item.config.standards.length}}" class="standards">
|
||||
<view wx:for="{{item.config.standards}}" wx:for-item="standard" wx:for-index="standardIndex" wx:key="title" class="standard">
|
||||
<image class="standard-icon" src="/assets/owner/{{standardIndex % 3 === 0 ? 'file-check' : standardIndex % 3 === 1 ? 'shield-check' : 'sparkles'}}.png" />
|
||||
<text class="standard-title">{{standard.title}}</text><text wx:if="{{standard.detail}}" class="standard-detail">{{standard.detail}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:else class="credential-copy"><text class="credential-title">{{item.title}}</text><text wx:if="{{item.summary}}" class="bio">{{item.summary}}</text><text wx:if="{{item.content}}" class="bio">{{item.content}}</text></view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
@@ -1,72 +1,114 @@
|
||||
.page {
|
||||
min-height: 100vh;
|
||||
padding: 28rpx;
|
||||
background: #fff8f0;
|
||||
color: #29231f;
|
||||
}
|
||||
.profile-card {
|
||||
padding: 36rpx 28rpx;
|
||||
text-align: center;
|
||||
border-radius: 28rpx;
|
||||
background: #3b2118;
|
||||
overflow: hidden;
|
||||
border: 1rpx solid #f5f5f4;
|
||||
border-radius: 48rpx;
|
||||
background: #fff;
|
||||
box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
.portrait {
|
||||
position: relative;
|
||||
height: 416rpx;
|
||||
background: #e7e5e4;
|
||||
}
|
||||
.portrait image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-position: top;
|
||||
}
|
||||
.identity {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
align-items: flex-start;
|
||||
padding: 32rpx;
|
||||
background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.2), transparent);
|
||||
color: #fff;
|
||||
}
|
||||
.profile-card image {
|
||||
width: 132rpx;
|
||||
height: 132rpx;
|
||||
border: 5rpx solid #ffbd8e;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.name,
|
||||
.title,
|
||||
.bio,
|
||||
.card-title,
|
||||
.card text {
|
||||
display: block;
|
||||
.badge {
|
||||
margin-bottom: 8rpx;
|
||||
padding: 4rpx 16rpx;
|
||||
border-radius: 99rpx;
|
||||
background: #f97316;
|
||||
color: #fff;
|
||||
font-size: 20rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.name {
|
||||
margin-top: 18rpx;
|
||||
font-size: 36rpx;
|
||||
display: block;
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.title {
|
||||
margin-top: 6rpx;
|
||||
color: #ffc79f;
|
||||
display: block;
|
||||
margin-top: 4rpx;
|
||||
color: #e7e5e4;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
.story {
|
||||
padding: 32rpx;
|
||||
}
|
||||
.story-lead {
|
||||
display: block;
|
||||
margin-bottom: 20rpx;
|
||||
color: #1c1917;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
line-height: 1.6;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
.bio {
|
||||
margin-top: 16rpx;
|
||||
color: #ffe5d2;
|
||||
font-size: 23rpx;
|
||||
line-height: 1.6;
|
||||
display: block;
|
||||
color: #44403c;
|
||||
font-size: 24rpx;
|
||||
line-height: 1.65;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
.contact {
|
||||
display: flex;
|
||||
gap: 14rpx;
|
||||
margin-top: 24rpx;
|
||||
.standards {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 16rpx;
|
||||
margin-top: 32rpx;
|
||||
padding-top: 24rpx;
|
||||
border-top: 1rpx solid #f5f5f4;
|
||||
}
|
||||
.contact button {
|
||||
flex: 1;
|
||||
height: 70rpx;
|
||||
border-radius: 18rpx;
|
||||
background: #e87532;
|
||||
color: #fff;
|
||||
.standard {
|
||||
padding: 20rpx 8rpx;
|
||||
text-align: center;
|
||||
border: 1rpx solid #f5f5f4;
|
||||
border-radius: 32rpx;
|
||||
background: #fafaf9;
|
||||
}
|
||||
.standard-icon {
|
||||
display: block;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin: 0 auto 8rpx;
|
||||
}
|
||||
.standard-title,
|
||||
.standard-detail {
|
||||
display: block;
|
||||
}
|
||||
.standard-title {
|
||||
color: #292524;
|
||||
font-size: 22rpx;
|
||||
line-height: 70rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.card {
|
||||
margin-top: 18rpx;
|
||||
padding: 26rpx;
|
||||
border: 1rpx solid #f2d9c6;
|
||||
border-radius: 22rpx;
|
||||
background: #fff;
|
||||
color: #7a6a60;
|
||||
font-size: 22rpx;
|
||||
line-height: 1.7;
|
||||
.standard-detail {
|
||||
margin-top: 4rpx;
|
||||
color: #a8a29e;
|
||||
font-size: 18rpx;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.card-title {
|
||||
margin-bottom: 10rpx;
|
||||
color: #4b2b1d;
|
||||
font-size: 27rpx;
|
||||
.credential-copy {
|
||||
margin-top: 24rpx;
|
||||
padding-top: 24rpx;
|
||||
border-top: 1rpx solid #f5f5f4;
|
||||
}
|
||||
.credential-title {
|
||||
display: block;
|
||||
margin-bottom: 8rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
@@ -4,7 +4,10 @@ const { openPage } = require("../../utils/navigation");
|
||||
Page({
|
||||
data: {
|
||||
brand: {},
|
||||
trustItems: [],
|
||||
credentials: [],
|
||||
cases: [],
|
||||
promises: [],
|
||||
presentation: {},
|
||||
records: [],
|
||||
error: "",
|
||||
},
|
||||
@@ -13,7 +16,19 @@ Page({
|
||||
.then((workspace) =>
|
||||
this.setData({
|
||||
brand: workspace.brand || {},
|
||||
trustItems: workspace.trustItems || [],
|
||||
presentation: workspace.brand?.visualPresentation?.profile || {},
|
||||
credentials: (workspace.trustItems || []).filter((item) => item.type === "credential"),
|
||||
cases: (workspace.trustItems || [])
|
||||
.filter((item) => item.type === "case")
|
||||
.map((item) => ({
|
||||
...item,
|
||||
entries: (item.config?.entries || []).map((entry, index) => ({
|
||||
...entry,
|
||||
index,
|
||||
tone: index % 3,
|
||||
})),
|
||||
})),
|
||||
promises: (workspace.trustItems || []).filter((item) => item.type === "promise"),
|
||||
records: [],
|
||||
}),
|
||||
)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"navigationBarTitleText": "我的订单",
|
||||
"navigationBarTitleText": "主理人",
|
||||
"navigationBarBackgroundColor": "#FBF7F1",
|
||||
"navigationBarTextStyle": "black",
|
||||
"usingComponents": {
|
||||
|
||||
@@ -1 +1,35 @@
|
||||
<view class="page"><view wx:if="{{error}}" class="runtime-error">{{error}}</view><block wx:else><acheng-profile brand="{{brand}}" presentation="{{brand.visualPresentation.profile}}" records-count="{{records.length}}" bind:call="call" bind:copy="copyWechat" bind:records="recordsPage" /><block wx:for="{{trustItems}}" wx:key="title"><view wx:if="{{item.type === 'coverage' || item.type === 'credential' || item.type === 'case' || item.type === 'promise'}}" class="card"><text class="card-title">{{item.title}}</text><text wx:if="{{item.summary}}">{{item.summary}}</text><text>{{item.content}}</text></view></block></block></view>
|
||||
<view class="page">
|
||||
<view wx:if="{{error}}" class="runtime-error">{{error}}</view>
|
||||
<block wx:else>
|
||||
<acheng-profile brand="{{brand}}" credentials="{{credentials}}" presentation="{{presentation}}" />
|
||||
<view wx:for="{{cases}}" wx:key="id" class="case-card">
|
||||
<view class="section-heading"><image class="heading-icon" src="/assets/owner/handshake.png" /><text>{{item.title}}</text></view>
|
||||
<text wx:if="{{item.summary}}" class="summary">{{item.summary}}</text>
|
||||
<view wx:if="{{item.entries.length}}" class="case-list">
|
||||
<view wx:for="{{item.entries}}" wx:for-item="entry" wx:key="index" class="case-row tone-{{entry.tone}}">
|
||||
<view class="case-badge">{{entry.badge}}</view>
|
||||
<view class="case-copy"><text class="case-title">{{entry.title}}</text><text wx:if="{{entry.detail}}" class="case-detail">{{entry.detail}}</text></view>
|
||||
<text wx:if="{{entry.result}}" class="case-result">{{entry.result}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<text wx:elif="{{item.content}}" class="content">{{item.content}}</text>
|
||||
</view>
|
||||
<view wx:for="{{promises}}" wx:key="id" class="promise-card">
|
||||
<view class="section-heading"><image class="promise-icon" src="/assets/owner/clock.png" /><text>{{item.title}}</text></view>
|
||||
<text wx:if="{{item.summary}}" class="summary">{{item.summary}}</text>
|
||||
<view wx:if="{{item.config.commitments.length}}" class="commitment-list">
|
||||
<view wx:for="{{item.config.commitments}}" wx:for-item="commitment" wx:key="label" class="commitment">
|
||||
<view class="dot"/><view class="commitment-copy"><text class="commitment-label">{{commitment.label}}:</text><text>{{commitment.detail}}</text><text wx:if="{{commitment.highlight}}" class="highlight">{{commitment.highlight}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<text wx:elif="{{item.content}}" class="content">{{item.content}}</text>
|
||||
</view>
|
||||
<view class="utilities">
|
||||
<view wx:if="{{brand.contactPhone || brand.contactWechat}}" class="contact-actions">
|
||||
<button wx:if="{{brand.contactPhone}}" bindtap="call">电话联系</button>
|
||||
<button wx:if="{{brand.contactWechat}}" bindtap="copyWechat">复制微信</button>
|
||||
</view>
|
||||
<view class="records-entry" bindtap="recordsPage"><text>{{presentation.recordsTitle || '我的咨询记录'}}</text><text>{{records.length}} {{presentation.recordsCountUnit || '条记录'}} ›</text></view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
@@ -1,197 +1,195 @@
|
||||
.page {
|
||||
min-height: 100vh;
|
||||
padding: 28rpx 32rpx 56rpx;
|
||||
background: #f7f5f1;
|
||||
color: #252525;
|
||||
box-sizing: border-box;
|
||||
padding: 32rpx 32rpx 64rpx;
|
||||
background: #fafaf9;
|
||||
color: #292524;
|
||||
}
|
||||
.runtime-error {
|
||||
margin: 48rpx 0;
|
||||
padding: 28rpx;
|
||||
border: 1rpx solid #e6ded5;
|
||||
border-radius: 14rpx;
|
||||
border-radius: 24rpx;
|
||||
background: #fff;
|
||||
color: #8a6846;
|
||||
font-size: 25rpx;
|
||||
color: #9a3412;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.case-card,
|
||||
.promise-card {
|
||||
margin-top: 32rpx;
|
||||
padding: 32rpx;
|
||||
border: 1rpx solid #f5f5f4;
|
||||
border-radius: 48rpx;
|
||||
background: #fff;
|
||||
box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
.section-heading {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16rpx;
|
||||
color: #1c1917;
|
||||
font-size: 28rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.heading-icon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.summary {
|
||||
display: block;
|
||||
margin: 8rpx 0 24rpx;
|
||||
color: #78716c;
|
||||
font-size: 22rpx;
|
||||
line-height: 1.6;
|
||||
}
|
||||
.contact-card {
|
||||
padding: 34rpx 30rpx;
|
||||
background: #202221;
|
||||
color: #fff;
|
||||
border-radius: 18rpx;
|
||||
.content {
|
||||
display: block;
|
||||
margin-top: 16rpx;
|
||||
font-size: 22rpx;
|
||||
line-height: 1.65;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
.identity {
|
||||
.case-list {
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
.case-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20rpx;
|
||||
margin-top: 16rpx;
|
||||
padding: 20rpx;
|
||||
border: 1rpx solid #f5f5f4;
|
||||
border-radius: 32rpx;
|
||||
background: #fafaf9;
|
||||
}
|
||||
.avatar {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
border: 2rpx solid #8a6846;
|
||||
border-radius: 50%;
|
||||
.case-row:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
.case-badge {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #d9c8b2;
|
||||
font: 42rpx serif;
|
||||
}
|
||||
.founder {
|
||||
display: block;
|
||||
font: 34rpx serif;
|
||||
}
|
||||
.role {
|
||||
display: block;
|
||||
margin-top: 8rpx;
|
||||
color: #d9c8b2;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
.contact-line {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 22rpx;
|
||||
padding-top: 18rpx;
|
||||
border-top: 1rpx solid rgba(255, 255, 255, 0.12);
|
||||
color: #aaa;
|
||||
font-size: 23rpx;
|
||||
}
|
||||
.contact-line > view {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10rpx;
|
||||
color: #fff;
|
||||
}
|
||||
.contact-line button {
|
||||
margin: 0;
|
||||
padding: 0 14rpx;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
color: #d9c8b2;
|
||||
font-size: 21rpx;
|
||||
}
|
||||
.records-entry,
|
||||
.info-card {
|
||||
margin-top: 20rpx;
|
||||
padding: 28rpx;
|
||||
background: #fff;
|
||||
border: 1rpx solid #e6ded5;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
.records-entry {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.records-entry text:last-child {
|
||||
color: #8a6846;
|
||||
}
|
||||
.card-title {
|
||||
display: block;
|
||||
flex-shrink: 0;
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
border-radius: 24rpx;
|
||||
background: #ffedd5;
|
||||
color: #ea580c;
|
||||
font-size: 24rpx;
|
||||
font-weight: 700;
|
||||
font-size: 27rpx;
|
||||
}
|
||||
.proof-grid {
|
||||
display: flex;
|
||||
gap: 12rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.proof-grid view {
|
||||
.case-copy {
|
||||
flex: 1;
|
||||
padding: 18rpx 8rpx;
|
||||
text-align: center;
|
||||
border-radius: 18rpx;
|
||||
background: #fff;
|
||||
border: 1rpx solid #f2d9c6;
|
||||
min-width: 0;
|
||||
}
|
||||
.proof-grid text {
|
||||
.case-title {
|
||||
display: block;
|
||||
color: #7a6a60;
|
||||
font-size: 18rpx;
|
||||
color: #1c1917;
|
||||
font-size: 22rpx;
|
||||
font-weight: 700;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.proof-grid .proof-icon {
|
||||
color: #e87532;
|
||||
font-size: 30rpx;
|
||||
.case-detail {
|
||||
display: block;
|
||||
margin-top: 4rpx;
|
||||
color: #a8a29e;
|
||||
font-size: 20rpx;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.promise {
|
||||
margin-top: 18rpx;
|
||||
padding: 22rpx;
|
||||
border-radius: 20rpx;
|
||||
background: #fff3d8;
|
||||
color: #8c5c39;
|
||||
font-size: 21rpx;
|
||||
.case-result {
|
||||
flex-shrink: 0;
|
||||
max-width: 110rpx;
|
||||
padding: 4rpx 16rpx;
|
||||
border-radius: 99rpx;
|
||||
background: #ecfdf5;
|
||||
color: #059669;
|
||||
font-size: 20rpx;
|
||||
line-height: 1.5;
|
||||
text-align: center;
|
||||
}
|
||||
.tone-1 .case-badge {
|
||||
background: #dbeafe;
|
||||
color: #2563eb;
|
||||
}
|
||||
.tone-1 .case-result {
|
||||
background: #eff6ff;
|
||||
color: #2563eb;
|
||||
}
|
||||
.tone-2 .case-badge {
|
||||
background: #f3e8ff;
|
||||
color: #9333ea;
|
||||
}
|
||||
.tone-2 .case-result {
|
||||
background: #faf5ff;
|
||||
color: #9333ea;
|
||||
}
|
||||
.promise-card {
|
||||
border-color: #fde68a;
|
||||
background: rgba(255, 251, 235, 0.8);
|
||||
color: #78350f;
|
||||
box-shadow: none;
|
||||
}
|
||||
.promise-card .section-heading {
|
||||
gap: 12rpx;
|
||||
color: #78350f;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.promise-icon {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.commitment-list {
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
.commitment {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 16rpx;
|
||||
margin-top: 12rpx;
|
||||
color: #78350f;
|
||||
font-size: 22rpx;
|
||||
line-height: 1.6;
|
||||
}
|
||||
.note,
|
||||
.bullet {
|
||||
display: block;
|
||||
margin-top: 16rpx;
|
||||
color: #77736b;
|
||||
font-size: 24rpx;
|
||||
line-height: 1.75;
|
||||
.dot {
|
||||
flex-shrink: 0;
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
margin-top: 12rpx;
|
||||
border-radius: 50%;
|
||||
background: #f59e0b;
|
||||
}
|
||||
.entry-icon {
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
border-radius: 12rpx;
|
||||
background: rgba(138, 104, 70, 0.1);
|
||||
color: #8a6846;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.records-entry {
|
||||
align-items: center;
|
||||
gap: 18rpx;
|
||||
}
|
||||
.entry-copy {
|
||||
.commitment-copy {
|
||||
flex: 1;
|
||||
}
|
||||
.entry-copy text {
|
||||
display: block;
|
||||
}
|
||||
.entry-copy text:last-child {
|
||||
margin-top: 8rpx;
|
||||
color: #77736b;
|
||||
font-size: 21rpx;
|
||||
}
|
||||
.count {
|
||||
color: #8a6846;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
.card-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12rpx;
|
||||
color: #202221;
|
||||
}
|
||||
.note {
|
||||
padding: 20rpx;
|
||||
background: #f7f5f1;
|
||||
border: 1rpx solid #e6ded5;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
.note-title {
|
||||
display: block;
|
||||
margin-bottom: 6rpx;
|
||||
color: #202221;
|
||||
.commitment-label {
|
||||
font-weight: 700;
|
||||
}
|
||||
.bullet {
|
||||
padding-left: 8rpx;
|
||||
.highlight {
|
||||
margin-left: 8rpx;
|
||||
color: #ea580c;
|
||||
font-weight: 700;
|
||||
}
|
||||
.contact-line button {
|
||||
.utilities {
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
.contact-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6rpx;
|
||||
height: 44rpx;
|
||||
line-height: 44rpx;
|
||||
white-space: nowrap;
|
||||
gap: 16rpx;
|
||||
}
|
||||
.contact-line button t-icon {
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
.contact-actions button {
|
||||
flex: 1;
|
||||
margin: 0;
|
||||
border-radius: 24rpx;
|
||||
background: #fff7ed;
|
||||
color: #c2410c;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.page {
|
||||
padding-bottom: 150rpx;
|
||||
.records-entry {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 28rpx 4rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.records-entry text:last-child {
|
||||
color: #78716c;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<view class="page">
|
||||
<view wx:if="{{error}}" class="runtime-error">{{error}}</view>
|
||||
<acheng-home wx:else brand="{{brand}}" presentation="{{presentation}}" trust-content="{{trustContent}}" offerings="{{offerings}}" bind:select="selectOffering" bind:inquiry="goInquiry" bind:offerings="goWorks" bind:service="goService" />
|
||||
<acheng-home wx:else brand="{{brand}}" presentation="{{presentation}}" trust-items="{{trustItems}}" offerings="{{offerings}}" bind:select="selectOffering" bind:inquiry="goInquiry" bind:offerings="goWorks" bind:service="goService" />
|
||||
</view>
|
||||
@@ -31,14 +31,15 @@ Page({
|
||||
// 字段全部来自后台已发布的咨询表单,模板只负责呈现。
|
||||
fields: [],
|
||||
values: {},
|
||||
displayValues: {},
|
||||
formId: "",
|
||||
submitting: false,
|
||||
formError: "",
|
||||
presentation: {},
|
||||
},
|
||||
onLoad(options) {
|
||||
this.offeringId = options.offeringId || "";
|
||||
loadWorkspaceWithFallback()
|
||||
this.offeringId = options?.offeringId || "";
|
||||
return loadWorkspaceWithFallback()
|
||||
.then((workspace) => {
|
||||
this.forms = workspace.inquiryForms || [];
|
||||
this.setData({ presentation: workspace.brand?.visualPresentation?.inquiry || {} });
|
||||
@@ -54,8 +55,15 @@ Page({
|
||||
forms.find((item) => item.target === "brand") ||
|
||||
forms[0];
|
||||
const formId = form?.key || form?.id || "";
|
||||
if (formId !== this.data.formId)
|
||||
this.setData({ formId, fields: form?.fields || [], values: {} });
|
||||
if (formId !== this.data.formId) {
|
||||
// 原型中的类型选项为按钮网格,人数/日期和预算/配送各占半行;数据与文案仍来自已发布表单。
|
||||
const fields = (form?.fields || []).map((field) => ({
|
||||
...field,
|
||||
useChips: field.key === "type" && (field.type === "select" || field.type === "radio"),
|
||||
halfWidth: ["people", "date", "budget", "delivery"].includes(field.key),
|
||||
}));
|
||||
this.setData({ formId, fields, values: {}, displayValues: {} });
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
// 本页是 tabBar 页,从详情页进入时参数经 openPage 暂存,而不是通过 onLoad 传入。
|
||||
@@ -90,10 +98,21 @@ Page({
|
||||
switchToForm() {
|
||||
this.setData({ subView: "form" });
|
||||
},
|
||||
chooseChip(e) {
|
||||
const { key, value } = e.currentTarget.dataset;
|
||||
this.setData({ ["values." + key]: value });
|
||||
},
|
||||
choose(e) {
|
||||
const field = this.data.fields.find((item) => item.key === e.currentTarget.dataset.key);
|
||||
const option = field?.options?.[Number(e.detail.value)];
|
||||
if (option) this.setData({ ["values." + field.key]: option.value });
|
||||
if (option)
|
||||
this.setData({
|
||||
["values." + field.key]: option.value,
|
||||
["displayValues." + field.key]: option.label,
|
||||
});
|
||||
},
|
||||
checkboxChange(e) {
|
||||
this.setData({ ["values." + e.currentTarget.dataset.key]: e.detail.value });
|
||||
},
|
||||
input(e) {
|
||||
this.setData({ ["values." + e.currentTarget.dataset.key]: e.detail.value });
|
||||
@@ -101,7 +120,11 @@ Page({
|
||||
submit() {
|
||||
const { values, formId, fields } = this.data;
|
||||
const missing = fields.find(
|
||||
(field) => field.required && (values[field.key] === undefined || values[field.key] === ""),
|
||||
(field) =>
|
||||
field.required &&
|
||||
(values[field.key] === undefined ||
|
||||
values[field.key] === "" ||
|
||||
(Array.isArray(values[field.key]) && !values[field.key].length)),
|
||||
);
|
||||
if (missing) return this.setData({ formError: "请填写" + missing.label });
|
||||
if (!formId) return this.setData({ formError: "咨询表单暂不可用,请稍后重试" });
|
||||
|
||||
@@ -4,12 +4,16 @@
|
||||
<view class="form-card">
|
||||
<text class="form-title">{{presentation.title || '咨询 / 预订'}}</text>
|
||||
<text wx:if="{{presentation.subtitle}}" class="form-desc">{{presentation.subtitle}}</text>
|
||||
<view wx:for="{{fields}}" wx:key="key" class="field">
|
||||
<text class="label">{{item.label}} <b wx:if="{{item.required}}">*</b></text>
|
||||
<picker wx:if="{{item.type === 'select' || item.type === 'radio'}}" range="{{item.options}}" range-key="label" data-key="{{item.key}}" bindchange="choose"><view class="picker">{{values[item.key] || '请选择' + item.label}}</view></picker>
|
||||
<view class="form-fields">
|
||||
<view wx:for="{{fields}}" wx:key="key" class="field {{item.halfWidth ? 'field-half' : ''}}">
|
||||
<text class="label">{{item.label}} <text wx:if="{{item.required}}" class="required">*</text></text>
|
||||
<view wx:if="{{item.useChips}}" class="type-grid"><view wx:for="{{item.options}}" wx:for-item="option" wx:key="value" class="type-option {{values[item.key] === option.value ? 'selected' : ''}}" data-key="{{item.key}}" data-value="{{option.value}}" bindtap="chooseChip">{{option.label}}</view></view>
|
||||
<picker wx:elif="{{item.type === 'select' || item.type === 'radio'}}" range="{{item.options}}" range-key="label" data-key="{{item.key}}" bindchange="choose"><view class="picker">{{displayValues[item.key] || '请选择' + item.label}}</view></picker>
|
||||
<picker wx:elif="{{item.type === 'date'}}" mode="date" value="{{values[item.key]}}" data-key="{{item.key}}" bindchange="input"><view class="picker">{{values[item.key] || '请选择日期'}}</view></picker>
|
||||
<textarea wx:elif="{{item.type === 'textarea'}}" value="{{values[item.key]}}" data-key="{{item.key}}" bindinput="input" placeholder="{{item.placeholder || '请填写' + item.label}}" />
|
||||
<input wx:else type="{{item.type === 'number' ? 'number' : 'text'}}" value="{{values[item.key]}}" data-key="{{item.key}}" bindinput="input" placeholder="{{item.placeholder || '请填写' + item.label}}" />
|
||||
<checkbox-group wx:elif="{{item.type === 'multi-select' || item.type === 'checkbox'}}" data-key="{{item.key}}" bindchange="checkboxChange"><label wx:for="{{item.options}}" wx:for-item="option" wx:key="value"><checkbox value="{{option.value}}" />{{option.label}}</label></checkbox-group>
|
||||
<input wx:else type="{{item.type === 'number' || item.type === 'phone' || item.type === 'tel' ? 'number' : 'text'}}" value="{{values[item.key]}}" data-key="{{item.key}}" bindinput="input" placeholder="{{item.placeholder || '请填写' + item.label}}" />
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{formError}}" class="error">! {{formError}}</view>
|
||||
<view wx:if="{{presentation.promise}}" class="promise"><text>{{presentation.promise}}</text></view>
|
||||
@@ -23,7 +27,7 @@
|
||||
<view class="history-head"><text class="record-id">单号 #{{item.id}}</text><text class="record-status">{{item.status}}</text></view>
|
||||
<text class="history-title">{{item.title}}</text>
|
||||
<text wx:for="{{item.summary}}" wx:for-item="line" wx:key="key">{{line.label}}:{{line.value}}</text>
|
||||
<view wx:if="{{item.replyNote}}" class="reply"><b>处理回复:</b>{{item.replyNote}}</view>
|
||||
<view wx:if="{{item.replyNote}}" class="reply"><text class="reply-label">处理回复:</text>{{item.replyNote}}</view>
|
||||
<view class="history-foot">提交时间:{{item.createdAt}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.page {
|
||||
min-height: 100vh;
|
||||
padding: 28rpx 32rpx 150rpx;
|
||||
padding: 32rpx 32rpx 64rpx;
|
||||
background: #f7f5f1;
|
||||
color: #292725;
|
||||
}
|
||||
@@ -18,7 +18,7 @@
|
||||
.sub-tab {
|
||||
flex: 1;
|
||||
padding: 18rpx 4rpx;
|
||||
border-radius: 14rpx;
|
||||
border-radius: 24rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.sub-tab.active {
|
||||
@@ -27,35 +27,45 @@
|
||||
box-shadow: 0 4rpx 10rpx rgba(60, 45, 30, 0.08);
|
||||
}
|
||||
.form-card {
|
||||
padding: 30rpx 28rpx;
|
||||
padding: 32rpx;
|
||||
border: 1rpx solid #eee9e3;
|
||||
border-radius: 28rpx;
|
||||
border-radius: 48rpx;
|
||||
background: #fff;
|
||||
box-shadow: 0 8rpx 20rpx rgba(60, 45, 30, 0.035);
|
||||
}
|
||||
.form-title {
|
||||
display: block;
|
||||
color: #282522;
|
||||
font-size: 30rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.form-desc {
|
||||
display: block;
|
||||
margin-top: 8rpx;
|
||||
color: #8e877f;
|
||||
font-size: 19rpx;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
.form-fields {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
||||
gap: 28rpx 16rpx;
|
||||
margin-top: 28rpx;
|
||||
}
|
||||
.field {
|
||||
margin-top: 26rpx;
|
||||
grid-column: span 2;
|
||||
min-width: 0;
|
||||
}
|
||||
.field-half {
|
||||
grid-column: span 1;
|
||||
}
|
||||
.label {
|
||||
display: block;
|
||||
margin-bottom: 12rpx;
|
||||
color: #4b4640;
|
||||
font-size: 21rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.label b {
|
||||
.required {
|
||||
color: #e35237;
|
||||
}
|
||||
.type-grid {
|
||||
@@ -66,10 +76,10 @@
|
||||
.type-option {
|
||||
padding: 17rpx 6rpx;
|
||||
border: 1rpx solid #e5e0da;
|
||||
border-radius: 14rpx;
|
||||
border-radius: 24rpx;
|
||||
background: #fbfaf8;
|
||||
color: #686159;
|
||||
font-size: 18rpx;
|
||||
font-size: 22rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.type-option.selected {
|
||||
@@ -92,26 +102,28 @@ textarea,
|
||||
min-height: 76rpx;
|
||||
padding: 20rpx;
|
||||
border: 1rpx solid #e6e0d9;
|
||||
border-radius: 14rpx;
|
||||
border-radius: 24rpx;
|
||||
background: #fbfaf8;
|
||||
color: #59534c;
|
||||
font-size: 19rpx;
|
||||
font-size: 22rpx;
|
||||
line-height: 1.5;
|
||||
}
|
||||
textarea {
|
||||
min-height: 120rpx;
|
||||
}
|
||||
.picker {
|
||||
white-space: normal;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.error {
|
||||
margin-top: 22rpx;
|
||||
padding: 16rpx;
|
||||
border: 1rpx solid #f4c5bc;
|
||||
border-radius: 14rpx;
|
||||
border-radius: 24rpx;
|
||||
background: #fff2f0;
|
||||
color: #c34131;
|
||||
font-size: 19rpx;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
.promise {
|
||||
display: flex;
|
||||
@@ -123,7 +135,7 @@ textarea {
|
||||
border-radius: 16rpx;
|
||||
background: #faf9f7;
|
||||
color: #7b746c;
|
||||
font-size: 18rpx;
|
||||
font-size: 22rpx;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.promise:first-letter {
|
||||
@@ -165,7 +177,7 @@ textarea {
|
||||
border-radius: 16rpx;
|
||||
background: #f18029;
|
||||
color: #fff;
|
||||
font-size: 21rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 70rpx;
|
||||
}
|
||||
.history-card {
|
||||
@@ -178,7 +190,7 @@ textarea {
|
||||
border-radius: 24rpx;
|
||||
background: #fff;
|
||||
color: #716a62;
|
||||
font-size: 19rpx;
|
||||
font-size: 22rpx;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.history-head {
|
||||
@@ -190,7 +202,7 @@ textarea {
|
||||
.record-id {
|
||||
color: #a39c94;
|
||||
font-family: monospace;
|
||||
font-size: 18rpx;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
.record-status {
|
||||
padding: 5rpx 12rpx;
|
||||
@@ -207,11 +219,11 @@ textarea {
|
||||
.reply {
|
||||
padding: 16rpx;
|
||||
border: 1rpx solid #f5d8bc;
|
||||
border-radius: 14rpx;
|
||||
border-radius: 24rpx;
|
||||
background: #fff8ef;
|
||||
color: #6f5744;
|
||||
}
|
||||
.reply b {
|
||||
.reply-label {
|
||||
color: #e2762c;
|
||||
}
|
||||
.history-foot {
|
||||
|
||||
@@ -1,18 +1,71 @@
|
||||
const { loadWorkspaceWithFallback } = require("../../utils/runtime-workspace");
|
||||
const { openPage } = require("../../utils/navigation");
|
||||
// 每种内容对应一个固定视觉区域,按已配置记录优先选择,避免旧记录遮住编辑结果。
|
||||
function selectSlot(items, type) {
|
||||
return (
|
||||
items
|
||||
.filter((item) => item.type === type)
|
||||
.sort(
|
||||
(a, b) =>
|
||||
Number(Object.keys(b.config || {}).length > 0) -
|
||||
Number(Object.keys(a.config || {}).length > 0),
|
||||
)[0] || null
|
||||
);
|
||||
}
|
||||
Page({
|
||||
data: { brand: {}, presentation: {}, trustItems: [], loading: true },
|
||||
data: {
|
||||
brand: {},
|
||||
presentation: {},
|
||||
schedule: null,
|
||||
coverage: null,
|
||||
process: null,
|
||||
loading: true,
|
||||
error: false,
|
||||
},
|
||||
onLoad() {
|
||||
loadWorkspaceWithFallback()
|
||||
.then((workspace) =>
|
||||
this.load();
|
||||
},
|
||||
load() {
|
||||
this.setData({ loading: true, error: false });
|
||||
return loadWorkspaceWithFallback()
|
||||
.then((workspace) => {
|
||||
const items = workspace.trustItems || [];
|
||||
const schedule = selectSlot(items, "schedule");
|
||||
const coverage = selectSlot(items, "coverage");
|
||||
const process = selectSlot(items, "process");
|
||||
const config = schedule?.config || {};
|
||||
const rows = [
|
||||
{
|
||||
title: config.weekdayLabel,
|
||||
detail: config.weekdayDetail,
|
||||
hours: config.weekdayHours,
|
||||
tag: config.weekdayTag,
|
||||
tone: "orange",
|
||||
},
|
||||
{
|
||||
title: config.weekendLabel,
|
||||
detail: config.weekendDetail,
|
||||
hours: config.weekendHours,
|
||||
tag: config.weekendTag,
|
||||
tone: "blue",
|
||||
},
|
||||
].filter((row) => row.title && row.detail);
|
||||
const steps = Array.isArray(process?.config?.steps)
|
||||
? process.config.steps
|
||||
.filter((step) => step.title && step.detail)
|
||||
.map((step, index) => ({ ...step, index }))
|
||||
: [];
|
||||
this.setData({
|
||||
brand: workspace.brand || {},
|
||||
presentation: workspace.brand?.visualPresentation?.service || {},
|
||||
trustItems: workspace.trustItems || [],
|
||||
schedule: rows.length ? { ...schedule, rows } : null,
|
||||
coverage:
|
||||
coverage?.config?.pickupDetail && coverage?.config?.deliveryDetail ? coverage : null,
|
||||
process: steps.length ? { ...process, steps } : null,
|
||||
loading: false,
|
||||
}),
|
||||
)
|
||||
.catch(() => this.setData({ loading: false }));
|
||||
});
|
||||
})
|
||||
.catch(() => this.setData({ loading: false, error: true }));
|
||||
},
|
||||
inquire() {
|
||||
openPage("/pages/inquiry/index");
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
<view class="page service-page">
|
||||
<block wx:for="{{trustItems}}" wx:key="title">
|
||||
<view wx:if="{{item.type === 'schedule'}}" class="service-card"><view class="card-head"><view class="head-title"><text class="icon">◷</text><text>{{item.title}}</text></view></view><view class="schedule schedule-primary"><view class="schedule-main"><view class="schedule-title"><text class="dot orange"></text><text>{{item.summary || item.title}}</text></view><text class="schedule-line">{{item.content}}</text></view></view></view>
|
||||
<view wx:if="{{item.type === 'coverage'}}" class="service-card"><view class="card-title"><text class="icon">⌁</text><text>{{item.title}}</text></view><view class="delivery-grid"><view class="delivery-item"><text class="delivery-title orange-text">{{presentation.coverageLabel || '服务范围'}}</text><text>{{item.content}}</text></view></view></view>
|
||||
<view wx:if="{{item.type === 'process'}}" class="service-card process-card"><view class="card-title"><text class="icon">☷</text><text>{{item.title}}</text></view><text wx:if="{{item.summary}}" class="card-sub">{{item.summary}}</text><view class="steps"><view wx:for="{{item.lines}}" wx:for-item="step" wx:key="*this" class="step"><text class="step-no">{{index + 1}}</text><view><text class="step-title">{{presentation.stepLabel || '步骤'}} {{index + 1}}</text><text>{{step}}</text></view></view></view><view class="process-foot"><text>{{item.content}}</text><button bindtap="inquire">{{presentation.processAction || '立即咨询'}} <text>→</text></button></view></view>
|
||||
<view wx:if="{{loading}}" class="empty-state">正在加载出摊服务…</view>
|
||||
<view wx:elif="{{error}}" class="empty-state">服务信息加载失败<button bindtap="load">重试</button></view>
|
||||
<block wx:else>
|
||||
<view wx:if="{{schedule}}" class="service-card schedule-card">
|
||||
<view class="card-head"><view class="head-title"><image class="icon" src="../../assets/service/clock.png" /><text>{{schedule.title}}</text></view><text wx:if="{{schedule.config.status}}" class="status-pill">{{schedule.config.status}}</text></view>
|
||||
<view wx:for="{{schedule.rows}}" wx:for-item="row" wx:key="tone" class="schedule {{row.tone === 'blue' ? 'schedule-weekend' : 'schedule-primary'}}">
|
||||
<view class="schedule-row-head"><view class="schedule-title"><text class="dot {{row.tone}}"></text><text>{{row.title}}</text></view><text wx:if="{{row.tag}}" class="schedule-tag {{row.tone === 'blue' ? 'blue-tag' : 'orange-tag'}}">{{row.tag}}</text></view>
|
||||
<text class="schedule-line">{{row.detail}}</text><text wx:if="{{row.hours}}" class="schedule-muted">{{row.hours}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{coverage}}" class="service-card coverage-card"><view class="simple-title"><image class="icon" src="../../assets/service/bike.png" /><text>{{coverage.title}}</text></view><view class="delivery-grid"><view class="delivery-item"><view class="delivery-title"><image class="small-icon" src="../../assets/service/footprints.png" /><text>{{coverage.config.pickupTitle}}</text></view><text>{{coverage.config.pickupDetail}}</text></view><view class="delivery-item"><view class="delivery-title"><image class="small-icon" src="../../assets/service/bike-blue.png" /><text>{{coverage.config.deliveryTitle}}</text></view><text>{{coverage.config.deliveryDetail}}</text></view></view></view>
|
||||
<view wx:if="{{process}}" class="service-card process-card"><view class="simple-title"><image class="icon" src="../../assets/service/list.png" /><text>{{process.title}}</text></view><text wx:if="{{process.config.intro}}" class="card-sub">{{process.config.intro}}</text><view class="steps"><view wx:for="{{process.steps}}" wx:for-item="step" wx:key="index" class="step"><text class="step-no">{{index + 1}}</text><view><text class="step-title">{{step.title}}</text><text>{{step.detail}}</text></view></view></view><view class="process-foot"><view><text wx:if="{{process.config.minimumNote}}">{{process.config.minimumNote}}</text><text wx:if="{{process.config.minimumNote && process.config.refundNote}}" class="divider">|</text><text wx:if="{{process.config.refundNote}}">{{process.config.refundNote}}</text></view><button bindtap="inquire">{{presentation.processAction || '立即咨询'}} <text>→</text></button></view></view>
|
||||
<view wx:if="{{!schedule && !coverage && !process}}" class="empty-state">出摊服务信息正在完善中</view>
|
||||
</block>
|
||||
</view>
|
||||
@@ -1,14 +1,14 @@
|
||||
.page {
|
||||
min-height: 100vh;
|
||||
padding: 28rpx 32rpx 150rpx;
|
||||
padding: 32rpx 32rpx 64rpx;
|
||||
background: #f7f5f1;
|
||||
color: #292725;
|
||||
}
|
||||
.service-card {
|
||||
margin-bottom: 24rpx;
|
||||
padding: 30rpx 28rpx;
|
||||
margin-bottom: 28rpx;
|
||||
padding: 32rpx;
|
||||
border: 1rpx solid #eee9e3;
|
||||
border-radius: 28rpx;
|
||||
border-radius: 48rpx;
|
||||
background: #fff;
|
||||
box-shadow: 0 8rpx 20rpx rgba(60, 45, 30, 0.035);
|
||||
}
|
||||
@@ -20,9 +20,17 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.simple-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16rpx;
|
||||
color: #302d29;
|
||||
font-size: 28rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.card-head {
|
||||
justify-content: space-between;
|
||||
padding-bottom: 22rpx;
|
||||
padding-bottom: 24rpx;
|
||||
border-bottom: 1rpx solid #eeeae5;
|
||||
}
|
||||
.head-title,
|
||||
@@ -46,13 +54,10 @@
|
||||
font-size: 20rpx;
|
||||
}
|
||||
.schedule {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 12rpx;
|
||||
margin-top: 22rpx;
|
||||
padding: 22rpx 18rpx;
|
||||
margin-top: 20rpx;
|
||||
padding: 24rpx;
|
||||
border: 1rpx solid #f1ddd0;
|
||||
border-radius: 20rpx;
|
||||
border-radius: 32rpx;
|
||||
}
|
||||
.schedule-primary {
|
||||
background: #fffaf6;
|
||||
@@ -67,7 +72,7 @@
|
||||
.schedule-title {
|
||||
gap: 12rpx;
|
||||
color: #272522;
|
||||
font-size: 22rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.dot {
|
||||
@@ -88,13 +93,13 @@
|
||||
margin-top: 12rpx;
|
||||
margin-left: 26rpx;
|
||||
color: #655e56;
|
||||
font-size: 20rpx;
|
||||
font-size: 22rpx;
|
||||
line-height: 1.45;
|
||||
}
|
||||
.schedule-muted {
|
||||
margin-top: 5rpx;
|
||||
color: #9a948c;
|
||||
font-size: 18rpx;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
.schedule-tag {
|
||||
height: max-content;
|
||||
@@ -114,22 +119,22 @@
|
||||
.delivery-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 18rpx;
|
||||
margin-top: 22rpx;
|
||||
gap: 20rpx;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
.delivery-item {
|
||||
padding: 20rpx;
|
||||
padding: 24rpx;
|
||||
border: 1rpx solid #eeeae5;
|
||||
border-radius: 20rpx;
|
||||
border-radius: 32rpx;
|
||||
background: #fbfaf8;
|
||||
color: #777169;
|
||||
font-size: 19rpx;
|
||||
font-size: 22rpx;
|
||||
line-height: 1.6;
|
||||
}
|
||||
.delivery-title {
|
||||
display: block;
|
||||
margin-bottom: 8rpx;
|
||||
font-size: 22rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.orange-text {
|
||||
@@ -142,10 +147,10 @@
|
||||
display: block;
|
||||
margin-top: 12rpx;
|
||||
color: #8b857e;
|
||||
font-size: 19rpx;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
.steps {
|
||||
margin: 24rpx 0 0 14rpx;
|
||||
margin: 28rpx 0 0 16rpx;
|
||||
padding-left: 26rpx;
|
||||
border-left: 3rpx solid #f7cda9;
|
||||
}
|
||||
@@ -155,7 +160,7 @@
|
||||
gap: 18rpx;
|
||||
margin-bottom: 26rpx;
|
||||
color: #79736c;
|
||||
font-size: 19rpx;
|
||||
font-size: 22rpx;
|
||||
line-height: 1.55;
|
||||
}
|
||||
.step:last-child {
|
||||
@@ -173,24 +178,24 @@
|
||||
border-radius: 50%;
|
||||
background: #ef7c26;
|
||||
color: #fff;
|
||||
font-size: 18rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.step-title {
|
||||
display: block;
|
||||
margin-bottom: 5rpx;
|
||||
color: #3d3934;
|
||||
font-size: 22rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.process-foot {
|
||||
justify-content: space-between;
|
||||
gap: 12rpx;
|
||||
margin-top: 28rpx;
|
||||
padding-top: 22rpx;
|
||||
margin-top: 32rpx;
|
||||
padding-top: 24rpx;
|
||||
border-top: 1rpx solid #eeeae5;
|
||||
color: #777169;
|
||||
font-size: 18rpx;
|
||||
font-size: 22rpx;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.strong {
|
||||
@@ -215,3 +220,31 @@
|
||||
margin-left: 8rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.schedule-row-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8rpx;
|
||||
}
|
||||
.icon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
flex: none;
|
||||
}
|
||||
.small-icon {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
margin-right: 12rpx;
|
||||
flex: none;
|
||||
}
|
||||
.delivery-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #1c1917;
|
||||
}
|
||||
.empty-state {
|
||||
padding: 64rpx 0;
|
||||
text-align: center;
|
||||
color: #78716c;
|
||||
}
|
||||