feat(pwuniapp): 在HBuilderX原生工程中实现电竞暗夜流光全套静态UI页面及4位门票核销
这个提交包含在:
474
pwuniapp/pages/activity/detail.vue
普通文件
474
pwuniapp/pages/activity/detail.vue
普通文件
@@ -0,0 +1,474 @@
|
||||
<template>
|
||||
<view class="detail-container">
|
||||
<!-- 头部活动基本信息 -->
|
||||
<view class="hero-card">
|
||||
<view class="badge-row">
|
||||
<text class="game-tag">{{ activity.game }}</text>
|
||||
<text class="mode-tag" :class="activity.payType === 'AA' ? 'aa-mode' : 'project-mode'">
|
||||
{{ activity.payType === 'AA' ? 'AA制平摊车队' : '项目制悬赏' }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="act-title">{{ activity.title }}</view>
|
||||
|
||||
<!-- 费用看板 -->
|
||||
<view class="fee-board">
|
||||
<view class="fee-col">
|
||||
<text class="col-label">总费用</text>
|
||||
<text class="col-val">¥{{ activity.totalFee }}</text>
|
||||
</view>
|
||||
<view class="fee-divider"></view>
|
||||
<view class="fee-col">
|
||||
<text class="col-label">{{ activity.payType === 'AA' ? '人均分摊' : '奖金池' }}</text>
|
||||
<text class="col-val highlight">
|
||||
¥{{ activity.payType === 'AA' ? activity.aaFee : activity.totalFee }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="fee-divider"></view>
|
||||
<view class="fee-col">
|
||||
<text class="col-label">招募席位</text>
|
||||
<text class="col-val">{{ activity.currentParticipants }}/{{ activity.maxParticipants }}人</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 房主与开黑信息 -->
|
||||
<view class="section-card">
|
||||
<view class="sec-header">
|
||||
<text class="sec-title">开黑阵地与房主</text>
|
||||
</view>
|
||||
<view class="creator-box">
|
||||
<image class="creator-avatar" :src="activity.creatorAvatar" mode="aspectFill" />
|
||||
<view class="creator-info">
|
||||
<view class="creator-name-row">
|
||||
<text class="creator-name">{{ activity.creatorNickname }}</text>
|
||||
<text class="host-badge">活动房主</text>
|
||||
</view>
|
||||
<text class="creator-sub">前职业选手 · 胜率保障车头</text>
|
||||
</view>
|
||||
<button class="btn-chat btn-active" @click="chatWithHost">私聊</button>
|
||||
</view>
|
||||
|
||||
<view class="info-list">
|
||||
<view class="info-row">
|
||||
<text class="info-label">开始时间</text>
|
||||
<text class="info-val">{{ activity.startTime }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">语音频道</text>
|
||||
<view class="copy-val" @click="copyLocation">
|
||||
<text class="info-val">{{ activity.location }}</text>
|
||||
<text class="copy-btn">复制</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">核销机制</text>
|
||||
<text class="info-val green-text">入队出示4位动态门票码核销</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 已报名队友成员列表 -->
|
||||
<view class="section-card">
|
||||
<view class="sec-header">
|
||||
<text class="sec-title">已报名队友 ({{ activity.participants ? activity.participants.length : 0 }})</text>
|
||||
<text class="sec-sub">满员即锁车</text>
|
||||
</view>
|
||||
<view class="member-list" v-if="activity.participants && activity.participants.length > 0">
|
||||
<view v-for="(p, index) in activity.participants" :key="p.id" class="member-item">
|
||||
<image class="member-avatar" :src="p.avatar" mode="aspectFill" />
|
||||
<view class="member-info">
|
||||
<text class="member-name">{{ p.nickname }}</text>
|
||||
<text class="member-seat">#{{ index + 1 }}号位</text>
|
||||
</view>
|
||||
<view class="checkin-badge" :class="{ checked: p.checkedIn }">
|
||||
{{ p.checkedIn ? '已核销入队' : '已购票待验' }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="empty-members">
|
||||
<text>暂无其他队员,快抢先上车!</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部固定操作栏 -->
|
||||
<view class="bottom-bar">
|
||||
<view class="ticket-link btn-active" @click="goToMyTicket">
|
||||
<text class="ticket-icon">🎟️</text>
|
||||
<text class="ticket-text">我的门票</text>
|
||||
</view>
|
||||
<button class="btn-join btn-active" @click="handleJoin">
|
||||
立即上车 (¥{{ activity.payType === 'AA' ? activity.aaFee : 0 }})
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { ACTIVITIES_LIST } from '@/common/mock.js';
|
||||
|
||||
const activity = ref(ACTIVITIES_LIST[0]);
|
||||
|
||||
onLoad((query) => {
|
||||
if (query && query.id) {
|
||||
const found = ACTIVITIES_LIST.find(a => a.id === query.id);
|
||||
if (found) {
|
||||
activity.value = found;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const copyLocation = () => {
|
||||
uni.setClipboardData({
|
||||
data: activity.value.location,
|
||||
success: () => {
|
||||
uni.showToast({ title: '语音频道已复制', icon: 'success' });
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const chatWithHost = () => {
|
||||
uni.showToast({ title: '已建立与房主的加密通道', icon: 'none' });
|
||||
};
|
||||
|
||||
const goToMyTicket = () => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/my-ticket?id=${activity.value.id}`
|
||||
});
|
||||
};
|
||||
|
||||
const handleJoin = () => {
|
||||
uni.showModal({
|
||||
title: '确认报名',
|
||||
content: `报名该【${activity.value.payType === 'AA' ? 'AA制' : '项目制'}】活动,需支付分摊款 ¥${activity.value.aaFee}。支付成功后自动生成4位入队核销码。`,
|
||||
confirmText: '微信支付',
|
||||
confirmColor: '#6366F1',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.showToast({ title: '报名成功!已生成门票', icon: 'success' });
|
||||
setTimeout(() => {
|
||||
goToMyTicket();
|
||||
}, 1200);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.detail-container {
|
||||
min-height: 100vh;
|
||||
background-color: #0A0F1D;
|
||||
padding: 24rpx 32rpx 160rpx;
|
||||
}
|
||||
|
||||
.hero-card {
|
||||
background: linear-gradient(135deg, #1E1B4B 0%, #151D30 100%);
|
||||
border: 1px solid rgba(99, 102, 241, 0.25);
|
||||
border-radius: 28rpx;
|
||||
padding: 32rpx;
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
.badge-row {
|
||||
display: flex;
|
||||
gap: 12rpx;
|
||||
margin-bottom: 16rpx;
|
||||
|
||||
.game-tag {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
color: #F8FAFC;
|
||||
font-size: 22rpx;
|
||||
padding: 4rpx 14rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.mode-tag {
|
||||
font-size: 22rpx;
|
||||
padding: 4rpx 16rpx;
|
||||
border-radius: 8rpx;
|
||||
font-weight: 600;
|
||||
|
||||
&.aa-mode {
|
||||
background: rgba(16, 185, 129, 0.2);
|
||||
color: #10B981;
|
||||
border: 1px solid rgba(16, 185, 129, 0.4);
|
||||
}
|
||||
&.project-mode {
|
||||
background: rgba(245, 158, 11, 0.2);
|
||||
color: #F59E0B;
|
||||
border: 1px solid rgba(245, 158, 11, 0.4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.act-title {
|
||||
font-size: 34rpx;
|
||||
font-weight: 700;
|
||||
color: #FFFFFF;
|
||||
line-height: 1.4;
|
||||
margin-bottom: 28rpx;
|
||||
}
|
||||
|
||||
.fee-board {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
background: rgba(10, 15, 29, 0.6);
|
||||
border-radius: 18rpx;
|
||||
padding: 20rpx 0;
|
||||
|
||||
.fee-col {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.col-label {
|
||||
font-size: 22rpx;
|
||||
color: #94A3B8;
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
.col-val {
|
||||
font-size: 30rpx;
|
||||
font-weight: 700;
|
||||
color: #F8FAFC;
|
||||
|
||||
&.highlight {
|
||||
color: #10B981;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fee-divider {
|
||||
width: 1px;
|
||||
height: 40rpx;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.section-card {
|
||||
background-color: #151D30;
|
||||
border-radius: 24rpx;
|
||||
padding: 28rpx;
|
||||
margin-bottom: 24rpx;
|
||||
border: 1px solid rgba(255, 255, 255, 0.06);
|
||||
|
||||
.sec-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.sec-title {
|
||||
font-size: 28rpx;
|
||||
font-weight: 700;
|
||||
color: #F8FAFC;
|
||||
}
|
||||
.sec-sub {
|
||||
font-size: 22rpx;
|
||||
color: #64748B;
|
||||
}
|
||||
}
|
||||
|
||||
.creator-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
border-radius: 16rpx;
|
||||
padding: 16rpx;
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
.creator-avatar {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 40rpx;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
.creator-info {
|
||||
flex: 1;
|
||||
|
||||
.creator-name-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12rpx;
|
||||
margin-bottom: 6rpx;
|
||||
|
||||
.creator-name {
|
||||
font-size: 26rpx;
|
||||
font-weight: 600;
|
||||
color: #F8FAFC;
|
||||
}
|
||||
.host-badge {
|
||||
background: rgba(99, 102, 241, 0.2);
|
||||
color: #818CF8;
|
||||
font-size: 18rpx;
|
||||
padding: 2rpx 10rpx;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.creator-sub {
|
||||
font-size: 20rpx;
|
||||
color: #94A3B8;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-chat {
|
||||
background: rgba(99, 102, 241, 0.15);
|
||||
border: 1px solid rgba(99, 102, 241, 0.3);
|
||||
color: #818CF8;
|
||||
font-size: 22rpx;
|
||||
padding: 0 24rpx;
|
||||
height: 52rpx;
|
||||
line-height: 50rpx;
|
||||
border-radius: 26rpx;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.info-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16rpx;
|
||||
|
||||
.info-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
|
||||
.info-label {
|
||||
color: #64748B;
|
||||
}
|
||||
.info-val {
|
||||
color: #E2E8F0;
|
||||
font-weight: 500;
|
||||
|
||||
&.green-text {
|
||||
color: #10B981;
|
||||
}
|
||||
}
|
||||
|
||||
.copy-val {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12rpx;
|
||||
|
||||
.copy-btn {
|
||||
color: #6366F1;
|
||||
font-size: 22rpx;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.member-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16rpx;
|
||||
|
||||
.member-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 12rpx 0;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.04);
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.member-avatar {
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
border-radius: 32rpx;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
.member-info {
|
||||
flex: 1;
|
||||
|
||||
.member-name {
|
||||
font-size: 24rpx;
|
||||
font-weight: 600;
|
||||
color: #F8FAFC;
|
||||
display: block;
|
||||
}
|
||||
.member-seat {
|
||||
font-size: 20rpx;
|
||||
color: #64748B;
|
||||
}
|
||||
}
|
||||
|
||||
.checkin-badge {
|
||||
font-size: 20rpx;
|
||||
padding: 4rpx 14rpx;
|
||||
border-radius: 12rpx;
|
||||
background: rgba(100, 116, 139, 0.2);
|
||||
color: #94A3B8;
|
||||
|
||||
&.checked {
|
||||
background: rgba(16, 185, 129, 0.15);
|
||||
color: #10B981;
|
||||
border: 1px solid rgba(16, 185, 129, 0.3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.empty-members {
|
||||
text-align: center;
|
||||
padding: 30rpx 0;
|
||||
color: #64748B;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-bar {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 120rpx;
|
||||
background-color: rgba(21, 29, 48, 0.95);
|
||||
backdrop-filter: blur(12px);
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.08);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 32rpx;
|
||||
gap: 24rpx;
|
||||
z-index: 100;
|
||||
|
||||
.ticket-link {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 120rpx;
|
||||
|
||||
.ticket-icon {
|
||||
font-size: 34rpx;
|
||||
}
|
||||
.ticket-text {
|
||||
font-size: 20rpx;
|
||||
color: #94A3B8;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-join {
|
||||
flex: 1;
|
||||
background: linear-gradient(135deg, #10B981 0%, #059669 100%);
|
||||
color: #FFFFFF;
|
||||
font-size: 28rpx;
|
||||
font-weight: 700;
|
||||
border-radius: 44rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
box-shadow: 0 4rpx 20rpx rgba(16, 185, 129, 0.35);
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
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>
|
||||
@@ -0,0 +1,359 @@
|
||||
<template>
|
||||
<view class="ticket-container">
|
||||
<view class="ticket-card">
|
||||
<!-- 票据头部 -->
|
||||
<view class="ticket-header">
|
||||
<view class="game-badge">{{ ticketData.game }}</view>
|
||||
<view class="stamp-badge" :class="{ verified: isCheckedIn }">
|
||||
{{ isCheckedIn ? '已核销入队' : '待核销' }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="ticket-title">{{ ticketData.title }}</view>
|
||||
|
||||
<view class="ticket-meta">
|
||||
<view class="meta-row">
|
||||
<text class="meta-k">开黑时间</text>
|
||||
<text class="meta-v">{{ ticketData.startTime }}</text>
|
||||
</view>
|
||||
<view class="meta-row">
|
||||
<text class="meta-k">语音频道</text>
|
||||
<text class="meta-v">{{ ticketData.location }}</text>
|
||||
</view>
|
||||
<view class="meta-row">
|
||||
<text class="meta-k">房主昵称</text>
|
||||
<text class="meta-v">{{ ticketData.creatorNickname }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 撕票齿轮分割虚线与两侧凹槽 -->
|
||||
<view class="ticket-punch-wrap">
|
||||
<view class="punch punch-left"></view>
|
||||
<view class="dash-line"></view>
|
||||
<view class="punch punch-right"></view>
|
||||
</view>
|
||||
|
||||
<!-- 核心亮点:4位数字核销码专属卡槽 -->
|
||||
<view class="code-section">
|
||||
<view class="code-tips">进房向房主出示 4 位入队核销码</view>
|
||||
<view class="code-slots">
|
||||
<view v-for="(char, idx) in verifyCodeDigits" :key="idx" class="digit-box">
|
||||
<text class="digit-text">{{ char }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 条形码与二维码模拟区域 -->
|
||||
<view class="qrcode-section">
|
||||
<view class="barcode-graphic">
|
||||
<view class="bar" v-for="i in 36" :key="i" :style="{ width: (i % 3 === 0 ? '6rpx' : '2rpx'), marginRight: (i % 2 === 0 ? '4rpx' : '2rpx') }"></view>
|
||||
</view>
|
||||
<text class="barcode-num">TICKET-2026-9025</text>
|
||||
</view>
|
||||
|
||||
<!-- 动态防伪时间与安全保障 -->
|
||||
<view class="security-footer">
|
||||
<view class="security-time">
|
||||
<text class="dot-green"></text>
|
||||
<text class="time-text">动态防伪时间:{{ currentTime }}</text>
|
||||
</view>
|
||||
<view class="anti-counterfeit-bar"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 演示操作按钮 -->
|
||||
<view class="action-wrap">
|
||||
<button class="btn-verify-demo btn-active" @click="toggleCheckIn">
|
||||
{{ isCheckedIn ? '重置为待核销状态' : '模拟房主核销此门票' }}
|
||||
</button>
|
||||
<button class="btn-back btn-active" @click="goBack">返回活动详情</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, onMounted, onUnmounted } from 'vue';
|
||||
import { ACTIVITIES_LIST } from '@/common/mock.js';
|
||||
|
||||
const ticketData = ref(ACTIVITIES_LIST[0]);
|
||||
const verifyCode = ref('8392');
|
||||
const isCheckedIn = ref(false);
|
||||
const currentTime = ref('');
|
||||
|
||||
const verifyCodeDigits = computed(() => {
|
||||
return verifyCode.value.split('');
|
||||
});
|
||||
|
||||
let timer = null;
|
||||
const updateTime = () => {
|
||||
const now = new Date();
|
||||
const pad = (n) => String(n).padStart(2, '0');
|
||||
const y = now.getFullYear();
|
||||
const m = pad(now.getMonth() + 1);
|
||||
const d = pad(now.getDate());
|
||||
const hh = pad(now.getHours());
|
||||
const mm = pad(now.getMinutes());
|
||||
const ss = pad(now.getSeconds());
|
||||
currentTime.value = `${y}-${m}-${d} ${hh}:${mm}:${ss}`;
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
updateTime();
|
||||
timer = setInterval(updateTime, 1000);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
if (timer) clearInterval(timer);
|
||||
});
|
||||
|
||||
const toggleCheckIn = () => {
|
||||
isCheckedIn.value = !isCheckedIn.value;
|
||||
uni.showToast({
|
||||
title: isCheckedIn.value ? '房主已成功核销该4位门票码!' : '状态已重置为待核销',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
};
|
||||
|
||||
const goBack = () => {
|
||||
uni.navigateBack();
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.ticket-container {
|
||||
min-height: 100vh;
|
||||
background-color: #0A0F1D;
|
||||
padding: 40rpx 36rpx;
|
||||
}
|
||||
|
||||
.ticket-card {
|
||||
background: #151D30;
|
||||
border-radius: 32rpx;
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
box-shadow: 0 16rpx 48rpx rgba(0, 0, 0, 0.5);
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
.ticket-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 32rpx 32rpx 16rpx;
|
||||
|
||||
.game-badge {
|
||||
background: rgba(99, 102, 241, 0.2);
|
||||
color: #818CF8;
|
||||
font-size: 22rpx;
|
||||
padding: 6rpx 16rpx;
|
||||
border-radius: 8rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.stamp-badge {
|
||||
font-size: 22rpx;
|
||||
padding: 6rpx 20rpx;
|
||||
border-radius: 24rpx;
|
||||
background: rgba(245, 158, 11, 0.15);
|
||||
color: #F59E0B;
|
||||
border: 1px solid rgba(245, 158, 11, 0.3);
|
||||
font-weight: 700;
|
||||
|
||||
&.verified {
|
||||
background: rgba(16, 185, 129, 0.15);
|
||||
color: #10B981;
|
||||
border-color: rgba(16, 185, 129, 0.4);
|
||||
transform: rotate(-4deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ticket-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: #FFFFFF;
|
||||
padding: 0 32rpx 24rpx;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.ticket-meta {
|
||||
padding: 0 32rpx 32rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12rpx;
|
||||
|
||||
.meta-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 24rpx;
|
||||
|
||||
.meta-k {
|
||||
color: #64748B;
|
||||
}
|
||||
.meta-v {
|
||||
color: #CBD5E1;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ticket-punch-wrap {
|
||||
position: relative;
|
||||
height: 48rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.punch {
|
||||
position: absolute;
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #0A0F1D;
|
||||
|
||||
&.punch-left {
|
||||
left: -24rpx;
|
||||
}
|
||||
&.punch-right {
|
||||
right: -24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.dash-line {
|
||||
width: 84%;
|
||||
height: 2rpx;
|
||||
border-bottom: 2rpx dashed rgba(255, 255, 255, 0.15);
|
||||
}
|
||||
}
|
||||
|
||||
.code-section {
|
||||
padding: 36rpx 32rpx 24rpx;
|
||||
text-align: center;
|
||||
|
||||
.code-tips {
|
||||
font-size: 22rpx;
|
||||
color: #94A3B8;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.code-slots {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 20rpx;
|
||||
|
||||
.digit-box {
|
||||
width: 110rpx;
|
||||
height: 130rpx;
|
||||
background: rgba(10, 15, 29, 0.8);
|
||||
border: 2rpx solid #10B981;
|
||||
border-radius: 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 0 20rpx rgba(16, 185, 129, 0.3);
|
||||
|
||||
.digit-text {
|
||||
font-size: 64rpx;
|
||||
font-weight: 800;
|
||||
color: #10B981;
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
text-shadow: 0 0 12rpx rgba(16, 185, 129, 0.6);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.qrcode-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 16rpx 32rpx 28rpx;
|
||||
|
||||
.barcode-graphic {
|
||||
display: flex;
|
||||
height: 60rpx;
|
||||
align-items: center;
|
||||
opacity: 0.8;
|
||||
|
||||
.bar {
|
||||
height: 100%;
|
||||
background-color: #F8FAFC;
|
||||
}
|
||||
}
|
||||
|
||||
.barcode-num {
|
||||
font-size: 20rpx;
|
||||
color: #64748B;
|
||||
letter-spacing: 4rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.security-footer {
|
||||
background: rgba(10, 15, 29, 0.5);
|
||||
padding: 20rpx 32rpx;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.04);
|
||||
|
||||
.security-time {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 12rpx;
|
||||
|
||||
.dot-green {
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #10B981;
|
||||
}
|
||||
|
||||
.time-text {
|
||||
font-size: 20rpx;
|
||||
color: #94A3B8;
|
||||
font-family: monospace;
|
||||
}
|
||||
}
|
||||
|
||||
.anti-counterfeit-bar {
|
||||
height: 4rpx;
|
||||
margin-top: 12rpx;
|
||||
background: linear-gradient(90deg, #6366F1, #10B981, #F59E0B, #6366F1);
|
||||
background-size: 200% 100%;
|
||||
border-radius: 2rpx;
|
||||
animation: gradientMove 3s infinite linear;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.action-wrap {
|
||||
margin-top: 48rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20rpx;
|
||||
|
||||
.btn-verify-demo {
|
||||
background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
|
||||
color: #FFFFFF;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
border-radius: 44rpx;
|
||||
}
|
||||
|
||||
.btn-back {
|
||||
background: #151D30;
|
||||
color: #94A3B8;
|
||||
font-size: 26rpx;
|
||||
height: 84rpx;
|
||||
line-height: 84rpx;
|
||||
border-radius: 44rpx;
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes gradientMove {
|
||||
0% { background-position: 0% 50%; }
|
||||
100% { background-position: 200% 50%; }
|
||||
}
|
||||
</style>
|
||||
在新工单中引用
屏蔽一个用户