diff --git a/pwuniapp/common/api.js b/pwuniapp/common/api.js index 8975a6d..a6ec934 100644 --- a/pwuniapp/common/api.js +++ b/pwuniapp/common/api.js @@ -267,6 +267,8 @@ export function formatOrderData(raw) { status: statusKey, meetVenue: raw.location || raw.meetVenue || '北京市公开商圈', expenseBurden: raw.expenseBurden || raw.expense_burden || 'AA制各自付', + payType: raw.payType || raw.pay_type || 'WECHAT', + couponDiscount: Number(raw.couponDiscount || raw.coupon_discount || 0), verifyCode: raw.verifyCode || raw.verify_code || '', remark: raw.remark || '', createdAt: raw.createdAt || raw.created_at || '刚刚' diff --git a/pwuniapp/common/icons.js b/pwuniapp/common/icons.js index 2958fb3..041d61d 100644 --- a/pwuniapp/common/icons.js +++ b/pwuniapp/common/icons.js @@ -16,6 +16,21 @@ export const ICONS = { `), + wallet: svgToUri(` + + + + + + `), + + wechat: svgToUri(` + + + + + `), + flame: svgToUri(` diff --git a/pwuniapp/pages/activity/create.vue b/pwuniapp/pages/activity/create.vue index 27de4fe..b84e543 100644 --- a/pwuniapp/pages/activity/create.vue +++ b/pwuniapp/pages/activity/create.vue @@ -59,13 +59,32 @@ + + + 快捷时段: + + + {{ timeItem }} + + + + - 地点/商圈 + + 地点/商圈 + 地图选点 + + + + + 合规商圈: + + + {{ zoneItem.split(' ')[0] }} + + + @@ -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 { diff --git a/pwuniapp/pages/order/create.vue b/pwuniapp/pages/order/create.vue index 49350cb..bcb09cd 100644 --- a/pwuniapp/pages/order/create.vue +++ b/pwuniapp/pages/order/create.vue @@ -1,5 +1,5 @@