fix: 收敛模板编辑发布契约并还原餐饮页面视觉

This commit is contained in:
que01 committed 2026-10-08 13:36:59 +08:00
1 parent 20bcb43534
commit f4061a24bd
102 files changed
+4510 -870

No files matched your search

@@ -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;
}