diff --git a/package.json b/package.json index 11197d9..5603932 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "dev": "vite --open", "clean": "node scripts/clean-dist.mjs", - "build": "vite build", + "build": "node --max-old-space-size=4096 ./node_modules/vite/bin/vite.js build", "preview": "vite preview" }, "dependencies": { diff --git a/src/api/accountPool.js b/src/api/accountPool.js index 2206e2e..bf874a3 100644 --- a/src/api/accountPool.js +++ b/src/api/accountPool.js @@ -51,6 +51,38 @@ export function updateAccountPoolRemark(module, data) { }); } +export function setAccountPoolUnavailable(module, data) { + return request({ + url: `${base(module)}/setUnavailable`, + method: 'post', + data, + }); +} + +export function updateAccountPoolUsable(module, data) { + return request({ + url: `${base(module)}/updateUsable`, + method: 'post', + data, + }); +} + +export function updateAccountPoolPlatform(module, data) { + return request({ + url: `${base(module)}/updatePlatform`, + method: 'post', + data, + }); +} + +export function unextractAccountPool(module, data) { + return request({ + url: `${base(module)}/unextract`, + method: 'post', + data, + }); +} + export function replenishAccountPool(module, data) { return request({ url: `${base(module)}/replenish`, diff --git a/src/components/CommonAside.vue b/src/components/CommonAside.vue index c9bfec3..8f3f19c 100644 --- a/src/components/CommonAside.vue +++ b/src/components/CommonAside.vue @@ -14,7 +14,6 @@ @@ -284,10 +284,29 @@ const currentModule = computed(() => { }); const displayMenus = computed(() => { - // 侧边栏始终展示完整菜单树,不随当前路由切换为“子菜单视图” + // 侧边栏始终展示完整菜单树,不随当前路由切换为"子菜单视图" return list.value; }); +const findOpenMenuPaths = (menus, targetPath, ancestors = []) => { + for (const menu of menus) { + const currentPath = menu.path || menu.id.toString(); + if (menu.path && (targetPath === menu.path || targetPath.startsWith(menu.path + "/"))) { + return [...ancestors, currentPath]; + } + if (menu.children && menu.children.length > 0) { + const found = findOpenMenuPaths(menu.children, targetPath, [...ancestors, currentPath]); + if (found) return found; + } + } + return null; +}; + +const defaultOpeneds = computed(() => { + const result = findOpenMenuPaths(displayMenus.value, route.path); + return result || []; +}); + const asideTitle = computed(() => { if (isCollapse.value) return "管理"; return "菜单"; @@ -311,7 +330,7 @@ const processMenus = (menus) => { .map((menu) => ({ id: menu.id, path: menu.path, - icon: menu.icon || "Document", + icon: menu.icon || null, title: menu.title, route: menu.path, component_path: menu.component_path, @@ -541,13 +560,13 @@ h3 { // 高亮样式 .el-menu-item.is-active { html:not(.dark) & { - background-color: rgba(57, 115, 255, 0.3) !important; + background-color: rgba(255, 255, 255, 0.2) !important; + border-left: 3px solid #ffffff; } html.dark & { background-color: rgba(60, 60, 60, 0.8) !important; } color: #ffffff !important; - border-left: 3px solid #4f84ff; margin-left: -3px; .menu-icon { @@ -574,12 +593,17 @@ h3 { } &.is-opened .el-sub-menu__title { - background: rgba(255, 255, 255, 0.08) !important; + background: rgba(255, 255, 255, 0.12) !important; + margin-left: -3px; } .el-menu-item { padding-left: 48px !important; font-size: 13px; + + &.is-active { + background: rgba(255, 255, 255, 0.18) !important; + } } } @@ -604,6 +628,10 @@ h3 { .el-sub-menu.is-opened .el-sub-menu__title { background: rgba(64, 158, 255, 0.08) !important; } + + .el-sub-menu .el-menu-item.is-active { + background: rgba(64, 158, 255, 0.15) !important; + } } } diff --git a/src/views/accountpool/cursor/components/detail.vue b/src/views/accountpool/cursor/components/detail.vue index c0db780..21505ac 100644 --- a/src/views/accountpool/cursor/components/detail.vue +++ b/src/views/accountpool/cursor/components/detail.vue @@ -1,6 +1,6 @@ @@ -87,84 +189,431 @@ function copyToken() { - - {{ row.id }} - {{ typeText(row.type) }} - {{ row.account || '-' }} - {{ row.password || '-' }} - - {{ row.token || '-' }} - - - {{ - row.extractStatus === 2 ? '补号' : row.extracted ? '已提取' : '未提取' - }} - - - {{ - row.isUsed === null || row.isUsed === undefined - ? '未探测' - : Number(row.isUsed) === 1 - ? '可用' - : Number(row.isUsed) === 0 - ? '已用完' - : String(row.isUsed) - }} - - {{ row.extractedAt || '-' }} - - - {{ platformLabel }} - - - - - -
- 账号+密码 - Token + + +
+
+
+
ID
+
{{ row?.id || "-" }}
+
+
+
账号类型
+
+ {{ typeInfo.label }} +
+
+
+
提取状态
+
+ + {{ statusInfo.label }} + +
+
+
+
提取平台
+
+ + {{ platformInfo.label }} + + - +
+
+
+
提取时间
+
{{ row.extractedAt || "-" }}
+
+
+
可用检测
+
+ + {{ isUsedInfo.label }} + +
+
+
+
账号
+
{{ row.account || "-" }}
+
+
+
密码
+
{{ row.password || "-" }}
+
+
+ +
+
+
+
Token
+
+ 长 Token 已做自动换行,便于检查与复制 +
+
+ + 复制 Token
- - +
{{ row.token || "暂无 Token" }}
+
+ +
+
+
+
快捷功能
+
按使用场景复制账号信息
+
+
+
+ + 复制账号+密码 + + + 复制 Token + + + 复制全部 + +
+
+ +
+
+
+
维护操作
+
+ 点击按钮后打开确认/编辑弹窗,再执行对应操作 +
+
+
+
+ + 改可用状态 + + + 改不可用 + + + 改平台 + + + 反提取 + + + 改备注 + +
+
+ +
+
+
+
备注
+
备注改为弹窗编辑,当前仅展示
+
+
+
{{ row.remark || "暂无备注" }}
+
+
+ + + + + + + 可用 + 不可用 + + + + + + + + + 确认将当前账号标记为不可用/已用完? + + + + + + + + + + + + + + + + + + 反提取会把账号恢复为未提取,并清空提取时间与提取平台。 + + + + + + + diff --git a/src/views/accountpool/cursor/components/edit.vue b/src/views/accountpool/cursor/components/edit.vue index b6c00d8..dc58fa0 100644 --- a/src/views/accountpool/cursor/components/edit.vue +++ b/src/views/accountpool/cursor/components/edit.vue @@ -1,5 +1,6 @@ @@ -78,69 +161,406 @@ function copyToken() { - - {{ row.id }} - {{ typeText(row.type) }} - {{ row.account || '-' }} - {{ row.password || '-' }} - - {{ row.token || '-' }} - - {{ - row.extractStatus === 2 ? '补号' : row.extracted ? '已提取' : '未提取' - }} - {{ row.extractedAt || '-' }} - - {{ platformLabel }} - - - - -
- 账号+密码 - Token + + +
+
+
+
ID
+
{{ row?.id || "-" }}
+
+
+
账号类型
+
+ {{ typeInfo.label }} +
+
+
+
提取状态
+
+ + {{ statusInfo.label }} + +
+
+
+
提取平台
+
+ + {{ platformInfo.label }} + + - +
+
+
+
提取时间
+
{{ row.extractedAt || "-" }}
+
+
+
可用检测
+
+ + {{ isUsedInfo.label }} + +
+
+
+
账号
+
{{ row.account || "-" }}
+
+
+
密码
+
{{ row.password || "-" }}
+
+
+ +
+
+
+
Token
+
+ 长 Token 已做自动换行,便于检查与复制 +
+
+ + 复制 Token
- - +
{{ row.token || "暂无 Token" }}
+
+ +
+
+
+
快捷功能
+
按使用场景复制账号信息
+
+
+
+ + 复制账号+密码 + + + 复制 Token + + + 复制全部 + +
+
+ +
+
+
+
维护操作
+
+ 点击按钮后打开确认/编辑弹窗,再执行对应操作 +
+
+
+
+ + 改不可用 + + + 改平台 + + + 反提取 + + + 改备注 + +
+
+ +
+
+
+
备注
+
备注改为弹窗编辑,当前仅展示
+
+
+
{{ row.remark || "暂无备注" }}
+
+
+ + + + + 确认将当前账号标记为不可用/已用完? + + + + + + + + + + + + + + + + + + 反提取会把账号恢复为未提取,并清空提取时间与提取平台。 + + + + + + + diff --git a/src/views/accountpool/kiro/components/edit.vue b/src/views/accountpool/kiro/components/edit.vue index f7ff6c7..8f8c2d1 100644 --- a/src/views/accountpool/kiro/components/edit.vue +++ b/src/views/accountpool/kiro/components/edit.vue @@ -1,5 +1,6 @@