fix(data): 切换成员时补充 id 字段并修复 userId 类型问题

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
17792275749
2026-05-27 10:40:37 +08:00
co-authored by Claude Sonnet 4.6
parent 32dd83a738
commit d373da11c7
2 changed files with 5 additions and 4 deletions
@@ -15,6 +15,7 @@ interface AddMemberApiItem {
/** GET /weighingScale/v3/select/history/user 返回的单条结构 */
interface HistoryApiItem {
id: string
userId: string
realname: string
sex: number
@@ -123,7 +124,7 @@ Component({
get<HistoryApiItem[]>('weighingScale/v3/select/history/user', params, { loading: false })
.then((res: any) => {
const members: ExistingMember[] = (res.result ?? []).map((item: HistoryApiItem) => ({
id: item.userId,
id: item.id,
name: item.realname,
gender: item.sex === 1 ? '男' : '女',
age: this._calcAge(item.birthday),