feat(web): 前端 SPA 化 + 工具页任务面板统一与历史批量删除
- SPA 化:22 个 MPA html 入口与 *-main.ts 合并为 index.html + vue-router(URL 无 .html 后缀), 页面跳转全部 router-link,/new_web_source/xxx.html 旧路径归一为 /xxx - 任务面板统一:共享 TaskCenterPanel/TaskItemCard/TaskStatCards/HistoryTaskLayer, 16 个工具页右侧统一为统计卡 + 当前任务 + 历史任务弹层(任务ID/开始/结束/状态必展示) - 历史记录支持单条删除 + 批量勾选删除(确认框/全选/失败提示) - Java 7 模块(dedupe/convert/split/productrisk/shopmatch/pricetrack/deletebrand) history 接口补齐任务时间字段(VO+Service,复用 biz_file_task 列) - 图片工作台/API 层(brand/permission/user)既有未提交改动一并提交
This commit is contained in:
@@ -1,20 +1,18 @@
|
||||
/**
|
||||
* 页面路径环境适配
|
||||
*
|
||||
* 生产环境(桌面客户端 Flask)功能页由 /new_web_source/ 路由提供;
|
||||
* vite dev 下页面直接挂在根路径。旧静态页(/brand、/web_source/*)仅生产存在。
|
||||
* SPA 化(2026-09-08)后所有页面统一为无 .html 后缀的路径(/home、/dedupe …),
|
||||
* 生产(https://api.aishufu.top)与 vite dev 前缀一致,无需再区分环境。
|
||||
* 旧 MPA 链接形式 /new_web_source/xxx.html 由本模块归一为 /xxx。
|
||||
*/
|
||||
|
||||
/** 当前是否运行在桌面客户端生产环境(页面路径以 /new_web_source/ 开头) */
|
||||
export function isDesktopClientPage(): boolean {
|
||||
return typeof window !== 'undefined' && window.location.pathname.startsWith('/new_web_source')
|
||||
}
|
||||
|
||||
/** 链接本地化:dev 预览去掉 /new_web_source 前缀;/brand、/web_source/* 等旧静态页仅桌面端可用 */
|
||||
/** 归一页面链接:/new_web_source/xxx.html → /xxx;其余原样返回 */
|
||||
export function resolvePageHref(rawHref?: string): string {
|
||||
if (!rawHref) return ''
|
||||
if (rawHref.startsWith('/new_web_source/')) {
|
||||
return `${isDesktopClientPage() ? '/new_web_source' : ''}${rawHref.slice('/new_web_source'.length)}`
|
||||
}
|
||||
return isDesktopClientPage() ? rawHref : ''
|
||||
return rawHref.replace(/^\/new_web_source\/(.+)\.html$/, '/$1')
|
||||
}
|
||||
|
||||
/** 兼容旧引用:SPA 下生产/开发路径一致,恒为 false(页面不再按路径区分桌面/Web) */
|
||||
export function isDesktopClientPage(): boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user