feat(protect): 面板「加壳加固」页面

- pages/admin/protect/index.vue:应用选择 + 拖拽/点击上传 exe + 统计卡 + 任务表(状态轮询 2s、下载、删除)
- 路由 /admin/protect、侧边栏入口(PackageCheck)、面包屑 titleMap
- i18n zh/en 各补 nav.protect + admin.protect 38 键
- seedtest 增加面板管理员(admin/admin123)便于本地端到端验证
This commit is contained in:
hermes
2026-11-21 14:56:02 +08:00
parent 9c625ebb6a
commit 22570341ef
8 changed files with 651 additions and 72 deletions
+13 -1
View File
@@ -14,6 +14,8 @@ import (
"verification-platform-backend/internal/database"
"verification-platform-backend/internal/model"
"verification-platform-backend/internal/utils/contentstore"
"golang.org/x/crypto/bcrypt"
)
func main() {
@@ -28,7 +30,17 @@ func main() {
config.Init()
database.Init() // 内部已执行 AutoMigrate
// 1) 用户
// 1) 用户(面板登录用的 User 表,role=admin)
var admin model.User
database.DB.Where("username = ?", "admin").First(&admin)
if admin.ID == 0 {
hash, _ := bcrypt.GenerateFromPassword([]byte("admin123"), bcrypt.DefaultCost)
admin = model.User{Username: "admin", Password: string(hash), Role: "admin", Status: "active"}
must(database.DB.Create(&admin).Error)
fmt.Println("管理员: admin / admin123")
}
// 2) 应用所属用户(客户端账号表)
var user model.AppUser
database.DB.Where("username = ?", "seeduser").First(&user)
if user.ID == 0 {
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { Boxes, Code, CreditCard, DollarSign, FileLock, Gauge, GitBranch, HardDrive, Hash, Key, KeyRound, Mail, Megaphone, MessageSquare, Monitor, Network, Plug, ScrollText, Settings, Shield, Smartphone, Users, Variable } from 'lucide-vue-next'
import { Boxes, Code, CreditCard, DollarSign, FileLock, Gauge, GitBranch, HardDrive, Hash, Key, KeyRound, Mail, Megaphone, MessageSquare, Monitor, Network, PackageCheck, Plug, ScrollText, Settings, Shield, Smartphone, Users, Variable } from 'lucide-vue-next'
import { computed, onMounted, reactive, watch } from 'vue'
import { useI18n } from 'vue-i18n'
import { usePreferredDark } from '@vueuse/core'
@@ -99,6 +99,11 @@ const navMain = computed(() => [
url: '/admin/versions',
icon: GitBranch,
},
{
title: t('nav.protect'),
url: '/admin/protect',
icon: PackageCheck,
},
{
title: t('nav.users'),
url: '/admin/users',
+1
View File
@@ -23,6 +23,7 @@ const breadcrumbs = computed(() => {
sessions: t('nav.sessions'),
announcements: t('nav.announcements'),
versions: t('nav.versions'),
protect: t('nav.protect'),
'card-types': t('nav.cardTypes'),
'agent-apps': t('nav.agentApps'),
agents: t('nav.agents'),
+497
View File
@@ -0,0 +1,497 @@
<script setup lang="ts">
import type { Component } from 'vue'
import { CheckCircle2, FileUp, Loader2, PackageCheck, RefreshCw, ShieldCheck, Trash2, XCircle } from 'lucide-vue-next'
import { computed, onBeforeUnmount, onMounted, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { toast } from 'vue-sonner'
import { BasicPage } from '@/components/global-layout'
import api, { BASE_URL } from '@/services/api'
const { t } = useI18n()
interface AppItem {
id: number
name: string
app_key: string
}
interface Task {
id: number
application_id: number
source_name: string
source_size: number
arch: string
status: 'pending' | 'running' | 'done' | 'failed'
message: string
output_name: string
output_size: number
crc_vfy: string
crc_file: string
created_at: string
finished_at: string | null
}
const apps = ref<AppItem[]>([])
const tasks = ref<Task[]>([])
const total = ref(0)
const loading = ref(true)
const selectedApp = ref<string>('')
const fileInput = ref<HTMLInputElement | null>(null)
const chosenFile = ref<File | null>(null)
const uploading = ref(false)
const uploadProgress = ref(0)
const dragging = ref(false)
const statusFilter = ref<string>('')
let timer: number | undefined
const pendingCount = computed(() => tasks.value.filter(t => t.status === 'pending' || t.status === 'running').length)
const doneCount = computed(() => tasks.value.filter(t => t.status === 'done').length)
const failedCount = computed(() => tasks.value.filter(t => t.status === 'failed').length)
function authHeaders(): Record<string, string> {
const token = localStorage.getItem('token')
const headers: Record<string, string> = {}
if (token)
headers.Authorization = `Bearer ${token}`
return headers
}
async function loadApps() {
try {
const data = await api.get<{ applications: AppItem[] }>('/dev/applications')
apps.value = data?.applications || []
if (!selectedApp.value && apps.value.length)
selectedApp.value = String(apps.value[0].id)
}
catch (e: any) {
toast.error(e.message || t('admin.protect.loadAppsFailed'))
}
}
async function loadTasks() {
const q = new URLSearchParams({ per_page: '50', page: '1' })
if (statusFilter.value)
q.set('status', statusFilter.value)
try {
const res = await fetch(`${BASE_URL}/dev/protect/tasks?${q}`, { headers: authHeaders() })
const body = await res.json()
if (body?.code !== 0 && body?.code !== 200)
throw new Error(body?.message || t('admin.protect.loadFailed'))
tasks.value = Array.isArray(body.data) ? body.data : (body.data?.list || [])
total.value = body.total ?? tasks.value.length
}
catch (e: any) {
toast.error(e.message || t('admin.protect.loadFailed'))
}
finally {
loading.value = false
}
schedulePoll()
}
// 有任务在跑时每 2 秒刷新一次
function schedulePoll() {
if (timer)
window.clearTimeout(timer)
if (pendingCount.value > 0)
timer = window.setTimeout(loadTasks, 2000)
}
function pickFile(file: File | null | undefined) {
if (!file)
return
if (!file.name.toLowerCase().endsWith('.exe')) {
toast.error(t('admin.protect.onlyExe'))
return
}
if (file.size > 200 * 1024 * 1024) {
toast.error(t('admin.protect.tooLarge'))
return
}
chosenFile.value = file
}
function onFileChange(e: Event) {
const input = e.target as HTMLInputElement
pickFile(input.files?.[0])
input.value = ''
}
function onDrop(e: DragEvent) {
dragging.value = false
pickFile(e.dataTransfer?.files?.[0])
}
async function startProtect() {
if (!selectedApp.value) {
toast.error(t('admin.protect.pickApp'))
return
}
if (!chosenFile.value) {
toast.error(t('admin.protect.pickFile'))
return
}
uploading.value = true
uploadProgress.value = 0
try {
const fd = new FormData()
fd.append('application_id', selectedApp.value)
fd.append('file', chosenFile.value)
await api.postFormDataWithProgress(
'/dev/protect/tasks',
fd,
(p) => { uploadProgress.value = p },
)
toast.success(t('admin.protect.queued'))
chosenFile.value = null
await loadTasks()
}
catch (e: any) {
toast.error(e.message || t('admin.protect.failed'))
}
finally {
uploading.value = false
uploadProgress.value = 0
}
}
function downloadTask(task: Task) {
const token = localStorage.getItem('token') || ''
window.open(`${BASE_URL}/dev/protect/tasks/${task.id}/download?token=${token}`, '_blank')
}
async function removeTask(task: Task) {
if (task.status === 'running') {
toast.error(t('admin.protect.busy'))
return
}
try {
await api.delete(`/dev/protect/tasks/${task.id}`)
toast.success(t('admin.protect.deleted'))
await loadTasks()
}
catch (e: any) {
toast.error(e.message || t('admin.protect.failed'))
}
}
function formatSize(bytes: number) {
if (!bytes)
return '-'
if (bytes < 1024)
return `${bytes} B`
if (bytes < 1024 * 1024)
return `${(bytes / 1024).toFixed(1)} KB`
return `${(bytes / 1024 / 1024).toFixed(2)} MB`
}
function formatTime(v: string | null) {
if (!v)
return '-'
return new Date(v).toLocaleString()
}
function appName(id: number) {
return apps.value.find(a => a.id === id)?.name || `#${id}`
}
const statusStyle: Record<string, string> = {
pending: 'bg-amber-500/10 text-amber-600 dark:text-amber-400 border-amber-500/30',
running: 'bg-blue-500/10 text-blue-600 dark:text-blue-400 border-blue-500/30',
done: 'bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border-emerald-500/30',
failed: 'bg-red-500/10 text-red-600 dark:text-red-400 border-red-500/30',
}
const statusIcon: Record<string, Component> = {
pending: Loader2,
running: Loader2,
done: CheckCircle2,
failed: XCircle,
}
onMounted(async () => {
await loadApps()
await loadTasks()
})
onBeforeUnmount(() => {
if (timer)
window.clearTimeout(timer)
})
</script>
<template>
<BasicPage :title="t('admin.protect.title')" :description="t('admin.protect.description')" sticky>
<template #actions>
<div class="flex items-center gap-2">
<select
v-model="statusFilter"
class="h-9 rounded-md border border-input bg-background px-3 text-sm"
@change="loadTasks"
>
<option value="">
{{ t('admin.protect.allStatus') }}
</option>
<option value="pending">
{{ t('admin.protect.statusPending') }}
</option>
<option value="running">
{{ t('admin.protect.statusRunning') }}
</option>
<option value="done">
{{ t('admin.protect.statusDone') }}
</option>
<option value="failed">
{{ t('admin.protect.statusFailed') }}
</option>
</select>
<UiButton variant="outline" :disabled="loading" @click="loadTasks">
<RefreshCw class="mr-2 h-4 w-4" :class="{ 'animate-spin': loading }" />
{{ t('admin.protect.refresh') }}
</UiButton>
</div>
</template>
<div class="space-y-6">
<!-- 概览 -->
<div class="grid gap-4 sm:grid-cols-2 lg:grid-cols-4">
<UiCard>
<UiCardHeader class="flex flex-row items-center justify-between pb-2 space-y-0">
<UiCardTitle class="text-sm font-medium">
{{ t('admin.protect.totalTasks') }}
</UiCardTitle>
<PackageCheck class="size-4 text-muted-foreground" />
</UiCardHeader>
<UiCardContent>
<div class="text-2xl font-bold">
{{ total }}
</div>
</UiCardContent>
</UiCard>
<UiCard>
<UiCardHeader class="flex flex-row items-center justify-between pb-2 space-y-0">
<UiCardTitle class="text-sm font-medium">
{{ t('admin.protect.inProgress') }}
</UiCardTitle>
<Loader2 class="size-4 text-muted-foreground" />
</UiCardHeader>
<UiCardContent>
<div class="text-2xl font-bold text-blue-600 dark:text-blue-400">
{{ pendingCount }}
</div>
</UiCardContent>
</UiCard>
<UiCard>
<UiCardHeader class="flex flex-row items-center justify-between pb-2 space-y-0">
<UiCardTitle class="text-sm font-medium">
{{ t('admin.protect.doneCount') }}
</UiCardTitle>
<ShieldCheck class="size-4 text-muted-foreground" />
</UiCardHeader>
<UiCardContent>
<div class="text-2xl font-bold text-emerald-600 dark:text-emerald-400">
{{ doneCount }}
</div>
</UiCardContent>
</UiCard>
<UiCard>
<UiCardHeader class="flex flex-row items-center justify-between pb-2 space-y-0">
<UiCardTitle class="text-sm font-medium">
{{ t('admin.protect.failedCount') }}
</UiCardTitle>
<XCircle class="size-4 text-muted-foreground" />
</UiCardHeader>
<UiCardContent>
<div class="text-2xl font-bold text-red-600 dark:text-red-400">
{{ failedCount }}
</div>
</UiCardContent>
</UiCard>
</div>
<!-- 上传 -->
<UiCard>
<UiCardHeader>
<UiCardTitle class="text-base">
{{ t('admin.protect.uploadTitle') }}
</UiCardTitle>
<p class="text-sm text-muted-foreground">
{{ t('admin.protect.uploadHint') }}
</p>
</UiCardHeader>
<UiCardContent class="space-y-4">
<div class="flex flex-col gap-3 sm:flex-row sm:items-center">
<label class="text-sm font-medium shrink-0">{{ t('admin.protect.app') }}</label>
<select
v-model="selectedApp"
class="h-9 w-full rounded-md border border-input bg-background px-3 text-sm sm:max-w-xs"
>
<option v-for="a in apps" :key="a.id" :value="String(a.id)">
{{ a.name }} ({{ a.app_key }})
</option>
</select>
</div>
<div
class="rounded-lg border-2 border-dashed p-6 text-center transition-colors"
:class="dragging ? 'border-primary bg-primary/5' : 'border-input'"
@dragover.prevent="dragging = true"
@dragleave.prevent="dragging = false"
@drop.prevent="onDrop"
@click="fileInput?.click()"
>
<input ref="fileInput" type="file" accept=".exe" class="hidden" @change="onFileChange">
<FileUp class="mx-auto mb-2 h-8 w-8 text-muted-foreground" />
<template v-if="chosenFile">
<p class="text-sm font-medium">
{{ chosenFile.name }}
</p>
<p class="text-xs text-muted-foreground">
{{ formatSize(chosenFile.size) }}
</p>
</template>
<template v-else>
<p class="text-sm text-muted-foreground">
{{ t('admin.protect.dropHint') }}
</p>
</template>
</div>
<div v-if="uploading" class="space-y-1">
<div class="h-2 w-full overflow-hidden rounded-full bg-muted">
<div class="h-full bg-primary transition-all" :style="{ width: `${uploadProgress}%` }" />
</div>
<p class="text-xs text-muted-foreground">
{{ t('admin.protect.uploading') }} {{ uploadProgress }}%
</p>
</div>
<div class="flex items-center gap-2">
<UiButton :disabled="uploading || !chosenFile" @click="startProtect">
<ShieldCheck class="mr-2 h-4 w-4" />
{{ t('admin.protect.start') }}
</UiButton>
<UiButton v-if="chosenFile" variant="ghost" @click="chosenFile = null">
{{ t('admin.protect.clear') }}
</UiButton>
</div>
</UiCardContent>
</UiCard>
<!-- 任务列表 -->
<UiCard>
<UiCardHeader>
<UiCardTitle class="text-base">
{{ t('admin.protect.tasks') }}
</UiCardTitle>
</UiCardHeader>
<UiCardContent>
<div v-if="loading" class="flex items-center gap-2 py-8 text-sm text-muted-foreground">
<Loader2 class="h-4 w-4 animate-spin" />
{{ t('admin.protect.loading') }}
</div>
<div v-else-if="!tasks.length" class="py-10 text-center text-sm text-muted-foreground">
{{ t('admin.protect.empty') }}
</div>
<div v-else class="overflow-x-auto">
<table class="w-full text-sm">
<thead class="border-b text-left text-muted-foreground">
<tr>
<th class="px-2 py-2 font-medium">
#
</th>
<th class="px-2 py-2 font-medium">
{{ t('admin.protect.app') }}
</th>
<th class="px-2 py-2 font-medium">
{{ t('admin.protect.source') }}
</th>
<th class="px-2 py-2 font-medium">
{{ t('admin.protect.arch') }}
</th>
<th class="px-2 py-2 font-medium">
{{ t('admin.protect.status') }}
</th>
<th class="px-2 py-2 font-medium">
CRC
</th>
<th class="px-2 py-2 font-medium">
{{ t('admin.protect.createdAt') }}
</th>
<th class="px-2 py-2 text-right font-medium">
{{ t('admin.protect.actions') }}
</th>
</tr>
</thead>
<tbody>
<tr v-for="task in tasks" :key="task.id" class="border-b last:border-0 align-top">
<td class="px-2 py-3 text-muted-foreground">
{{ task.id }}
</td>
<td class="px-2 py-3">
{{ appName(task.application_id) }}
</td>
<td class="px-2 py-3">
<div class="font-medium break-all">
{{ task.source_name }}
</div>
<div class="text-xs text-muted-foreground">
{{ formatSize(task.source_size) }} → {{ formatSize(task.output_size) }}
</div>
<div v-if="task.status === 'failed' && task.message" class="mt-1 text-xs text-red-600 dark:text-red-400 break-all">
{{ task.message }}
</div>
</td>
<td class="px-2 py-3">
<span class="rounded border px-1.5 py-0.5 text-xs">{{ task.arch || '-' }}</span>
</td>
<td class="px-2 py-3">
<span
class="inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs"
:class="statusStyle[task.status] || 'border-input'"
>
<component
:is="statusIcon[task.status]" class="h-3 w-3"
:class="{ 'animate-spin': task.status === 'running' }"
/>
{{ t(`admin.protect.status${task.status.charAt(0).toUpperCase()}${task.status.slice(1)}`) }}
</span>
</td>
<td class="px-2 py-3 font-mono text-xs text-muted-foreground">
<div v-if="task.crc_vfy">
vfy {{ task.crc_vfy }}
</div>
<div v-if="task.crc_file">
file {{ task.crc_file }}
</div>
</td>
<td class="px-2 py-3 text-xs text-muted-foreground">
{{ formatTime(task.created_at) }}
</td>
<td class="px-2 py-3">
<div class="flex justify-end gap-1">
<UiButton
size="sm"
variant="outline"
:disabled="task.status !== 'done'"
@click="downloadTask(task)"
>
{{ t('admin.protect.download') }}
</UiButton>
<UiButton size="sm" variant="ghost" @click="removeTask(task)">
<Trash2 class="h-4 w-4" />
</UiButton>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</UiCardContent>
</UiCard>
</div>
</BasicPage>
</template>
+56 -26
View File
@@ -275,15 +275,10 @@
"applicationRequired": "Please select application",
"deviceId": "Device ID",
"deviceIdPlaceholder": "Device ID (optional)",
"preview": "Preview",
"app": "Application",
"usernameLabel": "Username",
"emailLabel": "Email",
"deviceIdLabel": "Device ID",
"status": "Account Status",
"onlineStatus": "Online Status",
"submit": "Save",
"cancel": "Cancel",
"fetchFailed": "Failed to fetch user information",
"success": "User updated successfully",
"failed": "Failed to update user",
@@ -1156,14 +1151,13 @@
"editSuccess": "Card type updated successfully",
"create": {
"title": "Create Card Type",
"description": "Create a new card type with basic information and recharge configuration",
"description": "Batch generate cards",
"basicInfo": "Basic Information",
"basicInfoDesc": "Fill in the basic information of the card type",
"billingConfig": "Billing Configuration",
"billingConfigDesc": "Select the billing method and value settings",
"name": "Type Name",
"namePlaceholder": "Enter type name",
"description": "Batch generate cards",
"descriptionPlaceholder": "Enter description",
"application": "Application",
"selectApplication": "Select application",
@@ -2195,7 +2189,14 @@
"batchUpdateSuccess": "Batch update successful",
"batchUpdateFailed": "Batch update failed",
"select": "Select",
"edit": "Edit",
"edit": {
"title": "Edit Cloud Function",
"titleDescription": "Edit cloud function configuration",
"config": "Configuration",
"configDesc": "Edit cloud function basic information and code",
"submitBtn": "Save",
"cancelBtn": "Cancel"
},
"editSuccess": "Updated successfully",
"editFailed": "Failed to fetch cloud function",
"columns": {
@@ -2233,14 +2234,6 @@
"submitSuccess": "Created successfully",
"submitFailed": "Failed to create"
},
"edit": {
"title": "Edit Cloud Function",
"titleDescription": "Edit cloud function configuration",
"config": "Configuration",
"configDesc": "Edit cloud function basic information and code",
"submitBtn": "Save",
"cancelBtn": "Cancel"
},
"updateSuccess": "Updated successfully",
"updateFailed": "Failed to update",
"fetchFailed": "Failed to fetch cloud function"
@@ -2569,6 +2562,46 @@
"faviconSuccess": "Favicon uploaded successfully",
"uploadFailed": "Upload failed"
}
},
"protect": {
"title": "Protection",
"description": "Inject a verification shell into your program: entry rewrite + in-memory DLL + dual CRC32, single-file output",
"totalTasks": "Total tasks",
"inProgress": "In progress",
"doneCount": "Completed",
"failedCount": "Failed",
"uploadTitle": "Upload program",
"uploadHint": "32/64-bit Windows PE, up to 200MB. Output is unsigned — Windows will warn about unknown publisher",
"app": "Application",
"dropHint": "Click to choose or drop an .exe file",
"onlyExe": "Only .exe files are supported",
"tooLarge": "File too large (max 200MB)",
"pickApp": "Choose an application first",
"pickFile": "Choose a program first",
"queued": "Submitted, protecting…",
"uploading": "Uploading",
"start": "Start",
"clear": "Clear",
"tasks": "Protection tasks",
"source": "Source / output",
"arch": "Arch",
"status": "Status",
"createdAt": "Created",
"actions": "Actions",
"download": "Download",
"refresh": "Refresh",
"loading": "Loading…",
"empty": "No protection tasks yet",
"allStatus": "All status",
"statusPending": "Queued",
"statusRunning": "Protecting",
"statusDone": "Completed",
"statusFailed": "Failed",
"busy": "Task is running, try later",
"deleted": "Deleted",
"failed": "Operation failed",
"loadFailed": "Failed to load tasks",
"loadAppsFailed": "Failed to load applications"
}
},
"auth": {
@@ -2809,7 +2842,11 @@
"noUsers": "No user records yet",
"username": "Username",
"email": "Email",
"status": "Status",
"status": {
"active": "Active",
"disabled": "Disabled",
"banned": "Banned"
},
"registerTime": "Register Time",
"lastLogin": "Last Login",
"active": "Active",
@@ -2845,11 +2882,6 @@
"expired": "Expired",
"daysLeft": "days left"
},
"status": {
"active": "Active",
"disabled": "Disabled",
"banned": "Banned"
},
"create": {
"title": "Create User",
"description": "Create a new user under your application",
@@ -2950,7 +2982,6 @@
"exportBtn": "Export",
"batchExportBtn": "Batch Export",
"application": "Application",
"cardType": "Card Type",
"reset": "Reset",
"select": "Select",
"columns": {
@@ -2998,7 +3029,6 @@
"application": "Select Application",
"selectApplication": "Please select an application",
"cardType": "Select Card Type",
"selectCardType": "Please select a card type",
"noCardType": "No available card types for this application",
"count": "Quantity",
"maxCount": "Maximum 100 cards per generation",
@@ -3006,7 +3036,6 @@
"app": "Application",
"type": "Card Type",
"unitPrice": "Unit Price",
"quantity": "Quantity",
"units": "cards",
"totalAmount": "Estimated Cost",
"generateNow": "Generate Now"
@@ -3222,7 +3251,8 @@
"normal": "Normal",
"storage": "Storage",
"admin": "Admin",
"agent": "Agent"
"agent": "Agent",
"protect": "Protection"
},
"footer": {
"brand": "Weishouquan",
+59 -41
View File
@@ -275,15 +275,10 @@
"applicationRequired": "请选择应用",
"deviceId": "设备指纹",
"deviceIdPlaceholder": "设备指纹(可选)",
"preview": "预览",
"app": "应用",
"usernameLabel": "用户名",
"emailLabel": "邮箱",
"deviceIdLabel": "设备指纹",
"status": "账户状态",
"onlineStatus": "在线状态",
"submit": "保存",
"cancel": "取消",
"fetchFailed": "获取用户信息失败",
"success": "保存成功",
"failed": "保存失败",
@@ -1311,8 +1306,7 @@
"save": "保存",
"usernameHint": "用户名不可修改",
"passwordPlaceholder": "留空则不修改密码",
"passwordHint": "输入新密码以修改,留空保持原密码",
"saveBtn": "保存修改"
"passwordHint": "如需修改密码请输入新密码,留空则保持原密码"
},
"editSuccess": "更新代理成功",
"editFailed": "更新代理失败",
@@ -1332,18 +1326,7 @@
"batchDeleteSuccess": "批量删除成功",
"batchDeleteFailed": "批量删除失败",
"batchUpdateSuccess": "批量更新成功",
"batchUpdateFailed": "批量更新失败",
"edit": {
"title": "编辑代理",
"description": "修改代理信息",
"fetchFailed": "获取代理信息失败",
"saveSuccess": "保存成功",
"saveFailed": "保存失败",
"save": "保存",
"usernameHint": "用户名不可修改",
"passwordPlaceholder": "留空则不修改密码",
"passwordHint": "如需修改密码请输入新密码,留空则保持原密码"
}
"batchUpdateFailed": "批量更新失败"
},
"announcements": {
"title": "公告管理",
@@ -1592,14 +1575,13 @@
"editSuccess": "更新卡类成功",
"create": {
"title": "创建卡类",
"description": "创建新的卡密类型,设置基本信息和充值配置",
"description": "描述",
"basicInfo": "基本信息",
"basicInfoDesc": "填写卡类的基本信息",
"billingConfig": "充值配置",
"billingConfigDesc": "设置卡密充值金额",
"name": "类型名称",
"namePlaceholder": "请输入类型名称",
"description": "描述",
"descriptionPlaceholder": "请输入描述",
"application": "所属应用",
"selectApplication": "请选择应用",
@@ -2226,7 +2208,14 @@
"batchUpdateSuccess": "批量更新成功",
"batchUpdateFailed": "批量更新失败",
"select": "选择",
"edit": "编辑",
"edit": {
"title": "编辑云端函数",
"titleDescription": "编辑云端函数配置",
"config": "配置",
"configDesc": "编辑云端函数的基本信息和代码",
"submitBtn": "保存",
"cancelBtn": "取消"
},
"editSuccess": "更新成功",
"editFailed": "获取云端函数失败",
"columns": {
@@ -2264,14 +2253,6 @@
"submitSuccess": "创建成功",
"submitFailed": "创建失败"
},
"edit": {
"title": "编辑云端函数",
"titleDescription": "编辑云端函数配置",
"config": "配置",
"configDesc": "编辑云端函数的基本信息和代码",
"submitBtn": "保存",
"cancelBtn": "取消"
},
"updateSuccess": "更新成功",
"updateFailed": "更新失败",
"fetchFailed": "获取云端函数失败"
@@ -2600,6 +2581,46 @@
"faviconSuccess": "图标上传成功",
"uploadFailed": "上传失败"
}
},
"protect": {
"title": "加壳加固",
"description": "给程序注入验证壳:改入口 + 内存加载壳 DLL + 双层 CRC32,产物单文件、免安装依赖",
"totalTasks": "任务总数",
"inProgress": "进行中",
"doneCount": "已完成",
"failedCount": "失败",
"uploadTitle": "上传程序",
"uploadHint": "支持 32 / 64 位 Windows PE,最大 200MB;产物未签名,Windows 会提示未知发布者",
"app": "应用",
"dropHint": "点击选择或拖入 .exe 文件",
"onlyExe": "只支持 .exe 文件",
"tooLarge": "文件过大(上限 200MB)",
"pickApp": "请先选择应用",
"pickFile": "请先选择要加壳的程序",
"queued": "已提交,正在加壳",
"uploading": "上传中",
"start": "开始加壳",
"clear": "清除",
"tasks": "加壳任务",
"source": "源文件 / 产物",
"arch": "架构",
"status": "状态",
"createdAt": "创建时间",
"actions": "操作",
"download": "下载",
"refresh": "刷新",
"loading": "加载中…",
"empty": "还没有加壳任务",
"allStatus": "全部状态",
"statusPending": "排队中",
"statusRunning": "加壳中",
"statusDone": "已完成",
"statusFailed": "失败",
"busy": "任务执行中,稍后再删",
"deleted": "已删除",
"failed": "操作失败",
"loadFailed": "加载任务失败",
"loadAppsFailed": "加载应用失败"
}
},
"auth": {
@@ -2840,7 +2861,11 @@
"noUsers": "暂无用户记录",
"username": "用户名",
"email": "邮箱",
"status": "状态",
"status": {
"active": "正常",
"disabled": "禁用",
"banned": "封禁"
},
"registerTime": "注册时间",
"lastLogin": "最后登录",
"active": "正常",
@@ -2876,11 +2901,6 @@
"expired": "已过期",
"daysLeft": "天剩余"
},
"status": {
"active": "正常",
"disabled": "禁用",
"banned": "封禁"
},
"create": {
"title": "创建用户",
"description": "在您的应用下创建新用户",
@@ -2981,7 +3001,6 @@
"exportBtn": "导出",
"batchExportBtn": "批量导出",
"application": "应用",
"cardType": "卡类",
"reset": "重置",
"select": "选择",
"columns": {
@@ -3014,7 +3033,7 @@
"selectAppPlaceholder": "请选择应用",
"selectCardTypeLabel": "选择卡类",
"selectCardTypePlaceholder": "请选择卡类",
"quantity": "生成数量",
"quantity": "数量",
"quantityPlaceholder": "请输入生成数量",
"quantityHint": "单次最多生成 100 张卡密",
"estimatedCost": "预计费用",
@@ -3029,7 +3048,6 @@
"application": "选择应用",
"selectApplication": "请选择应用",
"cardType": "选择卡类",
"selectCardType": "请选择卡类",
"noCardType": "该应用暂无可用卡类",
"count": "生成数量",
"maxCount": "单次最多生成 100 张卡密",
@@ -3037,7 +3055,6 @@
"app": "应用",
"type": "卡类",
"unitPrice": "单价",
"quantity": "数量",
"units": "张",
"totalAmount": "预计费用",
"generateNow": "立即生成"
@@ -3253,7 +3270,8 @@
"normal": "正常",
"storage": "存储",
"admin": "管理员",
"agent": "代理商"
"agent": "代理商",
"protect": "加壳加固"
},
"footer": {
"brand": "网络验证",
+6
View File
@@ -107,6 +107,12 @@ const routes: RouteRecordRaw[] = [
component: () => import('@/pages/admin/versions/index.vue'),
meta: { title: '版本管理 - 管理后台' },
},
{
path: 'protect',
name: 'AdminProtect',
component: () => import('@/pages/admin/protect/index.vue'),
meta: { title: '加壳加固 - 管理后台' },
},
{
path: 'versions/create',
name: 'AdminVersionCreate',
+13 -3
View File
@@ -14,9 +14,6 @@ import type {
ParamValueZeroOrMore,
ParamValueZeroOrOne,
} from 'vue-router'
import type {
_ExtractParamParserType,
} from 'vue-router/experimental'
declare module 'vue-router' {
interface TypesConfig {
@@ -342,6 +339,13 @@ declare module 'vue-router/auto-routes' {
Record<never, never>,
| never
>,
'/admin/protect/': RouteRecordInfo<
'/admin/protect/',
'/admin/protect',
Record<never, never>,
Record<never, never>,
| never
>,
'/admin/risk-control/': RouteRecordInfo<
'/admin/risk-control/',
'/admin/risk-control',
@@ -948,6 +952,12 @@ declare module 'vue-router/auto-routes' {
views:
| never
}
'src/pages/admin/protect/index.vue': {
routes:
| '/admin/protect/'
views:
| never
}
'src/pages/admin/risk-control/index.vue': {
routes:
| '/admin/risk-control/'