订单接口最小化与私有文件访问加固
- 订单列表使用独立最小 DTO 并分页,号主待办提供独立接口与统计 - 用户 token 增加版本控制,冻结/改密/退出即时撤销会话 - 移除 URL token 传参,SSE 与接口统一使用 HttpOnly Cookie - 私有文件按上传归属与业务关联授权,收款凭证转私有访问并校验归属 - 公开商品接口返回最小字段,隐藏号主身份与内部状态 - 每日清理超过 30 天未关联业务的上传归属,上传归属失败时补偿删除对象
This commit is contained in:
@@ -80,6 +80,14 @@ export async function resetPassword(phone: string, code: string, newPassword: st
|
||||
await apiClient.post('/auth/password/reset', { phone, code, new_password: newPassword })
|
||||
}
|
||||
|
||||
export async function logoutUser() {
|
||||
await apiClient.post('/auth/logout', undefined, {
|
||||
silent: true,
|
||||
skipErrorHandler: true,
|
||||
skipAuthRefresh: true,
|
||||
})
|
||||
}
|
||||
|
||||
export async function fetchMe() {
|
||||
const { data } = await apiClient.get<ApiResponse<AuthUser>>('/me')
|
||||
return data.data
|
||||
|
||||
@@ -267,8 +267,8 @@ function confirmLogout() {
|
||||
confirmButtonColor: '#ee0a24',
|
||||
cancelButtonText: '取消',
|
||||
})
|
||||
.then(() => {
|
||||
session.logout()
|
||||
.then(async () => {
|
||||
await session.logout()
|
||||
router.replace('/m')
|
||||
})
|
||||
.catch(() => {})
|
||||
|
||||
Reference in New Issue
Block a user