This commit is contained in:
Ls
2026-07-10 08:41:45 +08:00
parent d1eedfdc5b
commit d020483461
18 changed files with 1204 additions and 497 deletions

View File

@@ -21,7 +21,6 @@
</view>
<view class="card-info">
<text class="card-title">计时项目</text>
<text class="card-desc">记录单次训练的计时数据</text>
</view>
<view class="card-arrow">
<u-icon name="arrow-right" size="20" color="#1890ff"></u-icon>
@@ -37,7 +36,6 @@
</view>
<view class="card-info">
<text class="card-title">包干项目</text>
<text class="card-desc">记录固定距离的训练成绩</text>
</view>
<view class="card-arrow">
<u-icon name="arrow-right" size="20" color="#1890ff"></u-icon>
@@ -53,7 +51,6 @@
</view>
<view class="card-info">
<text class="card-title">分段项目</text>
<text class="card-desc">记录分段训练的详细数据</text>
</view>
<view class="card-arrow">
<u-icon name="arrow-right" size="20" color="#1890ff"></u-icon>
@@ -69,12 +66,11 @@
</view>
<view class="card-info">
<text class="card-title">混氧项目</text>
<text class="card-desc">记录混氧训练的计时数据</text>
</view>
<view class="card-arrow">
<u-icon name="arrow-right" size="20" color="#1890ff"></u-icon>
</view>
</view>
</view>
<!-- <view @click="Service.GoPage('/pages/userFunc/cs')" class="">
@@ -101,7 +97,8 @@
<!-- 项目列表 -->
<view class="project-list">
<text class="list-title" v-if="projects.length > 0">项目列表</text>
<scroll-view v-if="projects.length > 0" scroll-y="true" @scrolltolower='getList()' class="list-container">
<scroll-view v-if="projects.length > 0" scroll-y="true" @scrolltolower='getList()'
class="list-container">
<view v-for="(project,index) in projects" :key="project.planId" class="project-item"
@click="handleProjectClick(project)">
<view class="item-icon">
@@ -147,23 +144,23 @@
// 弹窗状态
const showTimingModal = ref(false)
let isUse=ref(false)
let isUse = ref(false)
onLoad(() => {
if (!Service.GetUserToken()) {
login()
}else{
} else {
isUseFunc()
}
})
onShow(()=>{
showTimingModal.value=false
onShow(() => {
showTimingModal.value = false
uni.showTabBar()
})
const login = () => {
uni.getProvider({
service: 'oauth',
@@ -190,18 +187,18 @@
}
});
}
const isUseFunc=()=>{
userService.IsCheakUserVerify().then(res=>{
if(res.code==0){
isUse.value=res.data.isCheak
}else{
const isUseFunc = () => {
userService.IsCheakUserVerify().then(res => {
if (res.code == 0) {
isUse.value = res.data.isCheak
} else {
Service.Msg(res.msg)
}
})
}
// 获取项目列表数据
const getData = () => {
@@ -213,7 +210,7 @@
// 获取项目列表
const getList = () => {
if (status.value == 'loading' || status.value == 'nomore') {
return
}
@@ -229,22 +226,22 @@
})
}
const goBaogan=()=>{
if(!isUse.value){
const goBaogan = () => {
if (!isUse.value) {
Service.Msg('用户暂无权限,请等待审核!')
return
}
Service.GoPage('/pages/userFunc/project')
}
// 显示计时项目列表弹窗
const showTimingProjectModal = (index : any) => {
if(!isUse.value){
if (!isUse.value) {
Service.Msg('用户暂无权限,请等待审核!')
return
}
uni.hideTabBar()
showTimingModal.value = true
currentIndex.value = index
@@ -283,7 +280,7 @@
showTimingModal.value = false
Service.GoPage('/pages/userFunc/hunyang?id=' + project.planId)
}
}
</script>