This commit is contained in:
Ls
2026-05-26 08:41:00 +08:00
parent 11486220aa
commit d1eedfdc5b
18 changed files with 7861 additions and 1475 deletions

View File

@@ -29,7 +29,7 @@
</view>
<!-- 包干项目模块 -->
<view @click="Service.GoPage('/pages/userFunc/project')" class="create-card package-card">
<view @click=" goBaogan()" class="create-card package-card">
<view class="card-icon">
<view class="icon-circle package-icon">
<u-icon name="grid" size="40" color="#fff"></u-icon>
@@ -74,8 +74,12 @@
<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="">
cs
</view> -->
</view>
<!-- 计时项目列表弹窗 -->
@@ -98,11 +102,11 @@
<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">
<view v-for="project in projects" :key="project.planId" class="project-item"
<view v-for="(project,index) in projects" :key="project.planId" class="project-item"
@click="handleProjectClick(project)">
<view class="item-icon">
<view class="icon-bg">
<text class="icon-text">{{ project.name.charAt(0) }}</text>
<text class="icon-text">{{ index+1 }}</text>
</view>
</view>
<view class="item-info">
@@ -128,6 +132,7 @@
import { onLoad, onShow } from '@dcloudio/uni-app'
import { loginService } from '@/Service/swimming/loginService'
import { PlanService } from '@/Service/swimming/PlanService'
import { userService } from '@/Service/swimming/userService'
@@ -142,10 +147,15 @@
// 弹窗状态
const showTimingModal = ref(false)
let isUse=ref(false)
onLoad(() => {
if (!Service.GetUserToken()) {
login()
}else{
isUseFunc()
}
})
@@ -167,6 +177,7 @@
).then(content => {
if (content.code == 0) {
Service.SetUserToken(content.data.token)
isUseFunc()
} else {
Service.Msg(content.msg)
}
@@ -179,6 +190,18 @@
}
});
}
const isUseFunc=()=>{
userService.IsCheakUserVerify().then(res=>{
if(res.code==0){
isUse.value=res.data.isCheak
}else{
Service.Msg(res.msg)
}
})
}
// 获取项目列表数据
const getData = () => {
@@ -206,11 +229,23 @@
})
}
const goBaogan=()=>{
if(!isUse.value){
Service.Msg('用户暂无权限,请等待审核!')
return
}
Service.GoPage('/pages/userFunc/project')
}
// 显示计时项目列表弹窗
const showTimingProjectModal = (index : any) => {
if(!isUse.value){
Service.Msg('用户暂无权限,请等待审核!')
return
}
uni.hideTabBar()
showTimingModal.value = true
currentIndex.value = index
getData()
@@ -531,6 +566,7 @@
backdrop-filter: blur(10rpx);
z-index: 998;
animation: fadeIn 0.3s ease;
height: 100vh;
}
.modal-header {
@@ -578,7 +614,7 @@
transform: translate(-50%, -50%);
width: 90%;
max-width: 680rpx;
max-height: 80vh;
height: 80vh;
background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
border-radius: 32rpx;
z-index: 999;
@@ -659,7 +695,7 @@
display: flex;
flex-direction: column;
gap: 16rpx;
max-height: 240rpx;
max-height: 800rpx;
}
.project-item {