From aabf7e56d47fb440c783af5119d6df887c1da509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BF=97=E5=BC=BA?= <357099073@qq.com> Date: Mon, 13 Apr 2026 10:09:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8F=B7=E6=B1=A0=E7=95=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/accountpool/cursor/index.vue | 126 +++++++++++++---------- src/views/accountpool/kiro/index.vue | 104 +++++++++++-------- src/views/accountpool/windsurf/index.vue | 104 +++++++++++-------- 3 files changed, 189 insertions(+), 145 deletions(-) diff --git a/src/views/accountpool/cursor/index.vue b/src/views/accountpool/cursor/index.vue index 7432465..92a5c08 100644 --- a/src/views/accountpool/cursor/index.vue +++ b/src/views/accountpool/cursor/index.vue @@ -38,7 +38,7 @@ const selectedRows = ref([]); const detailRow = ref(null); const pagination = reactive({ page: 1, - pageSize: 30, + pageSize: 20, }); const pagedList = computed(() => tableData.value); @@ -196,6 +196,11 @@ function typeText(type) { return 'Token'; } +const tooltipOpts = { + popperClass: 'pool-tooltip', + popperStyle: { maxWidth: '600px', wordBreak: 'break-all', whiteSpace: 'pre-wrap' }, +}; + const PLATFORM_MAP = { local: { label: '本地', type: 'info' }, xianyu: { label: '闲鱼', type: 'warning' }, @@ -219,17 +224,31 @@ function normalizeRow(raw) { } return ''; }; + // 指针类型字段(可能为 null),单独处理 + const pickNullable = (...keys) => { + for (const key of keys) { + if (raw?.[key] !== undefined) return raw[key] ?? null; + } + return null; + }; + const formatTime = (val) => { + if (!val) return ''; + const d = new Date(val); + if (isNaN(d)) return val; + const p = (v) => String(v).padStart(2, '0'); + return `${d.getFullYear()}-${p(d.getMonth()+1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}:${p(d.getSeconds())}`; + }; return { - id: pick('id', 'Id'), + id: pick('id', 'Id', 'ID'), type: pick('data_type', 'dataType', 'type'), account: pick('account', 'Account'), password: pick('password', 'Password'), token: pick('token', 'Token'), remark: pick('remark', 'Remark'), - extracted: Number(pick('is_extracted', 'isExtracted')) === 1 || !!pick('extracted'), - extractedAt: pick('extracted_time', 'extracted_at', 'extractedAt'), - extractedPlatform: pick('extracted_platform', 'extractedPlatform'), - createdAt: pick('create_time', 'created_at', 'createdAt'), + extracted: Number(pick('is_extracted', 'isExtracted', 'IsExtracted')) === 1, + extractedAt: formatTime(pickNullable('extracted_time', 'extractedAt')), + extractedPlatform: pickNullable('extracted_platform', 'extractedPlatform'), + createdAt: formatTime(pick('create_time', 'createdAt')), }; } @@ -289,38 +308,14 @@ const examples = [ { label: '抖音 · 提取 Krio Token', url: `${BASE_URL}/api/getcard?type=douyin&module=krio&data_type=tk` }, ]; -const successResp = `// 账号密码类型(data_type=account) -{ - "code": 200, - "msg": "success", - "data": { - "type": "account", - "account": "user@example.com", - "password": "your_password" - } -} +const successResp = `// 纯 Token 类型(data_type=tk) +eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... + +// 账号密码类型(data_type=account) +账号:user@example.com / 密码:your_password // 账号密码+Token 类型(data_type=account_tk) -{ - "code": 200, - "msg": "success", - "data": { - "type": "account_tk", - "account": "user@example.com", - "password": "your_password", - "token": "eyJhbGciOiJIUzI1NiIs..." - } -} - -// 纯 Token 类型(data_type=tk) -{ - "code": 200, - "msg": "success", - "data": { - "type": "tk", - "token": "eyJhbGciOiJIUzI1NiIs..." - } -}`; +账号:user@example.com / 密码:your_password / Token:eyJhbGciOiJIUzI1NiIs...`; const errorResp = `// 无可用卡密 { "code": 404, "msg": "暂无可用卡密" } @@ -333,6 +328,17 @@ function copyText(text) { ElMessage.success('已复制'); }); } + +function copyCardInfo(row) { + const parts = []; + if (row.account) parts.push(row.account); + if (row.password) parts.push(row.password); + if (row.token) parts.push(row.token); + if (!parts.length) { ElMessage.warning('无可复制内容'); return; } + navigator.clipboard.writeText(parts.join('\n')).then(() => { + ElMessage.success('已复制'); + }); +} - - - + + + - + + + + - + @@ -436,7 +435,7 @@ function copyText(text) { v-model:page-size="pagination.pageSize" background layout="total, prev, pager, next, jumper" - :page-sizes="[30, 50, 100]" + :page-sizes="[20, 50, 100]" :total="total" /> @@ -457,7 +456,7 @@ function copyText(text) { {{ detailRow.password || '-' }} - {{ detailRow.token || '-' }} + {{ detailRow.token || '-' }} {{ detailRow.extracted ? '已提取' : '未提取' }} @@ -689,4 +688,21 @@ function copyText(text) { word-break: break-all; margin: 0; } + +.token-text { + word-break: break-all; + white-space: pre-wrap; + line-height: 1.6; +} + + + \ No newline at end of file diff --git a/src/views/accountpool/kiro/index.vue b/src/views/accountpool/kiro/index.vue index f20fb47..4f04348 100644 --- a/src/views/accountpool/kiro/index.vue +++ b/src/views/accountpool/kiro/index.vue @@ -123,6 +123,11 @@ function typeText(type) { return 'Token'; } +const tooltipOpts = { + popperClass: 'pool-tooltip', + popperStyle: { maxWidth: '600px', wordBreak: 'break-all', whiteSpace: 'pre-wrap' }, +}; + const PLATFORM_MAP = { local: { label: '本地', type: 'info' }, xianyu: { label: '闲鱼', type: 'warning' }, @@ -141,17 +146,30 @@ function normalizeRow(raw) { } return ''; }; + const pickNullable = (...keys) => { + for (const key of keys) { + if (raw?.[key] !== undefined) return raw[key] ?? null; + } + return null; + }; + const formatTime = (val) => { + if (!val) return ''; + const d = new Date(val); + if (isNaN(d)) return val; + const p = (v) => String(v).padStart(2, '0'); + return `${d.getFullYear()}-${p(d.getMonth()+1)}-${p(d.getDate())} ${p(d.getHours())}:${p(d.getMinutes())}:${p(d.getSeconds())}`; + }; return { - id: pick('id', 'Id'), + id: pick('id', 'Id', 'ID'), type: pick('data_type', 'dataType', 'type'), account: pick('account', 'Account'), password: pick('password', 'Password'), token: pick('token', 'Token'), remark: pick('remark', 'Remark'), - extracted: Number(pick('is_extracted', 'isExtracted')) === 1 || !!pick('extracted'), - extractedAt: pick('extracted_time', 'extracted_at', 'extractedAt'), - extractedPlatform: pick('extracted_platform', 'extractedPlatform'), - createdAt: pick('create_time', 'created_at', 'createdAt'), + extracted: Number(pick('is_extracted', 'isExtracted', 'IsExtracted')) === 1, + extractedAt: formatTime(pickNullable('extracted_time', 'extractedAt')), + extractedPlatform: pickNullable('extracted_platform', 'extractedPlatform'), + createdAt: formatTime(pick('create_time', 'createdAt')), }; } @@ -203,38 +221,14 @@ const examples = [ { label: '抖音 · 提取 Windsurf Token', url: `${BASE_URL}/api/getcard?type=douyin&module=windsurf&data_type=tk` }, ]; -const successResp = `// 账号密码类型(data_type=account) -{ - "code": 200, - "msg": "success", - "data": { - "type": "account", - "account": "user@example.com", - "password": "your_password" - } -} +const successResp = `// 纯 Token 类型(data_type=tk) +eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... + +// 账号密码类型(data_type=account) +账号:user@example.com / 密码:your_password // 账号密码+Token 类型(data_type=account_tk) -{ - "code": 200, - "msg": "success", - "data": { - "type": "account_tk", - "account": "user@example.com", - "password": "your_password", - "token": "eyJhbGciOiJIUzI1NiIs..." - } -} - -// 纯 Token 类型(data_type=tk) -{ - "code": 200, - "msg": "success", - "data": { - "type": "tk", - "token": "eyJhbGciOiJIUzI1NiIs..." - } -}`; +账号:user@example.com / 密码:your_password / Token:eyJhbGciOiJIUzI1NiIs...`; const errorResp = `// 无可用卡密 { "code": 404, "msg": "暂无可用卡密" } @@ -245,6 +239,15 @@ const errorResp = `// 无可用卡密 function copyText(text) { navigator.clipboard.writeText(text).then(() => { ElMessage.success('已复制'); }); } + +function copyCardInfo(row) { + const parts = []; + if (row.account) parts.push(row.account); + if (row.password) parts.push(row.password); + if (row.token) parts.push(row.token); + if (!parts.length) { ElMessage.warning('无可复制内容'); return; } + navigator.clipboard.writeText(parts.join('\n')).then(() => { ElMessage.success('已复制'); }); +}