feat(companion): 全面扩展同城生活陪伴体系(陪吃·陪喝·陪玩),完成TDD测试与安全核销闭环

这个提交包含在:
wikiboss
2026-09-16 20:12:54 +08:00
父节点 a90cd3c0d9
当前提交 341023c77b
共有 15 个文件被更改,包括 972 次插入 和 23 次删除

查看文件

@@ -61,7 +61,7 @@
</view>
</view>
<!-- 优惠抵扣与备注 -->
<!-- 优惠抵扣与履约约定 -->
<view class="order-card">
<view class="coupon-row btn-active" @click="selectCoupon">
<text class="cell-label">优惠券</text>
@@ -70,9 +70,49 @@
<text class="arrow">></text>
</view>
</view>
<view class="remark-row">
<!-- 线下同城专属:商圈场所与消费约定 -->
<block v-if="isOffline">
<view class="remark-row">
<text class="cell-label">碰面场所</text>
<input class="remark-input" v-model="meetVenue" placeholder="必须为公开正规场所,如:朝阳大悦城海底捞" placeholder-class="ph" />
</view>
<view class="expense-row">
<text class="cell-label">现场消费</text>
<view class="expense-pills">
<view
class="expense-pill btn-active"
:class="{ active: expenseBurden === 'AA' }"
@click="expenseBurden = 'AA'"
>
AA制各自付
</view>
<view
class="expense-pill btn-active"
:class="{ active: expenseBurden === 'TREAT' }"
@click="expenseBurden = 'TREAT'"
>
老板请客
</view>
<view
class="expense-pill btn-active"
:class="{ active: expenseBurden === 'SELF' }"
@click="expenseBurden = 'SELF'"
>
大神自理
</view>
</view>
</view>
<view class="safety-tip-card">
<image class="safety-icon-svg" :src="ICONS.shield" mode="aspectFit" />
<text class="safety-text">绿色阳光陪伴声明:服务仅限在正规公开商业场所进行。双方碰面后将出示 4 位数字核销码进行现场签到,保障双方人身与财产安全。</text>
</view>
</block>
<!-- 线上游戏专属:开黑区服与要求 -->
<view class="remark-row" v-else>
<text class="cell-label">开黑要求/游戏ID</text>
<input class="remark-input" v-model="remark" placeholder="如:QQ区/王者段位/包赢" placeholder-class="ph" />
<input class="remark-input" v-model="remark" placeholder="如:微信区/王者星耀段位/包赢" placeholder-class="ph" />
</view>
</view>
@@ -115,6 +155,19 @@ const hours = ref(2);
const timeType = ref('NOW');
const discount = ref(10);
const remark = ref('');
const meetVenue = ref('朝阳大悦城海底捞');
const expenseBurden = ref('AA');
const isOffline = computed(() => {
return expert.value && (
expert.value.track === 'OFFLINE_MEAL' ||
expert.value.track === 'OFFLINE_DRINK' ||
expert.value.track === 'OFFLINE_PLAY' ||
expert.value.game === '美食陪吃' ||
expert.value.game === '下午茶陪喝' ||
expert.value.game === '同城陪玩'
);
});
onLoad((query) => {
if (query && query.expertId) {
@@ -389,6 +442,63 @@ const handlePay = () => {
}
}
.expense-row {
display: flex;
align-items: center;
padding: 20rpx 0;
border-top: 1px solid rgba(255, 255, 255, 0.05);
.cell-label {
font-size: 24rpx;
color: #64748B;
width: 220rpx;
}
.expense-pills {
display: flex;
gap: 12rpx;
.expense-pill {
font-size: 22rpx;
color: #94A3B8;
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
padding: 6rpx 16rpx;
border-radius: 12rpx;
&.active {
color: #F59E0B;
background: rgba(245, 158, 11, 0.15);
border-color: #F59E0B;
font-weight: 600;
}
}
}
}
.safety-tip-card {
margin-top: 20rpx;
background: rgba(16, 185, 129, 0.08);
border: 1px solid rgba(16, 185, 129, 0.2);
border-radius: 16rpx;
padding: 16rpx 20rpx;
display: flex;
align-items: flex-start;
gap: 12rpx;
.safety-icon-svg {
width: 28rpx;
height: 28rpx;
flex-shrink: 0;
margin-top: 4rpx;
}
.safety-text {
font-size: 20rpx;
color: #10B981;
line-height: 1.5;
}
}
.fee-row {
display: flex;
justify-content: space-between;