修复账号切换后「我的」页当前账号展示错误,并统一举报摄影师首页 URI。
切换账号时以用户选中账号为准写入展示标题与业务作用域,避免沿用旧门店名称;同时将首页举报摄影师入口 URI 对齐为 report_photographer。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -89,12 +89,18 @@ final class SessionBootstrapper {
|
||||
/// 将缓存快照恢复到账号上下文。
|
||||
private func restoreCachedSnapshot(to accountContext: AccountContext) -> AccountSnapshot? {
|
||||
guard let snapshot = snapshotStore.load() else { return nil }
|
||||
accountContext.applyLogin(profile: snapshot.profile, accountType: snapshot.accountType)
|
||||
accountContext.applyLogin(
|
||||
profile: snapshot.profile,
|
||||
accountType: snapshot.accountType,
|
||||
businessUserId: snapshot.businessUserId,
|
||||
displayTitle: snapshot.currentAccountDisplayTitle
|
||||
)
|
||||
accountContext.replaceScopes(
|
||||
scenic: snapshot.scenicScopes,
|
||||
stores: snapshot.storeScopes,
|
||||
currentScenicId: snapshot.currentScenicId,
|
||||
currentStoreId: snapshot.currentStoreId
|
||||
currentStoreId: snapshot.currentStoreId,
|
||||
explicitSelection: true
|
||||
)
|
||||
return snapshot
|
||||
}
|
||||
@ -198,6 +204,7 @@ final class SessionBootstrapper {
|
||||
profile: accountContext.profile,
|
||||
accountType: accountContext.accountType ?? existing?.accountType,
|
||||
businessUserId: existing?.businessUserId,
|
||||
currentAccountDisplayTitle: accountContext.currentAccountDisplayTitle ?? existing?.currentAccountDisplayTitle,
|
||||
currentRoleCode: permissionContext.currentAppRole?.rawValue ?? existing?.currentRoleCode,
|
||||
scenicScopes: accountContext.scenicScopes,
|
||||
storeScopes: accountContext.storeScopes,
|
||||
|
||||
Reference in New Issue
Block a user