feat(order): support balance payment, dynamic marketing coupon recommendation, and quick activity picker

这个提交包含在:
xcbyy
2026-10-10 15:37:41 +08:00
父节点 872af22c20
当前提交 7ac81035b4
共有 7 个文件被更改,包括 559 次插入 和 18 次删除

查看文件

@@ -59,13 +59,32 @@
<input
class="row-input"
v-model="form.startTime"
placeholder="如:今晚 20:30 / 周六 18:30"
placeholder="点选快捷时段或自定义输入"
placeholder-class="ph"
/>
</view>
<!-- 快捷时段点选胶囊 (告别纯手打易错) -->
<view class="quick-chip-row">
<text class="chip-label">快捷时段:</text>
<view class="quick-chips">
<view
v-for="timeItem in presetTimeOptions"
:key="timeItem"
class="time-chip btn-active"
:class="{ selected: form.startTime === timeItem }"
@click="form.startTime = timeItem"
>
{{ timeItem }}
</view>
</view>
</view>
<view class="input-row">
<text class="row-label">地点/商圈</text>
<view class="label-with-action">
<text class="row-label">地点/商圈</text>
<text class="btn-choose-loc btn-active" @click="handleChooseLocation">地图选点</text>
</view>
<input
class="row-input"
v-model="form.location"
@@ -73,6 +92,22 @@
placeholder-class="ph"
/>
</view>
<!-- 合规示范商圈一键点选 (防风控与合规保障) -->
<view class="quick-chip-row">
<text class="chip-label">合规商圈:</text>
<view class="quick-chips">
<view
v-for="zoneItem in recommendPublicZones.slice(0, 4)"
:key="zoneItem"
class="zone-chip-item btn-active"
:class="{ selected: form.location === zoneItem }"
@click="form.location = zoneItem"
>
{{ zoneItem.split(' ')[0] }}
</view>
</view>
</view>
</view>
<!-- 席位与费用配置 -->
@@ -349,6 +384,42 @@ const recommendPublicZones = ref([
'北京市海淀区五道口购物中心 (高校商圈)'
]);
const presetTimeOptions = ref([
'今晚 19:30',
'今晚 20:30',
'明天 14:00',
'周六 18:30',
'周日 15:00'
]);
const handleChooseLocation = () => {
// #ifdef MP-WEIXIN || APP-PLUS
uni.chooseLocation({
success: (res) => {
if (res && (res.name || res.address)) {
form.value.location = res.name ? `${res.address ? res.address + ' ' : ''}${res.name}` : res.address;
uni.showToast({ title: '已选取地点', icon: 'success' });
}
},
fail: (err) => {
console.warn('[ActivityCreate] 地图选点取消或未授权:', err);
// 若未授权或在H5/开发环境,平滑引导点选推荐公开商圈
if (recommendPublicZones.value.length > 0) {
form.value.location = recommendPublicZones.value[0];
uni.showToast({ title: '已填入推荐商圈', icon: 'none' });
}
}
});
// #endif
// #ifndef MP-WEIXIN || APP-PLUS
if (recommendPublicZones.value.length > 0) {
form.value.location = recommendPublicZones.value[0];
uni.showToast({ title: '已为您填入示范商圈', icon: 'none' });
}
// #endif
};
const minParticipants = ref(2);
const maxParticipants = ref(10);
const presetPerPersonFees = ref([200, 300, 500, 800, 1000]);
@@ -609,6 +680,71 @@ const handleSubmit = async () => {
font-weight: normal;
color: #475569;
}
.label-with-action {
width: 220rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding-right: 16rpx;
box-sizing: border-box;
.row-label {
width: auto;
}
.btn-choose-loc {
font-size: 20rpx;
color: #38BDF8;
background: rgba(56, 189, 248, 0.12);
padding: 4rpx 10rpx;
border-radius: 6rpx;
cursor: pointer;
}
}
}
.quick-chip-row {
display: flex;
align-items: center;
padding: 12rpx 0 16rpx;
border-bottom: 1px solid rgba(255, 255, 255, 0.04);
.chip-label {
font-size: 22rpx;
color: #64748B;
width: 140rpx;
flex-shrink: 0;
}
.quick-chips {
display: flex;
flex-wrap: wrap;
gap: 12rpx;
.time-chip, .zone-chip-item {
font-size: 22rpx;
color: #94A3B8;
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.08);
padding: 6rpx 16rpx;
border-radius: 12rpx;
transition: all 0.15s;
&.selected {
color: #818CF8;
border-color: #6366F1;
background: rgba(99, 102, 241, 0.15);
font-weight: 600;
}
}
.zone-chip-item.selected {
color: #38BDF8;
border-color: #38BDF8;
background: rgba(56, 189, 248, 0.15);
}
}
}
.stepper-row {