feat(theme): 全面完善暖色系双主题动态适配,优化同城组局品类筛选与试听条防折行规范

这个提交包含在:
wikiboss
2026-09-16 20:20:25 +08:00
父节点 21549b1f13
当前提交 21792f10b3
共有 6 个文件被更改,包括 259 次插入 和 144 次删除

查看文件

@@ -1,5 +1,5 @@
<template>
<view class="create-activity-container">
<view class="create-activity-container" :class="{ 'theme-warm': currentThemeKey === 'warm' }">
<!-- 模式选择 Tab (AA制 / 项目制) -->
<view class="mode-switch-wrap">
<view
@@ -9,7 +9,7 @@
>
<image class="mode-svg" :src="ICONS.bolt" mode="aspectFit" />
<view class="mode-text-box">
<text class="mode-title">AA制车队</text>
<text class="mode-title">AA制拼桌</text>
<text class="mode-desc">报名人均平摊费用</text>
</view>
</view>
@@ -20,8 +20,8 @@
>
<image class="mode-svg" :src="ICONS.trophy" mode="aspectFit" />
<view class="mode-text-box">
<text class="mode-title">项目制悬赏</text>
<text class="mode-desc">房主全额悬赏奖金池</text>
<text class="mode-title">房主请客</text>
<text class="mode-desc">房主全额买单请客</text>
</view>
</view>
</view>
@@ -49,7 +49,7 @@
<input
class="row-input"
v-model="form.title"
placeholder="如:三里屯火锅探店 / 百星五排极速冲分"
placeholder="如:三里屯铜锅涮肉AA探店 / 工体纯K麦霸欢唱局"
placeholder-class="ph"
/>
</view>
@@ -65,11 +65,11 @@
</view>
<view class="input-row">
<text class="row-label">地点/频道</text>
<text class="row-label">地点/商圈</text>
<input
class="row-input"
v-model="form.location"
placeholder="如:朝阳区聚宝源 / 开黑语音 1 号房间"
placeholder="如:北京市朝阳区三里屯聚宝源 / 工体纯KTV 888包厢"
placeholder-class="ph"
/>
</view>
@@ -80,7 +80,7 @@
<view class="stepper-row">
<view class="stepper-info">
<text class="row-label">招募席位 (人)</text>
<text class="sub-label">包含房主在内的车队总人数</text>
<text class="sub-label">包含房主在内的组局总人数</text>
</view>
<view class="stepper-box">
<button class="step-btn btn-active" :disabled="form.maxParticipants <= 2" @click="changeParticipants(-1)">-</button>
@@ -95,18 +95,18 @@
class="row-input"
type="digit"
v-model="form.aaFee"
placeholder="如:30"
placeholder="如:50"
placeholder-class="ph"
/>
</view>
<view class="input-row" v-else>
<text class="row-label">悬赏总奖金池 (元)</text>
<text class="row-label">房主买单预算 (元)</text>
<input
class="row-input"
type="digit"
v-model="form.totalFee"
placeholder="如:300"
placeholder="如:500"
placeholder-class="ph"
/>
</view>
@@ -114,7 +114,7 @@
<view class="calc-preview">
<text class="preview-label">预算测算:</text>
<text class="preview-val highlight">
{{ form.payType === 'AA' ? `总费用预估约 ¥${calcTotalFee} (人均 ¥${form.aaFee || 0})` : `参与者免费报名,全员争夺 ¥${form.totalFee || 0} 奖金池` }}
{{ form.payType === 'AA' ? `总费用预估约 ¥${calcTotalFee} (人均 ¥${form.aaFee || 0})` : `参与者免费报名,房主请客全包约 ¥${form.totalFee || 0}` }}
</text>
</view>
</view>
@@ -122,28 +122,43 @@
<!-- 底部发起操作栏 (适配安全区) -->
<view class="bottom-bar">
<button class="btn-submit btn-active" @click="handleSubmit">
立即发起组队活动
立即发起同城组局
</button>
</view>
</view>
</template>
<script setup>
import { ref, computed } from 'vue';
import { ref, computed, onMounted, onUnmounted } from 'vue';
import { ICONS } from '@/common/icons.js';
import { ACTIVITIES_LIST } from '@/common/mock.js';
import { getCurrentThemeKey } from '@/common/theme.js';
const games = ['王者荣耀', '和平精英', '美食陪吃', '同城陪玩', '下午茶陪喝', '英雄联盟'];
const games = ['美食陪吃', '同城陪唱', '下午茶陪喝', '同城微醺', '同城桌游', '热门电竞'];
const currentThemeKey = ref(getCurrentThemeKey());
const onThemeChanged = (key) => {
currentThemeKey.value = key;
};
onMounted(() => {
currentThemeKey.value = getCurrentThemeKey();
uni.$on('theme-change', onThemeChanged);
});
onUnmounted(() => {
uni.$off('theme-change', onThemeChanged);
});
const form = ref({
payType: 'AA',
game: '王者荣耀',
game: '美食陪吃',
title: '',
startTime: '今晚 20:30',
location: '开黑语音 1 号频道',
maxParticipants: 5,
aaFee: 25,
totalFee: 125,
startTime: '周六 18:30',
location: '北京市朝阳区三里屯商圈',
maxParticipants: 4,
aaFee: 50,
totalFee: 200,
});
const calcTotalFee = computed(() => {
@@ -159,7 +174,7 @@ const changeParticipants = (delta) => {
const handleSubmit = () => {
if (!form.value.title.trim()) {
form.value.title = `【${form.value.game}】今晚极速开黑车队`;
form.value.title = `【${form.value.game}】同城聚会组局`;
}
const newActivity = {
@@ -173,12 +188,12 @@ const handleSubmit = () => {
maxParticipants: form.value.maxParticipants,
startTime: form.value.startTime,
location: form.value.location,
creatorNickname: '超能电竞玩家',
creatorNickname: '同城局长',
creatorAvatar: 'https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=150&h=150&fit=crop',
participants: [
{
id: 'u_888',
nickname: '超能电竞玩家',
nickname: '同城局长',
avatar: 'https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?w=150&h=150&fit=crop',
checkedIn: true
}
@@ -188,7 +203,7 @@ const handleSubmit = () => {
ACTIVITIES_LIST.unshift(newActivity);
uni.showToast({
title: '活动发起成功!车队已就绪',
title: '组局发起成功!等待好友加入',
icon: 'success',
duration: 1500
});
@@ -421,4 +436,33 @@ const handleSubmit = () => {
margin: 0;
}
}
.create-activity-container.theme-warm {
background-color: #140E0A;
.mode-switch-wrap .mode-item {
background-color: #221711;
border-color: rgba(249, 115, 22, 0.12);
&.active {
background: rgba(249, 115, 22, 0.15);
border-color: #F97316;
}
}
.form-card {
background-color: #221711;
border-color: rgba(249, 115, 22, 0.12);
}
.bottom-bar {
background-color: rgba(34, 23, 17, 0.95);
border-top-color: rgba(249, 115, 22, 0.15);
.btn-submit {
background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
box-shadow: 0 4rpx 20rpx rgba(249, 115, 22, 0.45);
}
}
}
</style>