v0.1.0: 新增CK管理功能
功能: - 新增CK管理页面,支持复验抢购结果和整理账号文件 - 复验功能:查询斗鱼真实兑换记录,统计已抢到/未抢到的账号 - 整理CK功能:分离已抢到的账号到新文件,原文件只保留未抢到的 - 导出文件名优化:使用中文商品名+日期时间格式(如:user_已抢到_雪国2号_20260626_150405.txt) - 复用左侧商品选择,统一数据源 接口: - VerifyAndExport: 复验并统计 - ExportAccountsWithProduct: 导出账号(自动命名) - OrganizeAccounts: 整理账号文件 版本: 0.1.0
This commit is contained in:
@@ -7,6 +7,7 @@ import ControlStrip from '@/components/console/ControlStrip.vue'
|
||||
import AccountTable from '@/components/account/AccountTable.vue'
|
||||
import LogPanel from '@/components/log/LogPanel.vue'
|
||||
import SettingsModal from '@/components/modal/SettingsModal.vue'
|
||||
import CKManager from '@/components/ck/CKManager.vue'
|
||||
|
||||
defineProps<{
|
||||
serverTime: string
|
||||
@@ -16,6 +17,7 @@ const { theme, toggleTheme } = useTheme()
|
||||
const { runState, countdownSeconds, formatRemain } = useScheduler()
|
||||
|
||||
const settingsModalRef = ref<InstanceType<typeof SettingsModal> | null>(null)
|
||||
const currentPage = ref<'console' | 'ck'>('console')
|
||||
|
||||
const openSettings = () => {
|
||||
settingsModalRef.value?.open()
|
||||
@@ -27,11 +29,23 @@ const openSettings = () => {
|
||||
<!-- 顶部控制台头 -->
|
||||
<header class="console-head">
|
||||
<div class="headline">
|
||||
<div>
|
||||
<div class="headline-title">抢购控制台</div>
|
||||
<div class="headline-meta">{{ runState }}</div>
|
||||
<div class="nav-tabs">
|
||||
<button
|
||||
class="nav-tab"
|
||||
:class="{ active: currentPage === 'console' }"
|
||||
@click="currentPage = 'console'"
|
||||
>
|
||||
抢购控制台
|
||||
</button>
|
||||
<button
|
||||
class="nav-tab"
|
||||
:class="{ active: currentPage === 'ck' }"
|
||||
@click="currentPage = 'ck'"
|
||||
>
|
||||
CK 管理
|
||||
</button>
|
||||
</div>
|
||||
<span v-if="countdownSeconds > 0" class="countdown-badge">
|
||||
<span v-if="countdownSeconds > 0 && currentPage === 'console'" class="countdown-badge">
|
||||
{{ formatRemain(countdownSeconds) }}
|
||||
</span>
|
||||
</div>
|
||||
@@ -48,19 +62,29 @@ const openSettings = () => {
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- 状态指标 -->
|
||||
<StatusGrid :server-time="serverTime" />
|
||||
<!-- 抢购控制台页面 -->
|
||||
<template v-if="currentPage === 'console'">
|
||||
<!-- 状态指标 -->
|
||||
<StatusGrid :server-time="serverTime" />
|
||||
|
||||
<!-- 操作条 -->
|
||||
<ControlStrip />
|
||||
<!-- 操作条 -->
|
||||
<ControlStrip />
|
||||
|
||||
<!-- 工作区 -->
|
||||
<section class="workspace">
|
||||
<AccountTable />
|
||||
<aside class="side-stack">
|
||||
<LogPanel />
|
||||
</aside>
|
||||
</section>
|
||||
<!-- 工作区 -->
|
||||
<section class="workspace">
|
||||
<AccountTable />
|
||||
<aside class="side-stack">
|
||||
<LogPanel />
|
||||
</aside>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<!-- CK管理页面 -->
|
||||
<template v-else-if="currentPage === 'ck'">
|
||||
<section class="ck-page">
|
||||
<CKManager />
|
||||
</section>
|
||||
</template>
|
||||
</main>
|
||||
|
||||
<SettingsModal ref="settingsModalRef" />
|
||||
@@ -99,6 +123,35 @@ const openSettings = () => {
|
||||
letter-spacing: -.01em;
|
||||
}
|
||||
|
||||
.nav-tabs {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.nav-tab {
|
||||
height: 28px;
|
||||
padding: 0 12px;
|
||||
border-radius: var(--radius-sm);
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: var(--muted);
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
transition: .12s;
|
||||
}
|
||||
|
||||
.nav-tab:hover {
|
||||
color: var(--text-strong);
|
||||
background: var(--surface-2);
|
||||
}
|
||||
|
||||
.nav-tab.active {
|
||||
background: var(--accent-soft);
|
||||
color: var(--accent);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.headline-meta {
|
||||
font-size: 12px;
|
||||
color: var(--muted);
|
||||
@@ -143,6 +196,12 @@ const openSettings = () => {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.ck-page {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 1180px) {
|
||||
.right {
|
||||
overflow: visible;
|
||||
|
||||
Reference in New Issue
Block a user