This commit is contained in:
2025-12-12 08:30:35 +08:00
parent 2f1d732a36
commit 7d9ac4c8ca
2 changed files with 83 additions and 7 deletions

View File

@@ -49,6 +49,18 @@
<text class="empty-icon">📋</text>
<text class="empty-text">暂无规程信息</text>
</view>
<!-- 快捷入口 -->
<view class="quick-actions" v-if="eventId">
<view class="quick-action-item" @click="goToPlayers">
<view class="action-icon">👥</view>
<view class="action-text">查看参赛选手</view>
</view>
<view class="quick-action-item" @click="goToRegister">
<view class="action-icon">📝</view>
<view class="action-text">我要报名</view>
</view>
</view>
</view>
</template>
@@ -266,6 +278,24 @@ export default {
const sizes = ['B', 'KB', 'MB', 'GB']
const i = Math.floor(Math.log(bytes) / Math.log(k))
return (bytes / Math.pow(k, i)).toFixed(2) + ' ' + sizes[i]
},
/**
* 跳转到参赛选手页面
*/
goToPlayers() {
uni.navigateTo({
url: `/pages/event-players/event-players?eventId=${this.eventId}`
})
},
/**
* 跳转到报名页面
*/
goToRegister() {
uni.navigateTo({
url: `/pages/event-register/event-register?eventId=${this.eventId}`
})
}
}
};
@@ -488,4 +518,39 @@ export default {
font-size: 28rpx;
color: #999999;
}
// 快捷入口
.quick-actions {
margin-top: 30rpx;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 20rpx;
}
.quick-action-item {
background-color: #fff;
border-radius: 16rpx;
padding: 30rpx;
display: flex;
flex-direction: column;
align-items: center;
gap: 15rpx;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05);
transition: all 0.3s;
&:active {
background-color: #f8f8f8;
transform: scale(0.95);
}
}
.action-icon {
font-size: 48rpx;
}
.action-text {
font-size: 26rpx;
color: #333333;
font-weight: 500;
}
</style>