fix(admin): restore Vite admin source files

This commit is contained in:
2026-08-17 20:02:36 +08:00
parent 8fe3a89c36
commit ac5c0b2dd7
114 changed files with 17272 additions and 0 deletions
@@ -0,0 +1,66 @@
<template>
<n-form label-placement="left" label-width="130">
<n-space vertical style="width:100%">
<n-divider title-placement="left">前端配置</n-divider>
<n-form-item label="所属地区">
<n-select
v-model:value="model.region"
:options="[
{ label: '中国内地 (cn)', value: 'cn' },
{ label: '新加坡 (sgp)', value: 'sgp' },
]"
placeholder="选择地区"
/>
</n-form-item>
<n-form-item label="身份标 (prefix)">
<n-input
v-model:value="model.prefix"
placeholder="从概览页获取身份标"
autocomplete="off"
/>
</n-form-item>
<n-form-item label="场景ID">
<n-input
v-model:value="model.scene_id"
placeholder="从验证码场景列表获取 SceneId"
autocomplete="off"
/>
</n-form-item>
<n-divider title-placement="left">后端 API 密钥(用于服务端验签)</n-divider>
<n-form-item label="AccessKey ID">
<n-input
v-model:value="model.access_key_id"
placeholder="阿里云 RAM 用户 AccessKey ID"
autocomplete="off"
/>
</n-form-item>
<n-form-item label="AccessKey Secret">
<n-input
v-model:value="model.access_key_secret"
type="password"
show-password-on="click"
autocomplete="current-password"
placeholder="阿里云 RAM 用户 AccessKey Secret"
/>
</n-form-item>
<n-alert type="warning" style="margin-bottom: 8px;">
请使用 RAM 子账号密钥并授权 <code>AliyunYundunAFSFullAccess</code> 权限,切勿使用主账号密钥。
</n-alert>
<n-tag v-if="isConfigured" type="success" size="small">✓ 已完整配置</n-tag>
<n-tag v-else type="warning" size="small">未完成配置</n-tag>
</n-space>
</n-form>
</template>
<script setup>
import { computed } from 'vue'
const model = defineModel({ type: Object, default: () => ({}) })
const isConfigured = computed(() => {
const c = model.value
return !!(c.region && c.prefix && c.scene_id && c.access_key_id && c.access_key_secret)
})
</script>
@@ -0,0 +1,44 @@
<template>
<n-form label-placement="left" label-width="130">
<n-space vertical style="width:100%">
<n-form-item label="Site Key">
<n-input v-model:value="model.site_key" placeholder="Cloudflare Turnstile Site Key" autocomplete="off" />
</n-form-item>
<n-form-item label="Secret Key">
<n-input v-model:value="model.secret_key" type="password" show-password-on="click" autocomplete="current-password" />
</n-form-item>
<n-form-item label="自定义域名">
<n-input v-model:value="model.domain" placeholder="留空使用默认域名" autocomplete="url" />
</n-form-item>
<n-form-item label="主题">
<n-select v-model:value="model.theme" :options="themeOptions" clearable />
</n-form-item>
<n-form-item label="尺寸">
<n-select v-model:value="model.size" :options="sizeOptions" clearable />
</n-form-item>
<n-tag v-if="isConfigured" type="success" size="small">✓ 已完整配置</n-tag>
<n-tag v-else type="warning" size="small">未完成配置</n-tag>
</n-space>
</n-form>
</template>
<script setup>
import { computed } from 'vue'
const model = defineModel({ type: Object, default: () => ({}) })
const isConfigured = computed(() => {
const c = model.value
return !!(c.site_key && c.secret_key)
})
const themeOptions = [
{ label: '自动', value: 'auto' },
{ label: '浅色', value: 'light' },
{ label: '深色', value: 'dark' },
]
const sizeOptions = [
{ label: '正常', value: 'normal' },
{ label: '紧凑', value: 'compact' },
]
</script>
@@ -0,0 +1,25 @@
<template>
<n-form label-placement="left" label-width="130">
<n-space vertical style="width:100%">
<n-form-item label="Captcha ID">
<n-input v-model:value="model.captcha_id" placeholder="极验 GeeTest CaptchaID" autocomplete="off" />
</n-form-item>
<n-form-item label="Captcha Key">
<n-input v-model:value="model.captcha_key" type="password" show-password-on="click" autocomplete="current-password" />
</n-form-item>
<n-tag v-if="isConfigured" type="success" size="small">✓ 已完整配置</n-tag>
<n-tag v-else type="warning" size="small">未完成配置</n-tag>
</n-space>
</n-form>
</template>
<script setup>
import { computed } from 'vue'
const model = defineModel({ type: Object, default: () => ({ product: 'bind' }) })
const isConfigured = computed(() => {
const c = model.value
return !!(c.captcha_id && c.captcha_key)
})
</script>
@@ -0,0 +1,42 @@
<template>
<n-form label-placement="left" label-width="130">
<n-space vertical style="width:100%">
<n-divider title-placement="left">云 API 密钥(用于 TC3 签名)</n-divider>
<n-alert type="warning" style="margin-bottom: 12px;">
请从 <n-a href="https://console.cloud.tencent.com/cam/capi" target="_blank">访问管理控制台 → API 密钥管理</n-a> 获取。建议使用子账号密钥并仅授予 <code>QcloudCaptchaFullAccess</code> 权限。
</n-alert>
<n-form-item label="SecretId">
<n-input v-model:value="model.secret_id" placeholder="腾讯云 API SecretId" autocomplete="off" />
</n-form-item>
<n-form-item label="SecretKey">
<n-input v-model:value="model.secret_key" type="text" placeholder="腾讯云 API SecretKey" autocomplete="off" show-password-on="click" />
</n-form-item>
<n-divider title-placement="left">验证码密钥</n-divider>
<n-form-item label="CaptchaAppId">
<n-input v-model:value="model.app_id" placeholder="从验证码控制台获取 CaptchaAppId" autocomplete="off" />
</n-form-item>
<n-form-item label="AppSecretKey">
<n-input v-model:value="model.app_secret_key" type="text" placeholder="从验证码控制台获取 AppSecretKey" autocomplete="off" show-password-on="click" />
<template #feedback>请从「验证管理 → 基础配置」完整复制,注意区分 I/l/1/O/0</template>
</n-form-item>
<n-alert type="info" style="margin-bottom: 12px;">
腾讯云验证码 2.0 — 验证类型(滑动拼图、文字点选、空间语义等)请在<a href="https://console.cloud.tencent.com/captcha/graphical" target="_blank">验证码控制台</a>配置。
</n-alert>
<n-tag v-if="isConfigured" type="success" size="small">✓ 已完整配置</n-tag>
<n-tag v-else type="warning" size="small">未完成配置</n-tag>
</n-space>
</n-form>
</template>
<script setup>
import { computed } from 'vue'
const model = defineModel({ type: Object, default: () => ({}) })
const isConfigured = computed(() => {
const c = model.value
return !!(c.secret_id && c.secret_key && c.app_id && c.app_secret_key)
})
</script>