修复账号切换后「我的」页当前账号展示错误,并统一举报摄影师首页 URI。

切换账号时以用户选中账号为准写入展示标题与业务作用域,避免沿用旧门店名称;同时将首页举报摄影师入口 URI 对齐为 report_photographer。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-01 17:21:04 +08:00
parent fcb86d43f5
commit 5ab9b1b324
23 changed files with 419 additions and 92 deletions

View File

@ -13,6 +13,7 @@ struct AccountSnapshot: Codable, Equatable {
var profile: AccountProfile?
var accountType: String?
var businessUserId: Int?
var currentAccountDisplayTitle: String?
var currentRoleCode: String?
///
var currentRoleId: Int?
@ -26,6 +27,7 @@ struct AccountSnapshot: Codable, Equatable {
profile: AccountProfile? = nil,
accountType: String? = nil,
businessUserId: Int? = nil,
currentAccountDisplayTitle: String? = nil,
currentRoleCode: String? = nil,
currentRoleId: Int? = nil,
scenicScopes: [BusinessScope] = [],
@ -36,6 +38,7 @@ struct AccountSnapshot: Codable, Equatable {
self.profile = profile
self.accountType = accountType
self.businessUserId = businessUserId
self.currentAccountDisplayTitle = currentAccountDisplayTitle
self.currentRoleCode = currentRoleCode
self.currentRoleId = currentRoleId
self.scenicScopes = scenicScopes
@ -117,6 +120,7 @@ final class AccountSnapshotStore {
profile: accountContext.profile ?? existing?.profile,
accountType: accountContext.accountType ?? existing?.accountType,
businessUserId: existing?.businessUserId,
currentAccountDisplayTitle: accountContext.currentAccountDisplayTitle ?? existing?.currentAccountDisplayTitle,
currentRoleCode: currentRoleCode ?? existing?.currentRoleCode,
scenicScopes: accountContext.scenicScopes,
storeScopes: accountContext.storeScopes,