feat(pwuniapp): 在HBuilderX原生工程中实现电竞暗夜流光全套静态UI页面及4位门票核销
这个提交包含在:
406
pwuniapp/pages/activity/list.vue
普通文件
406
pwuniapp/pages/activity/list.vue
普通文件
@@ -0,0 +1,406 @@
|
||||
<template>
|
||||
<view class="activity-container">
|
||||
<!-- 顶部模式切换选项卡 -->
|
||||
<view class="tab-header">
|
||||
<view
|
||||
class="tab-item btn-active"
|
||||
:class="{ active: currentTab === 'ALL' }"
|
||||
@click="switchTab('ALL')"
|
||||
>
|
||||
<text class="tab-text">全部活动</text>
|
||||
<view class="tab-indicator" v-if="currentTab === 'ALL'"></view>
|
||||
</view>
|
||||
<view
|
||||
class="tab-item btn-active"
|
||||
:class="{ active: currentTab === 'AA' }"
|
||||
@click="switchTab('AA')"
|
||||
>
|
||||
<text class="tab-text">⚡ AA制车队</text>
|
||||
<view class="tab-indicator" v-if="currentTab === 'AA'"></view>
|
||||
</view>
|
||||
<view
|
||||
class="tab-item btn-active"
|
||||
:class="{ active: currentTab === 'PROJECT' }"
|
||||
@click="switchTab('PROJECT')"
|
||||
>
|
||||
<text class="tab-text">🏆 项目制赛事</text>
|
||||
<view class="tab-indicator" v-if="currentTab === 'PROJECT'"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 顶部状态小提示 -->
|
||||
<view class="tips-bar">
|
||||
<text class="tips-icon">💡</text>
|
||||
<text class="tips-text">AA制活动人均AA平摊,项目制为房主全额悬赏或奖池分配</text>
|
||||
</view>
|
||||
|
||||
<!-- 活动列表 -->
|
||||
<view class="activity-list">
|
||||
<view
|
||||
v-for="act in filteredActivities"
|
||||
:key="act.id"
|
||||
class="activity-card card-active"
|
||||
@click="goToDetail(act.id)"
|
||||
>
|
||||
<!-- 卡片头部 -->
|
||||
<view class="card-header">
|
||||
<view class="game-tag">{{ act.game }}</view>
|
||||
<view class="mode-tag" :class="act.payType === 'AA' ? 'aa-mode' : 'project-mode'">
|
||||
{{ act.payType === 'AA' ? 'AA制平摊' : '项目制悬赏' }}
|
||||
</view>
|
||||
<view class="status-pill" :class="act.status">
|
||||
{{ act.status === 'RECRUITING' ? '招募中' : '进行中' }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 卡片标题 -->
|
||||
<view class="activity-title">{{ act.title }}</view>
|
||||
|
||||
<!-- 详细信息条 -->
|
||||
<view class="meta-row">
|
||||
<view class="meta-item">
|
||||
<text class="meta-icon">⏰</text>
|
||||
<text class="meta-val">{{ act.startTime }}</text>
|
||||
</view>
|
||||
<view class="meta-item">
|
||||
<text class="meta-icon">🎙️</text>
|
||||
<text class="meta-val">{{ act.location }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 进度与头像 -->
|
||||
<view class="progress-section">
|
||||
<view class="progress-info">
|
||||
<text class="progress-label">组队进度</text>
|
||||
<text class="progress-count">{{ act.currentParticipants }} / {{ act.maxParticipants }}人</text>
|
||||
</view>
|
||||
<view class="progress-track">
|
||||
<view
|
||||
class="progress-fill"
|
||||
:style="{ width: (act.currentParticipants / act.maxParticipants * 100) + '%' }"
|
||||
></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部房主与价格 -->
|
||||
<view class="card-footer">
|
||||
<view class="creator-info">
|
||||
<image class="creator-avatar" :src="act.creatorAvatar" mode="aspectFill" />
|
||||
<text class="creator-name">房主:{{ act.creatorNickname }}</text>
|
||||
</view>
|
||||
|
||||
<view class="fee-info">
|
||||
<template v-if="act.payType === 'AA'">
|
||||
<text class="fee-label">人均预估</text>
|
||||
<text class="fee-amount">¥{{ act.aaFee }}</text>
|
||||
</template>
|
||||
<template v-else>
|
||||
<text class="fee-label">奖金池</text>
|
||||
<text class="fee-amount project-gold">¥{{ act.totalFee }}</text>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 悬浮发起活动按钮 -->
|
||||
<view class="fab-btn btn-active" @click="createActivity">
|
||||
<text class="fab-icon">+</text>
|
||||
<text class="fab-text">发起组队</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import { ACTIVITIES_LIST } from '@/common/mock.js';
|
||||
|
||||
const activities = ref(ACTIVITIES_LIST);
|
||||
const currentTab = ref('ALL');
|
||||
|
||||
const filteredActivities = computed(() => {
|
||||
if (currentTab.value === 'ALL') return activities.value;
|
||||
return activities.value.filter(a => a.payType === currentTab.value);
|
||||
});
|
||||
|
||||
const switchTab = (tab) => {
|
||||
currentTab.value = tab;
|
||||
};
|
||||
|
||||
const goToDetail = (id) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/detail?id=${id}`
|
||||
});
|
||||
};
|
||||
|
||||
const createActivity = () => {
|
||||
uni.showToast({
|
||||
title: '发起组队模块已就绪(支持AA制与项目制)',
|
||||
icon: 'none',
|
||||
duration: 2500
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.activity-container {
|
||||
min-height: 100vh;
|
||||
background-color: #0A0F1D;
|
||||
padding: 20rpx 32rpx 140rpx;
|
||||
}
|
||||
|
||||
.tab-header {
|
||||
display: flex;
|
||||
background-color: #151D30;
|
||||
border-radius: 20rpx;
|
||||
padding: 8rpx;
|
||||
margin-bottom: 24rpx;
|
||||
border: 1px solid rgba(255, 255, 255, 0.06);
|
||||
|
||||
.tab-item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
padding: 18rpx 0;
|
||||
position: relative;
|
||||
border-radius: 14rpx;
|
||||
|
||||
.tab-text {
|
||||
font-size: 26rpx;
|
||||
color: #94A3B8;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: rgba(99, 102, 241, 0.18);
|
||||
|
||||
.tab-text {
|
||||
color: #FFFFFF;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.tab-indicator {
|
||||
position: absolute;
|
||||
bottom: 4rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 32rpx;
|
||||
height: 6rpx;
|
||||
background: #6366F1;
|
||||
border-radius: 3rpx;
|
||||
box-shadow: 0 0 10rpx #6366F1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tips-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: rgba(99, 102, 241, 0.08);
|
||||
border: 1px solid rgba(99, 102, 241, 0.2);
|
||||
border-radius: 12rpx;
|
||||
padding: 12rpx 20rpx;
|
||||
margin-bottom: 28rpx;
|
||||
|
||||
.tips-icon {
|
||||
font-size: 24rpx;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
.tips-text {
|
||||
font-size: 22rpx;
|
||||
color: #818CF8;
|
||||
line-height: 1.4;
|
||||
}
|
||||
}
|
||||
|
||||
.activity-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 24rpx;
|
||||
|
||||
.activity-card {
|
||||
background-color: #151D30;
|
||||
border-radius: 24rpx;
|
||||
padding: 28rpx;
|
||||
border: 1px solid rgba(255, 255, 255, 0.06);
|
||||
box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.3);
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12rpx;
|
||||
margin-bottom: 16rpx;
|
||||
|
||||
.game-tag {
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
color: #E2E8F0;
|
||||
font-size: 22rpx;
|
||||
padding: 4rpx 14rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.mode-tag {
|
||||
font-size: 20rpx;
|
||||
padding: 4rpx 14rpx;
|
||||
border-radius: 8rpx;
|
||||
font-weight: 600;
|
||||
|
||||
&.aa-mode {
|
||||
background: rgba(16, 185, 129, 0.15);
|
||||
color: #10B981;
|
||||
border: 1px solid rgba(16, 185, 129, 0.3);
|
||||
}
|
||||
&.project-mode {
|
||||
background: rgba(245, 158, 11, 0.15);
|
||||
color: #F59E0B;
|
||||
border: 1px solid rgba(245, 158, 11, 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
.status-pill {
|
||||
margin-left: auto;
|
||||
font-size: 20rpx;
|
||||
padding: 4rpx 14rpx;
|
||||
border-radius: 12rpx;
|
||||
|
||||
&.RECRUITING {
|
||||
background: rgba(99, 102, 241, 0.2);
|
||||
color: #818CF8;
|
||||
}
|
||||
&.RUNNING {
|
||||
background: rgba(16, 185, 129, 0.2);
|
||||
color: #10B981;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.activity-title {
|
||||
font-size: 30rpx;
|
||||
font-weight: 700;
|
||||
color: #F8FAFC;
|
||||
line-height: 1.4;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.meta-row {
|
||||
display: flex;
|
||||
gap: 28rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.meta-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 22rpx;
|
||||
color: #94A3B8;
|
||||
|
||||
.meta-icon {
|
||||
font-size: 22rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.progress-section {
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
.progress-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10rpx;
|
||||
font-size: 22rpx;
|
||||
|
||||
.progress-label {
|
||||
color: #64748B;
|
||||
}
|
||||
.progress-count {
|
||||
color: #10B981;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
.progress-track {
|
||||
height: 10rpx;
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
border-radius: 5rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.progress-fill {
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, #10B981, #059669);
|
||||
border-radius: 5rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card-footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.06);
|
||||
padding-top: 18rpx;
|
||||
|
||||
.creator-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.creator-avatar {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
border-radius: 24rpx;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
.creator-name {
|
||||
font-size: 22rpx;
|
||||
color: #94A3B8;
|
||||
}
|
||||
}
|
||||
|
||||
.fee-info {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 8rpx;
|
||||
|
||||
.fee-label {
|
||||
font-size: 20rpx;
|
||||
color: #64748B;
|
||||
}
|
||||
.fee-amount {
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: #10B981;
|
||||
|
||||
&.project-gold {
|
||||
color: #F59E0B;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fab-btn {
|
||||
position: fixed;
|
||||
right: 36rpx;
|
||||
bottom: 160rpx;
|
||||
background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
|
||||
border-radius: 44rpx;
|
||||
padding: 18rpx 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-shadow: 0 8rpx 28rpx rgba(99, 102, 241, 0.5);
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
z-index: 100;
|
||||
|
||||
.fab-icon {
|
||||
font-size: 32rpx;
|
||||
color: #FFF;
|
||||
font-weight: 700;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
.fab-text {
|
||||
font-size: 26rpx;
|
||||
color: #FFF;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
在新工单中引用
屏蔽一个用户