fix(team): 修复编辑集体时id字段丢失的问题
- 将id字段改为teamId,与后端DTO保持一致 - 使用String类型传递teamId和memberIds,避免精度丢失
This commit is contained in:
@@ -188,18 +188,15 @@ export default {
|
||||
const userInfo = getUserInfo()
|
||||
|
||||
const data = {
|
||||
id: this.teamId,
|
||||
teamId: this.teamId ? String(this.teamId) : null,
|
||||
teamName: this.formData.name,
|
||||
remark: this.formData.remark,
|
||||
memberIds: this.formData.members.map(m => m.id),
|
||||
memberIds: this.formData.members.map(m => String(m.id)),
|
||||
createUser: userInfo?.userId
|
||||
}
|
||||
|
||||
if (athleteAPI.updateTeam) {
|
||||
await athleteAPI.updateTeam(data)
|
||||
} else if (athleteAPI.saveTeam) {
|
||||
await athleteAPI.saveTeam(data)
|
||||
}
|
||||
console.log('Submitting team data:', JSON.stringify(data))
|
||||
await athleteAPI.saveTeam(data)
|
||||
|
||||
uni.showToast({
|
||||
title: '保存成功',
|
||||
|
||||
Reference in New Issue
Block a user