refactor: 将小程序文案纠偏为个人品牌语义

This commit is contained in:
que01 committed 2026-09-19 12:20:08 +08:00
1 parent a90a47f808
commit 653fe596ac
8 files changed
+14 -14

No files matched your search

+1 -1
View File
@@ -4,6 +4,6 @@ Page({
data: { loading: true, error: '', bookings: [], cancellingId: '' },
onLoad() { this.load(); }, onShow() { this.load(); },
load() { const token = wx.getStorageSync('customerToken'); if (!token) return this.setData({ loading: false, bookings: [], error: '' }); this.setData({ loading: true, error: '' }); customerRequest('/customer/bookings').then((items) => this.setData({ bookings: (Array.isArray(items) ? items : []).map(bookingViewModel), loading: false })).catch((error) => this.setData({ loading: false, error: error.message || '网络请求失败' })); },
retry() { this.load(); }, contact() { wx.showToast({ title: '暂未配置联系方式', icon: 'none' }); },
retry() { this.load(); }, contact() { const brand = getApp().globalData.brand || {}; if (brand.contactPhone) return wx.makePhoneCall({ phoneNumber: brand.contactPhone }); if (brand.contactWechat) return wx.showModal({ title: '联系品牌方', content: '微信号:' + brand.contactWechat, showCancel: false }); wx.showToast({ title: '暂未配置联系方式', icon: 'none' }); },
cancel(e) { const id = e.currentTarget.dataset.id; if (this.data.cancellingId) return; wx.showModal({ title: '取消预约', content: '确定取消这笔预约吗?', success: (result) => { if (!result.confirm) return; this.setData({ cancellingId: id }); customerRequest('/customer/bookings/' + id + '/cancel', { method: 'POST', data: {} }).then(() => { this.setData({ cancellingId: '' }); wx.showToast({ title: '已取消预约', icon: 'success' }); this.load(); }).catch((error) => { this.setData({ cancellingId: '' }); wx.showToast({ title: error.message || '取消失败', icon: 'none' }); }); } }); }
});
+2 -2
View File
@@ -8,8 +8,8 @@
<view wx:for="{{bookings}}" wx:key="id" class="card">
<view class="card-visual"><view class="dish-placeholder"></view><view class="card-main"><text class="name">{{item.serviceName}}</text><text class="summary">{{item.quantityLabel}} · {{item.fulfillmentLabel}} · {{item.requestedTime || '时间待确认'}}</text></view></view>
<view class="card-foot"><text class="price">{{item.estimatedAmount ? '¥'+item.estimatedAmount/100 : '人工沟通报价'}}</text><text class="status">{{item.statusLabel}}</text></view>
<view class="actions"><button class="contact" size="mini" bindtap="contact">联系摊主</button><button class="cancel" wx:if="{{item.status === 'received'}}" loading="{{cancellingId === item.id}}" disabled="{{!!cancellingId}}" size="mini" data-id="{{item.id}}" bindtap="cancel">{{cancellingId === item.id ? '取消中...' : '取消预约'}}</button></view>
<text class="cancel-note" wx:if="{{item.status === 'received'}}">取消后请及时告知摊主,避免食材浪费。</text>
<view class="actions"><button class="contact" size="mini" bindtap="contact">联系品牌方</button><button class="cancel" wx:if="{{item.status === 'received'}}" loading="{{cancellingId === item.id}}" disabled="{{!!cancellingId}}" size="mini" data-id="{{item.id}}" bindtap="cancel">{{cancellingId === item.id ? '取消中...' : '取消申请'}}</button></view>
<text class="cancel-note" wx:if="{{item.status === 'received'}}">如需调整,请尽早联系品牌方。</text>
</view>
<view class="faq"><view class="faq-title">常见问题 <text>›</text></view><view>○ 怎么确认预约? <text>›</text></view><view>○ 配送范围有多远? <text>›</text></view><view>○ 可以改时间吗? <text>›</text></view></view>
</block>