修复账号切换后「我的」页当前账号展示错误,并统一举报摄影师首页 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

@ -179,7 +179,7 @@ struct LoginView: View {
do {
try await globalLoading.withLoading(message: "账号切换中...") {
let response = try await viewModel.selectAccount(account, authAPI: authAPI)
await completeLogin(with: response)
await completeLogin(with: response, selectedAccount: account)
}
} catch is CancellationError {
// Keep cancellation silent; the current task was abandoned by SwiftUI.
@ -190,7 +190,7 @@ struct LoginView: View {
}
///
private func completeLogin(with response: V9AuthResponse) async {
private func completeLogin(with response: V9AuthResponse, selectedAccount: AccountSwitchAccount? = nil) async {
do {
try await authSessionCoordinator.completeLogin(
with: response,
@ -200,7 +200,8 @@ struct LoginView: View {
accountContext: accountContext,
permissionContext: permissionContext,
profileAPI: profileAPI,
accountContextAPI: accountContextAPI
accountContextAPI: accountContextAPI,
selectedAccount: selectedAccount
)
} catch {
toastCenter.show(error.localizedDescription)