fix(userManagement): 补传添加成员 relationType 并修复删除后同步空列表报错
- 一键添加本人传 relationType=1,其他添加新增传 relationType=2 - _clearAndSync 待下发列表为空时跳过 syncMembersToDevice,避免空列表 reject Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Code
parent
9332990a77
commit
9d56e63ce0
@@ -391,12 +391,15 @@ Page({
|
||||
|
||||
this.setData({ syncShow: true, syncPercent: 0, syncStatus: '正在清空并重新下发...' })
|
||||
leFuService.clearDeviceMembers()
|
||||
.then(() => leFuService.syncMembersToDevice(syncDataList, (current, total) => {
|
||||
this.setData({
|
||||
syncPercent: Math.round((current / total) * 100),
|
||||
syncStatus: `正在同步 ${current}/${total}...`,
|
||||
.then(() => {
|
||||
if (!syncDataList.length) return
|
||||
return leFuService.syncMembersToDevice(syncDataList, (current, total) => {
|
||||
this.setData({
|
||||
syncPercent: Math.round((current / total) * 100),
|
||||
syncStatus: `正在同步 ${current}/${total}...`,
|
||||
})
|
||||
})
|
||||
}))
|
||||
})
|
||||
.then(() => this._finishSync(reportUsers, '重新下发成功'))
|
||||
.catch((err: Error) => {
|
||||
this.setData({ syncShow: false })
|
||||
@@ -485,6 +488,7 @@ Page({
|
||||
if (!sn) return
|
||||
|
||||
addSelfUser({
|
||||
relationType: 1,
|
||||
dataType: 0,
|
||||
parentUserId: userInfo.userId,
|
||||
sn,
|
||||
|
||||
Reference in New Issue
Block a user