revert(common-tools): 回滚常用工具分类与三个工具页

按 2026-10-24 决定整体下线:工具目录分组、定价换算/五国ASIN/关键词共享
三页面与路由、资料下载区与测试全部移除;保留 package.json 的 test:mount
脚本(仓内测试基础设施,与后管同口径)。
This commit is contained in:
2026-10-24 01:43:45 +08:00
parent 314c283503
commit 634fefbc2f
29 changed files with 16 additions and 3234 deletions
@@ -12,15 +12,15 @@
<span class="hero-pill">运营辅助 · 数据安全 · 高效跟价</span>
<h1 class="hero-title">让亚马逊运营,更清晰高效</h1>
<p class="hero-sub">
从换算、查询、采集、去重到上架跟价,23 个工具按「常用 · 前端 · 运营 · 后勤」四线组织,每条工具一句话讲清用途,标准流程一步不缺。
从采集、去重、查品到上架跟价,20 个工具按「前端 · 运营 · 后勤」三线组织,每条工具一句话讲清用途,标准流程一步不缺。
</p>
<div class="hero-stats">
<div class="stat">
<strong style="color: #2dd4bf">23</strong>
<strong style="color: #2dd4bf">20</strong>
<span>个工具</span>
</div>
<div class="stat">
<strong style="color: #60a5fa">4</strong>
<strong style="color: #60a5fa">3</strong>
<span>大分类</span>
</div>
<div class="stat">
@@ -128,7 +128,7 @@ import AmazonFooterBar from '@/pages/amazon/components/AmazonFooterBar.vue'
import ToolIcon from '@/pages/amazon/components/ToolIcon.vue'
import { TUTORIAL_DOWNLOAD_URL, resolveTutorialDownloadUrl } from '@/pages/amazon/download-btn'
import { filterGroupsByPermission, filterWorkflowByPermission, TOOL_GROUPS, TOOL_MAP } from '@/pages/amazon/tool-catalog'
import type { ToolGroup, ToolGroupKey, ToolInfo, VisibleGroup, WorkflowStep } from '@/pages/amazon/tool-catalog'
import type { ToolGroup, ToolInfo, VisibleGroup, WorkflowStep } from '@/pages/amazon/tool-catalog'
import { resolvePageHref } from '@/shared/page-prefix'
import { isHttpUrl, safeHttpUrl } from '@/shared/utils/safe-url'
import { prefetchRouteChunk } from '@/shared/route-prefetch'
@@ -143,7 +143,7 @@ const visibleGroups = ref<VisibleGroup[]>(TOOL_GROUPS.map((group) => ({ ...group
const permissionUnavailable = ref(false)
const statusText = ref('')
const statusType = ref<'normal' | 'error'>('normal')
const activeCat = ref<ToolGroupKey>('front')
const activeCat = ref<'front' | 'ops' | 'logi'>('front')
let statusTimer: number | undefined
const currentGroup = computed(() => visibleGroups.value.find((g) => g.key === activeCat.value) ?? visibleGroups.value[0])
@@ -249,15 +249,15 @@ async function onDownloadClick() {
window.open(safeHttpUrl(url), '_blank', 'noopener')
}
function onCatChange(key: ToolGroupKey) {
function onCatChange(key: 'front' | 'ops' | 'logi') {
activeCat.value = key
history.replaceState(null, '', `#group-${key}`)
}
function parseHashGroup() {
const hash = window.location.hash.replace('#', '')
const m = /^group-(common|front|ops|logi)$/.exec(hash)
if (m) activeCat.value = m[1] as ToolGroupKey
const m = /^group-(front|ops|logi)$/.exec(hash)
if (m) activeCat.value = m[1] as 'front' | 'ops' | 'logi'
}
onMounted(async () => {
@@ -35,7 +35,6 @@ import AmazonTopBar from '@/pages/amazon/components/AmazonTopBar.vue'
import AmazonFooterBar from '@/pages/amazon/components/AmazonFooterBar.vue'
import DownloadProgressPanel from '@/shared/components/DownloadProgressPanel.vue'
import { TOOL_DETAILS, TOOL_GROUPS, TOOL_MAP } from '@/pages/amazon/tool-catalog'
import type { ToolGroupKey } from '@/pages/amazon/tool-catalog'
import { resolvePageHref } from '@/shared/page-prefix'
/** Aliprice 注册推广链接(对齐 gemini-code 工具页头 Aliprice 按钮) */
@@ -49,7 +48,7 @@ const props = defineProps<{
const tool = computed(() => TOOL_MAP.get(props.toolId))
const group = computed(() => TOOL_GROUPS.find((g) => g.tools.some((t) => t.id === props.toolId)))
const groupKey = computed<ToolGroupKey>(() => group.value?.key ?? 'front')
const groupKey = computed(() => group.value?.key ?? 'front')
const detailText = computed(() => {
if (!tool.value) return ''
return TOOL_DETAILS[tool.value.id] ?? tool.value.desc
@@ -42,21 +42,21 @@ import { computed, onMounted, ref } from 'vue'
import BrandApiSecretSettingsButton from '@/pages/brand/components/BrandApiSecretSettingsButton.vue'
import NotificationBell from '@/shared/components/NotificationBell.vue'
import { filterGroupsByPermission, TOOL_GROUPS } from '@/pages/amazon/tool-catalog'
import type { ToolGroupKey, VisibleGroup } from '@/pages/amazon/tool-catalog'
import type { VisibleGroup } from '@/pages/amazon/tool-catalog'
import { resolvePageHref } from '@/shared/page-prefix'
import { getCurrentUserAppColumnKeys } from '@/shared/api/permission'
const props = withDefaults(
defineProps<{
/** 当前工具所属分类(功能页高亮对应 tab;工具台首页不传) */
activeCat?: ToolGroupKey
activeCat?: 'front' | 'ops' | 'logi'
}>(),
{
activeCat: undefined,
},
)
const emit = defineEmits<{ change: [key: ToolGroupKey] }>()
const emit = defineEmits<{ change: [key: 'front' | 'ops' | 'logi'] }>()
const activeCat = computed(() => props.activeCat)
const visibleCats = ref<VisibleGroup[]>(TOOL_GROUPS.map((group) => ({ ...group, tools: [...group.tools] })))
@@ -67,7 +67,7 @@ const toolbarHref = resolvePageHref('/new_web_source/amazon-console.html')
/** 返回桌面入口首页(亚马逊/视频/图片入口) */
const homeHref = resolvePageHref('/new_web_source/home.html')
function onTabClick(key: ToolGroupKey) {
function onTabClick(key: 'front' | 'ops' | 'logi') {
emit('change', key)
}
@@ -1,43 +0,0 @@
/**
* 定价利润换算页 · 常用链接与资料下载
*
* 链接清单源自桌面版 shufu_calc_app.py 的 PAGE_LINKS / 资料页(2026-10-23 实测可达),
* 下载文件源自「数富资料下载_独立版_v1.0.0」,源文件在 public/materials/,
* 发布时由 scripts/deploy_app_web.py 的 EXPECTED_STATIC 白名单上传到站点 /static/。
*/
export type CommonLink = {
name: string
url: string
}
export type DownloadItem = {
name: string
/** public/materials/ 下的文件名(含空格/中文,渲染时 encodeURI) */
file: string
}
export const PRICING_COMMON_LINKS: ReadonlyArray<CommonLink> = [
{ name: 'Aliprice 1688 采集插件', url: 'https://www.aiprice.com/?ext_id=10100&channel=chrome_offline&platform=1688&version=4.0.5' },
{ name: '店小密导出设置', url: 'https://www.dianxiaomi.com/web/orderSetting/export' },
{ name: '数富AI BUG登记系统', url: 'https://bug.aishufu.top/bug-tracker/' },
{ name: '代理IP提取', url: 'https://www.jikip.com/user/extractapi' },
{ name: 'LLM 平台', url: 'https://ai.t8star.org/' },
{ name: '豆包CDN短链', url: 'https://aka.doubaocdn.com/s/O1DRPbr9rd#f=1' },
{ name: '紫鸟浏览器下载', url: 'https://www.ziniao.com/download/?from=97340' },
{ name: '无影下载', url: 'https://www.aliyun.com/product/wuying/download' },
{ name: 'WebView2 运行时', url: 'https://go.microsoft.com/fwlink/p/?LinkId=2124703' },
]
export const PRICING_DOWNLOADS: ReadonlyArray<DownloadItem> = [
{ name: 'winsrc兼容补丁.bat', file: 'winsrc兼容补丁.bat' },
{ name: '百分30利润表格.xlsx', file: '百分30利润表格.xlsx' },
{ name: '虚拟桌面任务工作_结构化.xlsx', file: '虚拟桌面任务工作_结构化.xlsx' },
{ name: '设置最低价ASIN 批量文档格式.xlsx', file: '设置最低价ASIN 批量文档格式.xlsx' },
]
export function downloadHref(file: string): string {
// 走既有 /static/ 静态位(nginx 已配,deploy_app_web.py 的 EXPECTED_STATIC 白名单同步登记);
// /materials/ 这类新目录不在发布清单里,上线即 404。
return `/static/${encodeURI(file)}`
}
+1 -44
View File
@@ -29,11 +29,8 @@ export type WorkflowStep = {
toolId?: string
}
/** 工具分组键(常用工具组排在最前) */
export type ToolGroupKey = 'common' | 'front' | 'ops' | 'logi'
export type ToolGroup = {
key: ToolGroupKey
key: 'front' | 'ops' | 'logi'
/** 菜单权限组键(与 BrandTopBar 一致) */
columnKey: string
name: string
@@ -51,37 +48,6 @@ export type ToolGroup = {
}
export const TOOL_GROUPS: ReadonlyArray<ToolGroup> = [
{
key: 'common',
columnKey: 'brand_common_tools',
name: '常用工具',
desc: '换算 · 查询 · 词库共享,高频小工具',
color: '#F59E0B',
weak: '#3A2A10',
tools: [
{
id: 'pricing-calc',
name: '定价利润换算',
desc: '输入售价、运费、成本,自动换算利润与毛利,多币种同步',
href: '/pricing-calc',
permissionKeys: ['pricing-calc'],
},
{
id: 'five-asin',
name: '五国ASIN快速查询',
desc: '按国家输入ASIN,自动生成带邮编与汇率的链接,跳转谷歌直达',
href: '/five-asin',
permissionKeys: ['five-asin'],
},
{
id: 'keyword-share',
name: '五国关键词共享',
desc: '词库跨账户共享、已使用标记、操作记录留痕,防重复使用',
href: '/keyword-share',
permissionKeys: ['keyword-share'],
},
],
},
{
key: 'front',
columnKey: 'brand_front_tools',
@@ -294,9 +260,6 @@ export const TOOL_GROUPS: ReadonlyArray<ToolGroup> = [
/** 图标渐变背景(照 icons.py ICON_COLORS 转 CSS) */
export const TOOL_ICON_GRADIENTS: Record<string, string> = {
'pricing-calc': 'linear-gradient(180deg, #FCD34D, #F59E0B)',
'five-asin': 'linear-gradient(180deg, #FDBA74, #F97316)',
'keyword-share': 'linear-gradient(180deg, #86EFAC, #22C55E)',
collect: 'linear-gradient(180deg, #5EEAD4, #14B8A6)',
variant: 'linear-gradient(180deg, #93C5FD, #3B82F6)',
dedupe: 'linear-gradient(180deg, #C4B5FD, #8B5CF6)',
@@ -324,12 +287,6 @@ export const TOOL_ICON_GRADIENTS: Record<string, string> = {
* 默认描边 stroke:#fff width:3(方头 butt),实心填充 shape 用 .fill 标记
*/
export const TOOL_ICON_SHAPES: Record<string, string> = {
// 定价利润换算:计算器(屏+按键)
'pricing-calc': '<rect x="12" y="8" width="24" height="32" rx="2"/><line x1="17" y1="14" x2="31" y2="14"/><line x1="18" y1="23" x2="22" y2="23"/><line x1="26" y1="23" x2="30" y2="23"/><line x1="18" y1="29" x2="22" y2="29"/><line x1="26" y1="29" x2="30" y2="29"/><line x1="18" y1="35" x2="22" y2="35"/><line x1="26" y1="35" x2="30" y2="35"/>',
// 五国ASIN快速查询:地球+放大镜
'five-asin': '<circle cx="21" cy="21" r="12"/><line x1="21" y1="9" x2="21" y2="33"/><line x1="9" y1="21" x2="33" y2="21"/><path d="M11 13 A 14 14 0 0 0 31 13"/><path d="M11 29 A 14 14 0 0 1 31 29"/><circle cx="32" cy="32" r="7"/><line x1="37" y1="37" x2="42" y2="42" stroke-width="4"/>',
// 五国关键词共享:分享三节点
'keyword-share': '<circle class="fill" cx="13" cy="24" r="4"/><circle class="fill" cx="34" cy="11" r="4"/><circle class="fill" cx="34" cy="37" r="4"/><line x1="16" y1="22" x2="31" y2="13"/><line x1="16" y1="26" x2="31" y2="35"/>',
// 采集数据:圆角方框+向下箭头
collect: '<rect x="10" y="8" width="28" height="24"/><line x1="24" y1="14" x2="24" y2="36"/><path class="fill" d="M19 33 L29 33 L24 38 Z"/>',
// ASIN变体采集:两个重叠方框