fix bugs
This commit is contained in:
@@ -171,6 +171,7 @@
|
||||
import competitionAPI from '@/api/competition.js'
|
||||
import athleteAPI from '@/api/athlete.js'
|
||||
import registrationAPI from '@/api/registration.js'
|
||||
import { getUserInfo } from '@/utils/auth.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -286,9 +287,21 @@ export default {
|
||||
*/
|
||||
async loadPlayerList() {
|
||||
try {
|
||||
// 获取当前用户信息
|
||||
const userInfo = getUserInfo()
|
||||
if (!userInfo || !userInfo.userId) {
|
||||
uni.showToast({
|
||||
title: '请先登录',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// 只查询当前用户创建的选手
|
||||
const res = await athleteAPI.getAthleteList({
|
||||
current: 1,
|
||||
size: 100
|
||||
size: 100,
|
||||
createUser: userInfo.userId
|
||||
})
|
||||
|
||||
let list = []
|
||||
@@ -363,8 +376,10 @@ export default {
|
||||
}
|
||||
},
|
||||
goToAddPlayer() {
|
||||
// 传递赛事ID和项目ID到新增选手页面
|
||||
const projectIds = this.selectedProjects.map(p => p.id).join(',')
|
||||
uni.navigateTo({
|
||||
url: '/pages/add-player/add-player'
|
||||
url: `/pages/add-player/add-player?competitionId=${this.eventId}&projectIds=${projectIds}`
|
||||
});
|
||||
},
|
||||
handleEdit(item) {
|
||||
|
||||
Reference in New Issue
Block a user