合并 main 分支并融合订单列表最小化与 SQL 治理

- Auth/权限中间件取 main 演进版(错误细分、token 来源),保留 dev 的用户 cookie 与登出撤销语义
- 后台订单列表:融合 main 的首页免 COUNT 优化与关键词索引路由,保留 dev 的最小化 AdminOrderListItemDTO(结账明细仍由详情接口返回,同步调整对应集成测试)
- 保留 dev 的 token_version 冻结/解冻递增与 main 的状态变化判断及通知
- 前端:保留 dev 登出接口与 main 的 fetchMe silent 参数、SSE 登录跳转;后台订单表按 dev 最小化 DTO 移除号主到手列
This commit is contained in:
yml2213
2026-09-05 11:43:13 +08:00
294 changed files with 30171 additions and 13439 deletions
+1 -1
View File
@@ -175,7 +175,7 @@ function getRequestScope(url = ''): AuthScope {
return url.startsWith('/admin') ? 'admin' : 'user'
}
function redirectToLogin(scope: AuthScope) {
export function redirectToLogin(scope: AuthScope) {
clearAuthStorage(scope)
const currentPath = window.location.pathname + window.location.search
const loginPath = getLoginPath(scope, currentPath)
+6 -2
View File
@@ -23,8 +23,12 @@ export async function uploadFile(file: File, scene: string) {
return data.data
}
export async function uploadAdminFile(file: File, scene: string) {
const uploadTarget = await optimizeImageForUpload(file, scene)
export async function uploadAdminFile(
file: File,
scene: string,
options: { optimize?: boolean } = {}
) {
const uploadTarget = options.optimize === false ? file : await optimizeImageForUpload(file, scene)
const form = new FormData()
form.append('file', uploadTarget)
form.append('scene', scene)
+4
View File
@@ -15,10 +15,14 @@ export type PublishForm = {
login_method: string
online_start: string
online_end: string
/** 是否可在凌晨 0-2 点响应上号(是/否) */
early_morning_response: string
/** 是否可以修改游戏名(是/否) */
can_change_game_name: string
/** 是否有全英雄(是/否) */
all_hero: string
/** 下赛季是否购买通行证(购买/不购买) */
next_season_pass: string
ban_record: string
common_regions: string[]
depositAmountYuan: number | ''
+2 -2
View File
@@ -53,8 +53,8 @@ export const AUDIT_ACTION_OPTIONS: AuditOption[] = [
{ value: 'chat.renter_retention.remove', label: '到期移除租客会话', group: '系统任务' },
// 提号
{ value: 'pickup_create', label: '创建提号', group: '提号' },
{ value: 'pickup_complete', label: '完成提号结算', group: '提号', highRisk: true },
{ value: 'pickup_offline_settlement', label: '确认提号线下结算', group: '提号', highRisk: true },
{ value: 'pickup_complete', label: '完成提号结算', group: '提号', highRisk: true },
{ value: 'pickup_offline_settlement', label: '确认提号线下结算', group: '提号', highRisk: true },
{ value: 'pickup_profit_update', label: '修改提号利润', group: '提号', highRisk: true },
{ value: 'pickup_cancel', label: '取消提号', group: '提号' },
// 申诉
@@ -158,6 +158,10 @@ export function getListingChips(item: PublicListingItem): ListingDisplayChip[] {
if (readAssetString(item, 'all_hero') === '是') {
chips.push({ label: '全英雄', value: '是' })
}
const nextSeasonPass = readAssetString(item, 'next_season_pass')
if (nextSeasonPass === '购买' || nextSeasonPass === '不购买') {
chips.push({ label: '下赛季通行证', value: nextSeasonPass })
}
return chips.filter(chip => chip.value)
}
+7 -5
View File
@@ -160,11 +160,13 @@ export function handoffStatusLabel(status: string) {
return readLabel(handoffStatusMap, status)
}
export function orderHandoffStatusLabel(order?: {
handoff_status?: string
handoff_mode?: string
settlement_mode?: string
} | null) {
export function orderHandoffStatusLabel(
order?: {
handoff_status?: string
handoff_mode?: string
settlement_mode?: string
} | null
) {
const status = order?.handoff_status || ''
if (order?.handoff_mode !== 'platform' && order?.settlement_mode !== 'platform_managed') {
return handoffStatusLabel(status)