fix(data): 历史数据切换成员列表排除当前查看的用户
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
3efd29c84e
commit
87b789f5f3
@@ -58,6 +58,11 @@ Component({
|
||||
source: {
|
||||
type: String,
|
||||
value: 'addMember'
|
||||
},
|
||||
/** 需要排除的用户 ID(history 模式下排除当前查看的成员) */
|
||||
excludeUserId: {
|
||||
type: String,
|
||||
value: ''
|
||||
}
|
||||
},
|
||||
|
||||
@@ -111,7 +116,11 @@ Component({
|
||||
wx.showLoading({ title: '加载中...', mask: true })
|
||||
|
||||
if (this.properties.source === 'history') {
|
||||
get<HistoryApiItem[]>('weighingScale/v3/select/history/user', { userId }, { loading: false })
|
||||
const params: Record<string, string> = { userId }
|
||||
if (this.properties.excludeUserId) {
|
||||
params.userIdExclude = this.properties.excludeUserId
|
||||
}
|
||||
get<HistoryApiItem[]>('weighingScale/v3/select/history/user', params, { loading: false })
|
||||
.then((res: any) => {
|
||||
const members: ExistingMember[] = (res.result ?? []).map((item: HistoryApiItem) => ({
|
||||
id: item.userId,
|
||||
|
||||
Reference in New Issue
Block a user