This commit is contained in:
那些花儿
2025-05-15 14:44:27 +08:00
parent 277ddf9e6a
commit 053edabb58
18 changed files with 548 additions and 216 deletions
+81 -85
View File
@@ -59,93 +59,47 @@
<view class="activity-detail-section" v-if="detailData.items && detailData.items.length > 0">
<view class="section-title">比赛项目</view>
<!-- :navigation="{ showControls: true, paginationPosition: 'bottom-right' }"-->
<t-swiper
:autoplay="false"
:navigation="{ type: 'fraction', paginationPosition: 'bottom-right' }"
height="500px"
>
<t-swiper-item v-for="(item, index) in detailData.items" :key="index" style="height: 192px"
class="event-item">
<view>
<view class="event-item-header">
<view class="event-item-index">{{ index + 1 }}</view>
<text class="event-item-name">{{ item.name }}</text>
</view>
<view class="event-items">
<view v-for="(item, index) in detailData.items" :key="index" class="event-item">
<view class="event-item-header">
<view class="event-item-index">{{ index + 1 }}</view>
<text class="event-item-name">{{ item.name }}</text>
</view>
<view class="event-item-content">
<!-- 项目图片区域 -->
<t-image :src=config.fileDomain+item.img shape="round"
class="event-item-image" fit="fill"/>
<view class="event-item-content">
<!-- 项目图片区域 -->
<!-- v-if="item.img"-->
<!-- :src="item.img"-->
<!-- <image
src="https://api.zzzmh.cn/v2/bz/v3/getUrl/c9d3deb2880411ebb6edd017c2d2eca220"
mode="aspectFill"
class="event-item-image"
/>-->
<t-image :src=config.fileDomain+item.img shape="round"
class="event-item-image" fit="fill"/>
<!-- 项目信息区域 -->
<view class="event-item-info">
<view class="event-item-section">
<view class="event-item-section-title">
<t-icon name="flag" size="16px" color="var(--td-brand-color-5)"/>
<text>活动形式</text>
</view>
<view class="event-item-section-content">{{ item.form }}</view>
<!-- 项目信息区域 -->
<view class="event-item-info">
<view class="event-item-section">
<view class="event-item-section-title">
<t-icon name="flag" size="16px" color="var(--td-brand-color-5)"/>
<text>比赛方法</text>
</view>
<view class="event-item-section-content">{{ item.form }}</view>
</view>
<view class="event-item-section">
<view class="event-item-section-title">
<t-icon name="chart-bar" size="16px" color="var(--td-brand-color-5)"/>
<text>评分规则</text>
</view>
<view class="event-item-section-content">{{ item.rule }}</view>
<view class="event-item-section">
<view class="event-item-section-title">
<t-icon name="chart-bar" size="16px" color="var(--td-brand-color-5)"/>
<text>评分标准</text>
</view>
<view class="event-item-section-content">{{ item.rule }}</view>
</view>
<view class="event-item-section">
<view class="event-item-section-title">
<t-icon name="help-circle" size="16px" color="var(--td-brand-color-5)"/>
<text>比赛规则</text>
</view>
<view class="event-item-section-content">{{ item.ruleForm }}</view>
</view>
</view>
</view>
</t-swiper-item>
</t-swiper>
<!-- <view class="event-items">-->
<!-- <view v-for="(item, index) in detailData.items" :key="item.id" class="event-item">-->
<!-- <view class="event-item-header">-->
<!-- <view class="event-item-index">{{ index + 1 }}</view>-->
<!-- <text class="event-item-name">{{ item.name }}</text>-->
<!-- </view>-->
<!-- -->
<!-- <view class="event-item-content">-->
<!-- &lt;!&ndash; 项目图片区域 &ndash;&gt;-->
<!-- &lt;!&ndash; v-if="item.img"&ndash;&gt;-->
<!-- &lt;!&ndash; :src="item.img"&ndash;&gt;-->
<!-- <image-->
<!-- src="https://api.zzzmh.cn/v2/bz/v3/getUrl/c9d3deb2880411ebb6edd017c2d2eca220"-->
<!-- mode="aspectFill" -->
<!-- class="event-item-image"-->
<!-- />-->
<!-- -->
<!-- &lt;!&ndash; 项目信息区域 &ndash;&gt;-->
<!-- <view class="event-item-info">-->
<!-- <view class="event-item-section">-->
<!-- <view class="event-item-section-title">-->
<!-- <t-icon name="flag" size="16px" color="var(&#45;&#45;td-brand-color-5)" />-->
<!-- <text>活动形式</text>-->
<!-- </view>-->
<!-- <view class="event-item-section-content">{{ item.form }}</view>-->
<!-- </view>-->
<!-- -->
<!-- <view class="event-item-section">-->
<!-- <view class="event-item-section-title">-->
<!-- <t-icon name="chart-bar" size="16px" color="var(&#45;&#45;td-brand-color-5)" />-->
<!-- <text>评分规则</text>-->
<!-- </view>-->
<!-- <view class="event-item-section-content">{{ item.rule }}</view>-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
</view>
</view>
</view>
</view>
@@ -402,6 +356,13 @@ onLoad((option) => {
overflow: hidden;
//box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
border: 1px solid #f0f0f0;
height: auto;
max-height: none;
margin-bottom: 24rpx;
}
.event-item:last-child {
margin-bottom: 0;
}
.event-item-header {
@@ -451,6 +412,9 @@ onLoad((option) => {
.event-item-info {
padding: 24rpx;
max-height: 600rpx;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
.event-item-section {
@@ -513,14 +477,46 @@ onLoad((option) => {
}
}
::v-deep .t-swiper__container {
//min-height: 300rpx!important;
height: unset;
/* 内容折叠样式 */
.content-collapsed {
max-height: 200rpx;
overflow: hidden;
position: relative;
&::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 60rpx;
background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
}
}
.expand-button {
margin-top: 12rpx;
text-align: center;
color: var(--td-brand-color-5);
font-size: 26rpx;
padding: 8rpx 0;
}
.scrollable-content {
max-height: 300rpx;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
padding-right: 10rpx;
}
::v-deep .t-swiper {
height: auto !important;
min-height: 500px;
}
::v-deep .t-swiper-item {
//height: 100%!important;
height: unset !important;
height: auto !important;
overflow-y: auto;
}
</style>
@@ -116,20 +116,38 @@
<t-radio :block="false" name="radio" :value="false" label="否"/>
</t-radio-group>
</t-form-item>
<t-form-item label="展示才艺" :name="`userList[${index}].isShowSkill`" :rules="[{required:true,message: '请选择是否展示才艺'}]">
<t-radio-group v-model="user.isShowSkill" class="radio-box">
<t-form-item label="交通方式" :name="`userList[${index}].traffic`" :rules="[{required:true,message: '请选择交通方式'}]">
<t-radio-group v-model="user.traffic" class="radio-box">
<t-radio :block="false" name="radio" :value="'自驾'" label="自驾"/>
<t-radio :block="false" name="radio" :value="'公共交通'" label="公共交通"/>
</t-radio-group>
</t-form-item>
<t-form-item v-if="user.traffic === '自驾'" label="车牌号" :name="`userList[${index}].carNo`" :rules="[{required:true,message: '请输入车牌号'}]">
<t-input v-model="user.carNo" borderless placeholder="请输入车牌号"></t-input>
</t-form-item>
<t-form-item v-if="user.traffic === '公共交通'" label="是否接站" :name="`userList[${index}].isStation`" :rules="[{required:true,message: '请选择是否接站'}]">
<t-radio-group v-model="user.isStation" class="radio-box">
<t-radio :block="false" name="radio" :value="true" label="是"/>
<t-radio :block="false" name="radio" :value="false" label="否"/>
</t-radio-group>
</t-form-item>
<template v-if="formData.userList[index]?.isShowSkill">
<t-form-item label="才艺名称" :name="`userList[${index}].skillName`" :rules="[{required:user.isShowSkill===true,message: '请填写才艺名称'}]">
<t-input v-model="user.skillName" borderless placeholder="请输入才艺名称"></t-input>
</t-form-item>
<t-form-item label="所需器材" :name="`userList[${index}].equip`" :rules="[{required:user.isShowSkill===true,message: '请填写才艺所需器材'}]">
<t-input v-model="user.equip" borderless placeholder="请填写才艺所需器材"></t-input>
</t-form-item>
</template>
<!-- <t-form-item label="展示才艺" :name="`userList[${index}].isShowSkill`" :rules="[{required:true,message: '请选择是否展示才艺'}]">-->
<!-- <t-radio-group v-model="user.isShowSkill" class="radio-box">-->
<!-- <t-radio :block="false" name="radio" :value="true" label="是"/>-->
<!-- <t-radio :block="false" name="radio" :value="false" label="否"/>-->
<!-- </t-radio-group>-->
<!-- </t-form-item>-->
<!-- <template v-if="formData.userList[index]?.isShowSkill">-->
<!-- <t-form-item label="才艺名称" :name="`userList[${index}].skillName`" :rules="[{required:user.isShowSkill===true,message: '请填写才艺名称'}]">-->
<!-- <t-input v-model="user.skillName" borderless placeholder="请输入才艺名称"></t-input>-->
<!-- </t-form-item>-->
<!-- <t-form-item label="所需器材" :name="`userList[${index}].equip`" :rules="[{required:user.isShowSkill===true,message: '请填写才艺所需器材'}]">-->
<!-- <t-input v-model="user.equip" borderless placeholder="请填写才艺所需器材"></t-input>-->
<!-- </t-form-item>-->
<!-- </template>-->
<t-form-item label="参加嘉年华" :name="`userList[${index}].isParty`" :rules="[{required:true,message: '请选择是否参加嘉年华'}]">
<t-radio-group v-model="user.isParty" class="radio-box">
<t-radio :block="false" name="radio" :value="true" label="是"/>
@@ -206,6 +224,8 @@ const activeTabIndex = ref(0)
// 切换选项卡
function switchTab(index) {
activeTabIndex.value = index
// 添加滚动表单区域到顶部
scrollFormToTop()
}
// 添加新用户
@@ -229,6 +249,8 @@ function addNewUser() {
activeTabIndex.value = formData.value.userList.length - 1
// 滚动到最右边
scrollToRight()
// 添加滚动表单区域到顶部
scrollFormToTop()
}, 10)
}
@@ -270,6 +292,22 @@ function scrollToRight() {
})
}
// 滚动表单区域到顶部
function scrollFormToTop() {
setTimeout(() => {
const formArea = document.querySelector('.form-area')
if (formArea) {
formArea.scrollTop = 0
}
// 使用uni-app的方式也滚动
uni.pageScrollTo({
scrollTop: 0,
duration: 300
})
}, 50)
}
// 引导部分
const guideCurrent = ref(-1)
const guideSteps = [
@@ -47,12 +47,12 @@
<view v-else style="flex: 1;display: flex;justify-content: center;align-items: center">
<t-empty
image="/static/img/empty.png"
description="您没有任何团队信息,无法进行项目报名"
description="活动还没有自由组队,组队后方项目报名!"
style="flex: 1">
</t-empty>
</view>
<t-popup v-model:visible="showDescPicker" placement="bottom" destroy-on-close>
<t-popup v-model:visible="showDescPicker" placement="bottom" destroy-on-close style="max-height: 80vh;overflow-y: auto">
<view class="member-picker">
<view class="picker-header">
<text class="picker-title">项目介绍</text>
@@ -72,22 +72,29 @@
<view class="event-item-section">
<view class="event-item-section-title">
<t-icon name="flag" size="16px" color="var(--td-brand-color-5)"/>
<text>活动形式</text>
<text>比赛方法</text>
</view>
<view class="event-item-section-content">{{ team.form }}</view>
</view>
<view class="event-item-section">
<view class="event-item-section-title">
<t-icon name="chart-bar" size="16px" color="var(--td-brand-color-5)"/>
<text>评分规则</text>
<t-icon name="flag" size="16px" color="var(--td-brand-color-5)"/>
<text>评分标准</text>
</view>
<view class="event-item-section-content">{{ team.rule }}</view>
</view>
<view class="event-item-section">
<view class="event-item-section-title">
<t-icon name="chart-bar" size="16px" color="var(--td-brand-color-5)"/>
<text>比赛规则</text>
</view>
<view class="event-item-section-content">{{ team.ruleForm }}</view>
</view>
</view>
</view>
</view>
</view>
</t-popup>
+5 -3
View File
@@ -125,7 +125,7 @@
</view>
<view v-else style="flex: 1;display: flex;justify-content: center;align-items: center">
<t-empty image="/static/img/empty.png"
description="您没有任何团队信息"
description="活动还没未开始,请耐心等待!"
style="flex: 1">
</t-empty>
</view>
@@ -241,8 +241,10 @@ const getTeamInfo = async () => {
try {
const {code, msg, data} = await useRequest().post('/client/group/info/' + pageForm.actId);
if (code === 0) {
team.value = data
team.value.teamIsLeader = !!team.value.groupUsers.find(t => t.isLeader)
if(data){
team.value = data
team.value.teamIsLeader = !!team.value.groupUsers.find(t => t.isLeader)
}
} else {
Toast({message: msg, theme: 'error'});
}
+1
View File
@@ -306,6 +306,7 @@ async function handleLogin() {
url: redirect
})
}
uni.removeStorageSync("REDIRECT_URL")
}else{
uni.switchTab({
url: '/pages/index/index'
+21 -3
View File
@@ -171,10 +171,14 @@
<!-- 单位列表 -->
<scroll-view
scroll-y
:scroll-y="true"
class="units-scroll-view"
scroll-with-animation
:scroll-into-view="scrollViewId"
enable-back-to-top
enhanced
:bounces="false"
show-scrollbar
>
<view
v-for="unit in filteredUnits"
@@ -243,6 +247,15 @@ watch(showUnitPicker, (newVal) => {
selectedUnitId.value = formData.unitId;
// 设置scrollViewId以触发滚动
scrollViewId.value = `unit-${formData.unitId}`;
// 确保Android上滚动正常工作
nextTick(() => {
setTimeout(() => {
scrollViewId.value = '';
nextTick(() => {
scrollViewId.value = `unit-${formData.unitId}`;
});
}, 100);
});
} else {
selectedUnitId.value = '';
}
@@ -263,7 +276,11 @@ const clearSearch = () => {
// 选择单位
const selectUnit = (unit) => {
selectedUnitId.value = unit.id;
scrollViewId.value = `unit-${unit.id}`;
// 更新scrollViewId并确保滚动生效
scrollViewId.value = '';
nextTick(() => {
scrollViewId.value = `unit-${unit.id}`;
});
};
// 确认选择
@@ -372,7 +389,7 @@ const handleRegister = async () => {
if (code === 0) {
Dialog.confirm({
title: '注册成功',
content: '是否立即进入系统?',
content: '成功注册,是否进入系统,继续选择【赛事报名】?',
confirmBtn: '确定',
cancelBtn: '取消',
onConfirm: () => {
@@ -648,6 +665,7 @@ onMounted(() => {
.units-scroll-view {
flex: 1;
height: 60vh;
max-height: 600rpx;
padding-bottom: 30rpx;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 55 KiB