feat(frontend-vue): 亚马逊运营工具台与新功能页接入——新版工具台(amazon-console+tool-catalog)、品牌检测/ASIN变体采集/查询ASIN 三个工具页 Vue 化并对接既有后端与桌面桥接;桌面首页/登录页 Vue 化(沿用旧视觉);补充 vc_*/get_device_id/save_file_from_url 桥类型、dev 代理;品牌默认勾选排名+FBM;修正 query-asin 标题
含未提交新版改造累积:Brand*Tab 套入工具台壳(AmazonToolPageShell/AmazonTopBar)与目录/权限联动。
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* 页面路径环境适配
|
||||
*
|
||||
* 生产环境(桌面客户端 Flask)功能页由 /new_web_source/ 路由提供;
|
||||
* vite dev 下页面直接挂在根路径。旧静态页(/brand、/web_source/*)仅生产存在。
|
||||
*/
|
||||
|
||||
/** 当前是否运行在桌面客户端生产环境(页面路径以 /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/* 等旧静态页仅桌面端可用 */
|
||||
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 : ''
|
||||
}
|
||||
Reference in New Issue
Block a user