2026-09-05 23:46:35 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="system-settings">
|
2026-10-25 20:34:15 +08:00
|
|
|
|
<header class="settings-header">
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<span class="settings-eyebrow">SALON ADMIN</span>
|
|
|
|
|
|
<h1>系统设置</h1>
|
|
|
|
|
|
<p>集中管理后台运行参数、服务接入和当前账号。</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<span class="settings-health"><i />配置服务正常</span>
|
|
|
|
|
|
</header>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="settings-layout">
|
|
|
|
|
|
<nav class="settings-nav" aria-label="系统设置分类">
|
|
|
|
|
|
<span class="settings-nav__label">设置目录</span>
|
|
|
|
|
|
<button
|
|
|
|
|
|
v-for="item in sections"
|
|
|
|
|
|
:key="item.key"
|
|
|
|
|
|
type="button"
|
|
|
|
|
|
:aria-pressed="activeSection === item.key"
|
|
|
|
|
|
:class="['settings-nav__item', { 'is-active': activeSection === item.key }]"
|
|
|
|
|
|
@click="activeSection = item.key"
|
|
|
|
|
|
>
|
|
|
|
|
|
<span class="settings-nav__icon"><component :is="item.icon" /></span>
|
|
|
|
|
|
<span>{{ item.label }}</span>
|
|
|
|
|
|
</button>
|
|
|
|
|
|
<p class="settings-nav__hint">复杂业务继续在独立页面管理,这里只保留影响后台运行的设置。</p>
|
|
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
|
|
|
|
<main class="settings-pane" :aria-busy="loading">
|
|
|
|
|
|
<section v-if="activeSection === 'runtime'" class="settings-section-panel">
|
|
|
|
|
|
<div class="pane-head">
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<h2>运行参数</h2>
|
|
|
|
|
|
<p>控制账号创建和店长登录后的默认行为。</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<span />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="setting-group">
|
|
|
|
|
|
<div class="setting-group__head setting-group__head--with-action"><strong>账号默认值</strong><span>USER</span><a-button size="small" type="primary" :loading="savingDefaultPassword" @click="saveDefaultPassword">保存密码设置</a-button></div>
|
|
|
|
|
|
<div class="setting-row setting-row--last">
|
|
|
|
|
|
<div class="setting-copy">
|
|
|
|
|
|
<strong>后台新增用户默认密码</strong>
|
|
|
|
|
|
<span>新增或重置店长账号时使用,不影响已有账号。</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="setting-control setting-control--password">
|
|
|
|
|
|
<a-input-password v-model:value="defaultPasswordForm.configValue" autocomplete="new-password" placeholder="请输入 8-32 位强密码" />
|
|
|
|
|
|
<span class="control-note">{{ defaultPasswordForm.configValue ? '已填写' : '未设置' }}</span>
|
|
|
|
|
|
<a-switch v-model:checked="defaultPasswordEnabled" checked-children="启用" un-checked-children="停用" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<span :class="['status-pill', { 'is-muted': !defaultPasswordEnabled }]">{{ defaultPasswordEnabled ? '启用' : '停用' }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="setting-group">
|
|
|
|
|
|
<div class="setting-group__head setting-group__head--with-action"><strong>店长登录提醒</strong><span>WORKBENCH</span><a-button size="small" type="primary" :loading="savingReviewNotice" @click="saveReviewNotice">保存提醒设置</a-button></div>
|
|
|
|
|
|
<div class="setting-row setting-row--last">
|
|
|
|
|
|
<div class="setting-copy">
|
|
|
|
|
|
<strong>店长员工审核提醒</strong>
|
|
|
|
|
|
<span>店长登录小程序时提醒处理待审核员工申请。</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="setting-control">
|
|
|
|
|
|
<a-switch v-model:checked="reviewNoticeEnabled" checked-children="显示" un-checked-children="隐藏" />
|
|
|
|
|
|
<span class="control-note">登录时{{ reviewNoticeEnabled ? '显示' : '不显示' }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<span :class="['status-pill', { 'is-muted': !reviewNoticeEnabled }]">{{ reviewNoticeEnabled ? '启用' : '停用' }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2026-10-26 21:12:50 +08:00
|
|
|
|
|
|
|
|
|
|
<div class="setting-group">
|
|
|
|
|
|
<div class="setting-group__head setting-group__head--with-action"><strong>店长注册审核</strong><span>WORKBENCH</span><a-button size="small" type="primary" :loading="savingManagerReviewMode" @click="saveManagerReviewMode">保存审核模式</a-button></div>
|
|
|
|
|
|
<div class="setting-row setting-row--last">
|
|
|
|
|
|
<div class="setting-copy">
|
|
|
|
|
|
<strong>内容审核通过后自动批准</strong>
|
|
|
|
|
|
<span>开启后仅在店长申请绑定的门店资料内容审核通过时自动通过;关闭后由管理员人工复核。</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="setting-control">
|
|
|
|
|
|
<a-switch v-model:checked="managerAutoApproveEnabled" checked-children="自动" un-checked-children="人工" />
|
|
|
|
|
|
<span class="control-note">{{ managerAutoApproveEnabled ? '自动批准' : '人工复核' }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<span :class="['status-pill', { 'is-muted': !managerAutoApproveEnabled }]">{{ managerAutoApproveEnabled ? '自动审核' : '人工审核' }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="setting-group">
|
|
|
|
|
|
<div class="setting-group__head setting-group__head--with-action"><strong>门店经营有效期</strong><span>SHOP</span><a-button size="small" type="primary" :loading="savingShopValidity" @click="saveShopValidity">保存有效期</a-button></div>
|
|
|
|
|
|
<div class="setting-row setting-row--last">
|
|
|
|
|
|
<div class="setting-copy">
|
|
|
|
|
|
<strong>新门店默认有效期</strong>
|
|
|
|
|
|
<span>店长注册审核通过当天计为第 1 天;单个门店可在门店管理中单独调整到期日。</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="setting-control setting-control--number">
|
|
|
|
|
|
<a-input v-model:value="shopDefaultValidDays" type="number" :min="1" :max="3650" addon-after="天" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<span class="control-note">1–3650 天</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p class="section-footnote">默认密码仍按后台账号接口校验;员工审核入口和数量角标不受登录提醒开关影响。门店到期只限制新增普通预约。</p>
|
2026-10-25 20:34:15 +08:00
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
<section v-else-if="activeSection === 'services'" class="settings-section-panel">
|
|
|
|
|
|
<div class="pane-head">
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<h2>服务接入</h2>
|
2026-10-30 17:08:00 +08:00
|
|
|
|
<p>维护加密保存的地图密钥、微信审核回调和短信服务渠道。</p>
|
2026-10-25 20:34:15 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<span />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="setting-group">
|
2026-10-30 17:08:00 +08:00
|
|
|
|
<div class="setting-group__head setting-group__head--with-action"><strong>地图服务</strong><span>安全接入</span><a-button size="small" type="primary" :loading="savingMap" @click="saveMapConfig">保存地图设置</a-button></div>
|
2026-10-25 20:34:15 +08:00
|
|
|
|
<div class="setting-row">
|
|
|
|
|
|
<div class="setting-copy"><strong>默认地图渠道</strong><span>店铺选点和后台地图展示使用的默认渠道。</span></div>
|
2026-10-30 17:08:00 +08:00
|
|
|
|
<div class="setting-control"><a-select v-model:value="mapProvider" :options="mapProviderOptions" /></div>
|
|
|
|
|
|
<span class="status-pill" :class="{ 'is-muted': !mapEnabled }">{{ mapEnabled ? '启用' : '停用' }}</span>
|
2026-10-25 20:34:15 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div v-for="item in mapKeyRows" :key="item.key" class="setting-row">
|
2026-10-26 22:11:03 +08:00
|
|
|
|
<div class="setting-copy">
|
|
|
|
|
|
<strong>
|
|
|
|
|
|
{{ item.label }}
|
|
|
|
|
|
<a
|
|
|
|
|
|
class="setting-copy__link"
|
|
|
|
|
|
:href="item.url"
|
|
|
|
|
|
target="_blank"
|
|
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
|
|
:aria-label="`前往${item.label}获取页面`"
|
|
|
|
|
|
>
|
|
|
|
|
|
获取 Key
|
|
|
|
|
|
<ExportOutlined />
|
|
|
|
|
|
</a>
|
|
|
|
|
|
</strong>
|
|
|
|
|
|
<span>{{ item.description }}</span>
|
|
|
|
|
|
</div>
|
2026-10-30 17:08:00 +08:00
|
|
|
|
<div class="setting-control setting-control--password">
|
|
|
|
|
|
<a-input-password v-model:value="mapSecrets[item.key]" :placeholder="item.placeholder" autocomplete="new-password" />
|
|
|
|
|
|
<a-button v-if="mapConfigured(item.key)" size="small" type="text" danger @click="toggleMapSecretClear(item.key)">{{ clearMapSecrets[item.key] ? '撤销清除' : '清除' }}</a-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<span class="status-pill" :class="{ 'is-muted': !mapConfigured(item.key) || clearMapSecrets[item.key] }">{{ clearMapSecrets[item.key] ? '保存后清除' : mapConfigured(item.key) ? '已配置' : '待配置' }}</span>
|
2026-10-25 20:34:15 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="setting-row setting-row--last">
|
|
|
|
|
|
<div class="setting-copy"><strong>地图服务状态</strong><span>停用后店铺地图选点不会调用已保存的渠道。</span></div>
|
|
|
|
|
|
<div class="setting-control"><a-switch v-model:checked="mapEnabled" checked-children="启用" un-checked-children="停用" /></div>
|
|
|
|
|
|
<span :class="['status-pill', { 'is-muted': !mapEnabled }]">{{ mapEnabled ? '启用' : '停用' }}</span>
|
|
|
|
|
|
</div>
|
2026-10-30 17:08:00 +08:00
|
|
|
|
<p class="secure-note">密钥以 AES-256-GCM 加密保存在当前环境数据库,设置接口不回传密钥。地图打开时才通过管理员认证接口按当前渠道读取;Web Key 会在浏览器地图 SDK 请求中使用,请在地图开放平台限制可用域名,并为 DEV、SIT、PROD 分别创建 Key。<span v-if="secureStatus && !secureStatus.encryptionKeyConfigured" class="secure-note__warning">服务端加密主密钥尚未配置,需先由部署维护人员设置后才能保存。</span></p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="setting-group">
|
|
|
|
|
|
<div class="setting-group__head setting-group__head--with-action"><strong>微信内容审核</strong><span>安全回调</span><a-button size="small" type="primary" :loading="savingModeration" @click="saveModerationConfig">保存审核设置</a-button></div>
|
|
|
|
|
|
<div class="setting-row">
|
|
|
|
|
|
<div class="setting-copy"><strong>审核渠道</strong><span>未启用或配置不完整时,内容保持隔离,不会自动放行。</span></div>
|
|
|
|
|
|
<div class="setting-control"><a-select v-model:value="moderationProvider" :options="moderationProviderOptions" /></div>
|
|
|
|
|
|
<span class="status-pill" :class="{ 'is-muted': !secureStatus?.moderationReady }">{{ secureStatus?.moderationReady ? '已就绪' : '待配置' }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="setting-row">
|
|
|
|
|
|
<div class="setting-copy"><strong>微信服务器回调 URL</strong><span>复制到微信公众平台「开发管理 → 开发设置 → 消息推送」的 URL。</span></div>
|
|
|
|
|
|
<div class="setting-control setting-control--joined">
|
|
|
|
|
|
<a-input v-model:value="moderationCallbackUrl" readonly />
|
|
|
|
|
|
<a-button @click="copyCallbackUrl"><CopyOutlined />复制</a-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<span class="status-pill" :class="{ 'is-muted': !isPublicHttpsCallback }">{{ isPublicHttpsCallback ? '当前环境 HTTPS' : '本地地址不可验证' }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="setting-row">
|
|
|
|
|
|
<div class="setting-copy"><strong>回调 Token</strong><span>在微信消息推送配置中填写的 Token,留空表示不修改已保存值。</span></div>
|
|
|
|
|
|
<div class="setting-control setting-control--password">
|
|
|
|
|
|
<a-input-password v-model:value="moderationSecrets.callbackToken" autocomplete="new-password" placeholder="填写新的 Token,留空保持原值" />
|
|
|
|
|
|
<a-button v-if="secureStatus?.moderationCallbackTokenConfigured" size="small" type="text" danger @click="toggleModerationSecretClear('callbackToken')">{{ clearModerationSecrets.callbackToken ? '撤销清除' : '清除' }}</a-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<span class="status-pill" :class="{ 'is-muted': !secureStatus?.moderationCallbackTokenConfigured || clearModerationSecrets.callbackToken }">{{ clearModerationSecrets.callbackToken ? '保存后清除' : secureStatus?.moderationCallbackTokenConfigured ? '已配置' : '待配置' }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="setting-row setting-row--last">
|
|
|
|
|
|
<div class="setting-copy"><strong>EncodingAESKey</strong><span>微信平台生成的 43 位密钥;消息加密方式必须选择「安全模式」。</span></div>
|
|
|
|
|
|
<div class="setting-control setting-control--password">
|
|
|
|
|
|
<a-input-password v-model:value="moderationSecrets.encodingAesKey" autocomplete="new-password" placeholder="填写 43 位 EncodingAESKey,留空保持原值" />
|
|
|
|
|
|
<a-button v-if="secureStatus?.moderationEncodingAesKeyConfigured" size="small" type="text" danger @click="toggleModerationSecretClear('encodingAesKey')">{{ clearModerationSecrets.encodingAesKey ? '撤销清除' : '清除' }}</a-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<span class="status-pill" :class="{ 'is-muted': !secureStatus?.moderationEncodingAesKeyConfigured || clearModerationSecrets.encodingAesKey }">{{ clearModerationSecrets.encodingAesKey ? '保存后清除' : secureStatus?.moderationEncodingAesKeyConfigured ? '已配置' : '待配置' }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="secure-guide">
|
|
|
|
|
|
<strong>微信平台填写指引</strong>
|
|
|
|
|
|
<ol>
|
|
|
|
|
|
<li>进入小程序公众平台的「开发管理 → 开发设置 → 消息推送」,将上方 URL、Token、EncodingAESKey 填入对应项。</li>
|
|
|
|
|
|
<li>消息加密方式选择「安全模式」,保存后使用微信平台的 URL 验证;确认审核用 AppID 与当前环境小程序一致。</li>
|
|
|
|
|
|
<li>将此环境 Core 的公网出口 IP 加入小程序接口 IP 白名单;图片审核还要求对象存储签名 URL 可由微信公网 HTTPS 访问。</li>
|
|
|
|
|
|
</ol>
|
|
|
|
|
|
<div class="secure-guide__links">
|
|
|
|
|
|
<a href="https://mp.weixin.qq.com/" target="_blank" rel="noopener noreferrer">打开微信公众平台 <ExportOutlined /></a>
|
|
|
|
|
|
<a href="https://developers.weixin.qq.com/miniprogram/dev/framework/server-ability/message-push.html" target="_blank" rel="noopener noreferrer">消息推送配置说明 <ExportOutlined /></a>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<span v-if="!isPublicHttpsCallback" class="secure-note__warning">当前地址为本地或非 HTTPS 地址,不能用于微信服务器验证。请在对应环境的正式 HTTPS 域名后台填写。</span>
|
|
|
|
|
|
<span v-if="secureStatus && !secureStatus.encryptionKeyConfigured" class="secure-note__warning">安全接入加密主密钥尚未配置,Token 与 AESKey 不会保存。</span>
|
|
|
|
|
|
</div>
|
2026-10-25 20:34:15 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="setting-group">
|
|
|
|
|
|
<div class="setting-group__head setting-group__head--with-action"><strong>短信服务</strong><span>SMS</span><a-button size="small" type="primary" :loading="savingSmsProvider" @click="saveSmsProvider">保存短信设置</a-button></div>
|
|
|
|
|
|
<div class="setting-row setting-row--last">
|
|
|
|
|
|
<div class="setting-copy"><strong>短信供应商</strong><span>统一控制登录、绑定和找回密码的验证码通道。</span></div>
|
|
|
|
|
|
<div class="setting-control"><a-select v-model:value="smsProviderForm.configValue" :options="smsProviderOptions" /></div>
|
|
|
|
|
|
<span class="warning-note">切换会影响全部验证码</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
<section v-else class="settings-section-panel">
|
|
|
|
|
|
<div class="pane-head">
|
|
|
|
|
|
<div>
|
2026-10-26 01:19:23 +08:00
|
|
|
|
<h2>管理员账号</h2>
|
|
|
|
|
|
<p>查看后台登录账号与当前会话状态。</p>
|
2026-10-25 20:34:15 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<span class="account-status"><i />会话正常</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="setting-group">
|
|
|
|
|
|
<div class="setting-group__head"><strong>账号信息</strong><span>ACCOUNT</span></div>
|
|
|
|
|
|
<div class="setting-row">
|
|
|
|
|
|
<div class="setting-copy"><strong>登录账号</strong><span>用于进入后台的账号标识。</span></div>
|
|
|
|
|
|
<div class="setting-value">{{ userInfo?.account || '--' }}</div>
|
|
|
|
|
|
<span class="status-pill">当前账号</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="setting-row">
|
|
|
|
|
|
<div class="setting-copy"><strong>显示昵称</strong><span>后台顶部和操作记录中使用的昵称。</span></div>
|
|
|
|
|
|
<div class="setting-value">{{ userInfo?.nickname || '未设置昵称' }}</div>
|
|
|
|
|
|
<span class="control-note">只读</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="setting-row setting-row--last">
|
2026-10-26 01:19:23 +08:00
|
|
|
|
<div class="setting-copy"><strong>后台会话</strong><span>后台请求使用管理员身份校验,退出登录后当前会话立即失效。</span></div>
|
|
|
|
|
|
<div class="setting-value">{{ userInfo?.id ? '已登录' : '状态未知' }}</div>
|
|
|
|
|
|
<span class="status-pill" :class="{ 'is-muted': !userInfo?.id }">{{ userInfo?.id ? '正常' : '待验证' }}</span>
|
2026-10-25 20:34:15 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</section>
|
|
|
|
|
|
</main>
|
|
|
|
|
|
</div>
|
2026-09-05 23:46:35 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2026-10-30 17:08:00 +08:00
|
|
|
|
import { computed, onMounted, reactive, ref } from 'vue'
|
2026-10-25 20:34:15 +08:00
|
|
|
|
import { useRoute } from 'vue-router'
|
2026-09-05 23:46:35 +08:00
|
|
|
|
import { message } from 'ant-design-vue'
|
2026-10-30 17:08:00 +08:00
|
|
|
|
import { ApiOutlined, CopyOutlined, ExportOutlined, SettingOutlined, UserOutlined } from '@ant-design/icons-vue'
|
|
|
|
|
|
import { adminSecureIntegrationConfigApi, adminSystemParameterConfigApi, type SecureIntegrationConfigVO, type SystemParameterConfigVO } from '@/api/admin'
|
2026-10-26 01:19:23 +08:00
|
|
|
|
import { loadCachedAdminUserInfo } from '@/utils/admin-session'
|
2026-09-05 23:46:35 +08:00
|
|
|
|
|
2026-10-25 20:34:15 +08:00
|
|
|
|
type SettingsSection = 'runtime' | 'services' | 'account'
|
|
|
|
|
|
type MapKey = 'tencentWeb' | 'amapWeb' | 'amapMini'
|
|
|
|
|
|
|
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
|
const activeSection = ref<SettingsSection>(route.query.section === 'account' ? 'account' : 'runtime')
|
2026-09-05 23:46:35 +08:00
|
|
|
|
const loading = ref(false)
|
2026-10-25 20:34:15 +08:00
|
|
|
|
const savingDefaultPassword = ref(false)
|
2026-10-12 16:45:42 +08:00
|
|
|
|
const savingReviewNotice = ref(false)
|
2026-10-26 21:12:50 +08:00
|
|
|
|
const savingManagerReviewMode = ref(false)
|
|
|
|
|
|
const savingShopValidity = ref(false)
|
2026-10-25 20:34:15 +08:00
|
|
|
|
const savingMap = ref(false)
|
2026-10-30 17:08:00 +08:00
|
|
|
|
const savingModeration = ref(false)
|
2026-10-25 20:34:15 +08:00
|
|
|
|
const savingSmsProvider = ref(false)
|
|
|
|
|
|
const defaultPasswordEnabled = ref(true)
|
2026-10-12 16:45:42 +08:00
|
|
|
|
const reviewNoticeEnabled = ref(true)
|
2026-10-26 21:12:50 +08:00
|
|
|
|
const managerAutoApproveEnabled = ref(false)
|
|
|
|
|
|
const shopDefaultValidDays = ref('30')
|
2026-10-25 20:34:15 +08:00
|
|
|
|
const mapEnabled = ref(true)
|
2026-10-30 17:08:00 +08:00
|
|
|
|
const mapProvider = ref<'TENCENT' | 'AMAP'>('TENCENT')
|
|
|
|
|
|
const secureStatus = ref<SecureIntegrationConfigVO | null>(null)
|
|
|
|
|
|
const mapSecrets = reactive<Record<MapKey, string>>({ tencentWeb: '', amapWeb: '', amapMini: '' })
|
|
|
|
|
|
const clearMapSecrets = reactive<Record<MapKey, boolean>>({ tencentWeb: false, amapWeb: false, amapMini: false })
|
|
|
|
|
|
const moderationProvider = ref<'DISABLED' | 'MOCK' | 'WECHAT'>('DISABLED')
|
|
|
|
|
|
const moderationCallbackUrl = ref('')
|
|
|
|
|
|
const moderationSecrets = reactive({ callbackToken: '', encodingAesKey: '' })
|
|
|
|
|
|
const clearModerationSecrets = reactive({ callbackToken: false, encodingAesKey: false })
|
2026-09-06 21:41:09 +08:00
|
|
|
|
const smsProviderOptions = [
|
|
|
|
|
|
{ label: 'Spug 短信', value: 'SPUG' },
|
|
|
|
|
|
{ label: '阿里云短信认证服务', value: 'ALIYUN_SMS_VERIFY' }
|
|
|
|
|
|
]
|
2026-10-25 20:34:15 +08:00
|
|
|
|
const mapProviderOptions = [
|
|
|
|
|
|
{ label: '腾讯地图', value: 'TENCENT' },
|
|
|
|
|
|
{ label: '高德地图', value: 'AMAP' }
|
|
|
|
|
|
]
|
2026-10-30 17:08:00 +08:00
|
|
|
|
const moderationProviderOptions = computed(() => [
|
|
|
|
|
|
{ label: '未启用(失败关闭)', value: 'DISABLED' },
|
|
|
|
|
|
...(secureStatus.value?.mockProviderAllowed ? [{ label: '本地模拟审核', value: 'MOCK' as const }] : []),
|
|
|
|
|
|
{ label: '微信内容安全审核', value: 'WECHAT' }
|
|
|
|
|
|
])
|
|
|
|
|
|
const isPublicHttpsCallback = computed(() => /^https:\/\//i.test(moderationCallbackUrl.value)
|
|
|
|
|
|
&& !/localhost|127\.0\.0\.1/i.test(moderationCallbackUrl.value))
|
2026-10-25 20:34:15 +08:00
|
|
|
|
const sections = [
|
|
|
|
|
|
{ key: 'runtime' as const, label: '运行参数', icon: SettingOutlined },
|
|
|
|
|
|
{ key: 'services' as const, label: '服务接入', icon: ApiOutlined },
|
|
|
|
|
|
{ key: 'account' as const, label: '当前账号', icon: UserOutlined }
|
|
|
|
|
|
]
|
2026-10-26 22:11:03 +08:00
|
|
|
|
const mapKeyRows: Array<{ key: MapKey; label: string; description: string; placeholder: string; url: string }> = [
|
2026-10-30 17:08:00 +08:00
|
|
|
|
{ key: 'tencentWeb', label: '腾讯 Web Key', description: '用于后台腾讯地图选点。', placeholder: '填写腾讯 Web Key;留空保持原值', url: 'https://lbs.qq.com/dev/console/key/manage' },
|
|
|
|
|
|
{ key: 'amapWeb', label: '高德 Web Key', description: '用于后台高德地图选点。', placeholder: '填写高德 Web Key;留空保持原值', url: 'https://console.amap.com/dev/key/app' },
|
|
|
|
|
|
{ key: 'amapMini', label: '高德小程序 Key', description: '供 Salon 小程序地图能力使用。', placeholder: '填写高德小程序 Key;留空保持原值', url: 'https://console.amap.com/dev/key/app' }
|
2026-10-25 20:34:15 +08:00
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
const defaultPasswordForm = reactive<SystemParameterConfigVO>({
|
|
|
|
|
|
configGroup: 'USER', configKey: 'DEFAULT_PASSWORD', configName: '后台新增用户默认密码', configValue: 'Fingertip@123', enabled: 1,
|
|
|
|
|
|
remark: '后台新增用户不填写密码时使用;需满足 8-32 位且至少包含数字、小写字母、大写字母、特殊符号中的 3 类'
|
|
|
|
|
|
})
|
|
|
|
|
|
const reviewNoticeForm = reactive<SystemParameterConfigVO>({
|
|
|
|
|
|
configGroup: 'WORKBENCH', configKey: 'MANAGER_REGISTRATION_REVIEW_NOTICE', configName: '店长员工审核提醒', configValue: 'true', enabled: 1,
|
|
|
|
|
|
remark: '控制店长登录小程序后是否显式提示当前门店的待审核员工申请'
|
|
|
|
|
|
})
|
2026-10-26 21:12:50 +08:00
|
|
|
|
const managerReviewModeForm = reactive<SystemParameterConfigVO>({
|
|
|
|
|
|
configGroup: 'WORKBENCH', configKey: 'MANAGER_REGISTRATION_AUTO_APPROVE', configName: '店长注册自动审核', configValue: 'false', enabled: 1,
|
|
|
|
|
|
remark: '开启后仅在店长申请关联的门店资料内容审核通过时自动批准;关闭后由管理员人工复核'
|
|
|
|
|
|
})
|
|
|
|
|
|
const shopValidityForm = reactive<SystemParameterConfigVO>({
|
|
|
|
|
|
configGroup: 'SHOP', configKey: 'SHOP_DEFAULT_VALID_DAYS', configName: '新门店默认有效期天数', configValue: '30', enabled: 1,
|
|
|
|
|
|
remark: '店长注册审核通过后新门店的默认经营有效期天数,范围1-3650'
|
|
|
|
|
|
})
|
2026-09-06 21:41:09 +08:00
|
|
|
|
const smsProviderForm = reactive<SystemParameterConfigVO>({
|
|
|
|
|
|
configGroup: 'SMS', configKey: 'SMS_PROVIDER', configName: '短信供应商', configValue: 'SPUG', enabled: 1,
|
|
|
|
|
|
remark: '全局切换短信供应商时同步验证码模板和 MessageHub 通道'
|
|
|
|
|
|
})
|
2026-10-25 20:34:15 +08:00
|
|
|
|
const userInfo = ref(loadCachedAdminUserInfo())
|
|
|
|
|
|
|
2026-10-30 17:08:00 +08:00
|
|
|
|
const callbackPath = '/api/integration/wechat/content-moderation/callback'
|
|
|
|
|
|
const defaultCallbackUrl = () => `${window.location.origin}${callbackPath}`
|
|
|
|
|
|
const mapConfigured = (key: MapKey) => {
|
|
|
|
|
|
if (clearMapSecrets[key]) return false
|
|
|
|
|
|
if (mapSecrets[key]) return true
|
|
|
|
|
|
if (!secureStatus.value) return false
|
|
|
|
|
|
return key === 'tencentWeb' ? secureStatus.value.tencentWebKeyConfigured
|
|
|
|
|
|
: key === 'amapWeb' ? secureStatus.value.amapWebKeyConfigured
|
|
|
|
|
|
: secureStatus.value.amapMiniKeyConfigured
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-05 23:46:35 +08:00
|
|
|
|
const load = async () => {
|
|
|
|
|
|
loading.value = true
|
|
|
|
|
|
try {
|
2026-10-30 17:08:00 +08:00
|
|
|
|
const [userConfigs, smsConfigs, workbenchConfigs, shopConfigs, secureConfig] = await Promise.all([
|
2026-09-06 21:41:09 +08:00
|
|
|
|
adminSystemParameterConfigApi.listConfigs('USER'),
|
2026-10-12 16:45:42 +08:00
|
|
|
|
adminSystemParameterConfigApi.listConfigs('SMS'),
|
2026-10-25 20:34:15 +08:00
|
|
|
|
adminSystemParameterConfigApi.listConfigs('WORKBENCH'),
|
2026-10-26 21:12:50 +08:00
|
|
|
|
adminSystemParameterConfigApi.listConfigs('SHOP'),
|
2026-10-30 17:08:00 +08:00
|
|
|
|
adminSecureIntegrationConfigApi.getConfig()
|
2026-09-06 21:41:09 +08:00
|
|
|
|
])
|
2026-10-25 20:34:15 +08:00
|
|
|
|
const defaultPassword = userConfigs.find(item => item.configKey === 'DEFAULT_PASSWORD')
|
|
|
|
|
|
if (defaultPassword) {
|
|
|
|
|
|
Object.assign(defaultPasswordForm, defaultPassword)
|
|
|
|
|
|
defaultPasswordEnabled.value = defaultPassword.enabled === 1
|
2026-09-05 23:46:35 +08:00
|
|
|
|
}
|
2026-09-06 21:41:09 +08:00
|
|
|
|
const smsProvider = smsConfigs.find(item => item.configKey === 'SMS_PROVIDER')
|
|
|
|
|
|
if (smsProvider) Object.assign(smsProviderForm, smsProvider)
|
2026-10-12 16:45:42 +08:00
|
|
|
|
const reviewNotice = workbenchConfigs.find(item => item.configKey === 'MANAGER_REGISTRATION_REVIEW_NOTICE')
|
|
|
|
|
|
if (reviewNotice) {
|
|
|
|
|
|
Object.assign(reviewNoticeForm, reviewNotice)
|
|
|
|
|
|
reviewNoticeEnabled.value = reviewNotice.enabled === 1 && String(reviewNotice.configValue).toLowerCase() === 'true'
|
|
|
|
|
|
}
|
2026-10-26 21:12:50 +08:00
|
|
|
|
const managerReviewMode = workbenchConfigs.find(item => item.configKey === 'MANAGER_REGISTRATION_AUTO_APPROVE')
|
|
|
|
|
|
if (managerReviewMode) {
|
|
|
|
|
|
Object.assign(managerReviewModeForm, managerReviewMode)
|
|
|
|
|
|
managerAutoApproveEnabled.value = managerReviewMode.enabled === 1 && String(managerReviewMode.configValue).toLowerCase() === 'true'
|
|
|
|
|
|
}
|
|
|
|
|
|
const shopValidity = shopConfigs.find(item => item.configKey === 'SHOP_DEFAULT_VALID_DAYS')
|
|
|
|
|
|
if (shopValidity) {
|
|
|
|
|
|
Object.assign(shopValidityForm, shopValidity)
|
|
|
|
|
|
shopDefaultValidDays.value = String(shopValidity.configValue || '30')
|
|
|
|
|
|
}
|
2026-10-30 17:08:00 +08:00
|
|
|
|
secureStatus.value = secureConfig
|
|
|
|
|
|
mapProvider.value = secureConfig.mapProvider === 'AMAP' ? 'AMAP' : 'TENCENT'
|
|
|
|
|
|
mapEnabled.value = Boolean(secureConfig.mapEnabled)
|
|
|
|
|
|
moderationProvider.value = secureConfig.moderationProvider || 'DISABLED'
|
|
|
|
|
|
moderationCallbackUrl.value = secureConfig.moderationCallbackUrl || defaultCallbackUrl()
|
|
|
|
|
|
mapSecrets.tencentWeb = ''
|
|
|
|
|
|
mapSecrets.amapWeb = ''
|
|
|
|
|
|
mapSecrets.amapMini = ''
|
|
|
|
|
|
moderationSecrets.callbackToken = ''
|
|
|
|
|
|
moderationSecrets.encodingAesKey = ''
|
2026-10-26 01:19:23 +08:00
|
|
|
|
userInfo.value = loadCachedAdminUserInfo()
|
2026-09-05 23:46:35 +08:00
|
|
|
|
} catch (error) {
|
2026-10-25 20:34:15 +08:00
|
|
|
|
message.error(error instanceof Error ? error.message : '系统设置加载失败')
|
2026-09-05 23:46:35 +08:00
|
|
|
|
} finally {
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-25 20:34:15 +08:00
|
|
|
|
const validateDefaultPassword = () => {
|
|
|
|
|
|
const password = defaultPasswordForm.configValue.trim()
|
|
|
|
|
|
if (password.length < 8 || password.length > 32) {
|
|
|
|
|
|
message.warning('默认密码长度需为 8-32 位')
|
|
|
|
|
|
return false
|
|
|
|
|
|
}
|
|
|
|
|
|
const categoryCount = [/[0-9]/.test(password), /[a-z]/.test(password), /[A-Z]/.test(password), /[^A-Za-z0-9]/.test(password)].filter(Boolean).length
|
|
|
|
|
|
if (categoryCount < 3) {
|
|
|
|
|
|
message.warning('默认密码需至少包含数字、小写字母、大写字母、特殊符号中的 3 类')
|
|
|
|
|
|
return false
|
|
|
|
|
|
}
|
|
|
|
|
|
return true
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const saveDefaultPassword = async () => {
|
|
|
|
|
|
if (!validateDefaultPassword()) return
|
|
|
|
|
|
savingDefaultPassword.value = true
|
|
|
|
|
|
try {
|
|
|
|
|
|
await adminSystemParameterConfigApi.saveConfig({ ...defaultPasswordForm, configValue: defaultPasswordForm.configValue.trim(), enabled: defaultPasswordEnabled.value ? 1 : 0 })
|
|
|
|
|
|
message.success('账号默认密码已保存')
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
message.error(error instanceof Error ? error.message : '默认密码保存失败')
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
savingDefaultPassword.value = false
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const saveReviewNotice = async () => {
|
|
|
|
|
|
savingReviewNotice.value = true
|
|
|
|
|
|
try {
|
|
|
|
|
|
await adminSystemParameterConfigApi.saveConfig({ ...reviewNoticeForm, configValue: 'true', enabled: reviewNoticeEnabled.value ? 1 : 0 })
|
|
|
|
|
|
message.success(reviewNoticeEnabled.value ? '店长员工审核提醒已开启' : '店长员工审核提醒已关闭')
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
message.error(error instanceof Error ? error.message : '审核提醒设置保存失败')
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
savingReviewNotice.value = false
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-26 21:12:50 +08:00
|
|
|
|
const saveManagerReviewMode = async () => {
|
|
|
|
|
|
savingManagerReviewMode.value = true
|
|
|
|
|
|
try {
|
|
|
|
|
|
await adminSystemParameterConfigApi.saveConfig({
|
|
|
|
|
|
...managerReviewModeForm,
|
|
|
|
|
|
configValue: managerAutoApproveEnabled.value ? 'true' : 'false',
|
|
|
|
|
|
enabled: 1
|
|
|
|
|
|
})
|
|
|
|
|
|
message.success(managerAutoApproveEnabled.value ? '店长注册自动审核已开启' : '店长注册将由管理员人工复核')
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
message.error(error instanceof Error ? error.message : '审核模式保存失败')
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
savingManagerReviewMode.value = false
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const saveShopValidity = async () => {
|
|
|
|
|
|
const days = Number(shopDefaultValidDays.value)
|
|
|
|
|
|
if (!Number.isInteger(days) || days < 1 || days > 3650) {
|
|
|
|
|
|
message.warning('有效期请填写 1–3650 的整数天数')
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
savingShopValidity.value = true
|
|
|
|
|
|
try {
|
|
|
|
|
|
await adminSystemParameterConfigApi.saveConfig({ ...shopValidityForm, configValue: String(days), enabled: 1 })
|
|
|
|
|
|
message.success('新门店默认有效期已保存')
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
message.error(error instanceof Error ? error.message : '有效期设置保存失败')
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
savingShopValidity.value = false
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-25 20:34:15 +08:00
|
|
|
|
const saveMapConfig = async () => {
|
|
|
|
|
|
savingMap.value = true
|
|
|
|
|
|
try {
|
2026-10-30 17:08:00 +08:00
|
|
|
|
const result = await adminSecureIntegrationConfigApi.saveMapConfig({
|
|
|
|
|
|
mapProvider: mapProvider.value,
|
|
|
|
|
|
mapEnabled: mapEnabled.value,
|
|
|
|
|
|
tencentWebKey: mapSecrets.tencentWeb,
|
|
|
|
|
|
amapWebKey: mapSecrets.amapWeb,
|
|
|
|
|
|
amapMiniKey: mapSecrets.amapMini,
|
|
|
|
|
|
clearTencentWebKey: clearMapSecrets.tencentWeb,
|
|
|
|
|
|
clearAmapWebKey: clearMapSecrets.amapWeb,
|
|
|
|
|
|
clearAmapMiniKey: clearMapSecrets.amapMini
|
|
|
|
|
|
})
|
|
|
|
|
|
secureStatus.value = result
|
|
|
|
|
|
Object.keys(mapSecrets).forEach(key => { mapSecrets[key as MapKey] = '' })
|
|
|
|
|
|
Object.keys(clearMapSecrets).forEach(key => { clearMapSecrets[key as MapKey] = false })
|
|
|
|
|
|
message.success('地图密钥已加密保存')
|
2026-10-25 20:34:15 +08:00
|
|
|
|
} catch (error) {
|
2026-10-30 17:08:00 +08:00
|
|
|
|
message.error(error instanceof Error ? error.message : '安全地图配置保存失败')
|
2026-10-25 20:34:15 +08:00
|
|
|
|
} finally {
|
|
|
|
|
|
savingMap.value = false
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-10-30 17:08:00 +08:00
|
|
|
|
const saveModerationConfig = async () => {
|
|
|
|
|
|
if (moderationProvider.value === 'WECHAT') {
|
|
|
|
|
|
if (!isPublicHttpsCallback.value) {
|
|
|
|
|
|
message.warning('微信审核回调必须使用公网可访问的 HTTPS 地址')
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
if (moderationSecrets.callbackToken && (moderationSecrets.callbackToken.length < 3 || moderationSecrets.callbackToken.length > 32)) {
|
|
|
|
|
|
message.warning('微信回调 Token 需要为 3-32 个字符')
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
if (moderationSecrets.encodingAesKey && !/^[A-Za-z0-9+/]{43}$/.test(moderationSecrets.encodingAesKey)) {
|
|
|
|
|
|
message.warning('EncodingAESKey 需要为 43 位字符')
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
const hasToken = secureStatus.value?.moderationCallbackTokenConfigured && !clearModerationSecrets.callbackToken
|
|
|
|
|
|
const hasAesKey = secureStatus.value?.moderationEncodingAesKeyConfigured && !clearModerationSecrets.encodingAesKey
|
|
|
|
|
|
if ((!hasToken && !moderationSecrets.callbackToken) || (!hasAesKey && !moderationSecrets.encodingAesKey)) {
|
|
|
|
|
|
message.warning('启用微信审核前,请填写回调 Token 和 EncodingAESKey')
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
savingModeration.value = true
|
|
|
|
|
|
try {
|
|
|
|
|
|
secureStatus.value = await adminSecureIntegrationConfigApi.saveModerationConfig({
|
|
|
|
|
|
moderationProvider: moderationProvider.value,
|
|
|
|
|
|
moderationCallbackUrl: moderationCallbackUrl.value,
|
|
|
|
|
|
moderationCallbackToken: moderationSecrets.callbackToken,
|
|
|
|
|
|
moderationEncodingAesKey: moderationSecrets.encodingAesKey,
|
|
|
|
|
|
clearModerationCallbackToken: clearModerationSecrets.callbackToken,
|
|
|
|
|
|
clearModerationEncodingAesKey: clearModerationSecrets.encodingAesKey
|
|
|
|
|
|
})
|
|
|
|
|
|
moderationSecrets.callbackToken = ''
|
|
|
|
|
|
moderationSecrets.encodingAesKey = ''
|
|
|
|
|
|
clearModerationSecrets.callbackToken = false
|
|
|
|
|
|
clearModerationSecrets.encodingAesKey = false
|
|
|
|
|
|
message.success('内容审核接入设置已保存')
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
message.error(error instanceof Error ? error.message : '内容审核设置保存失败')
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
savingModeration.value = false
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const toggleMapSecretClear = (key: MapKey) => { clearMapSecrets[key] = !clearMapSecrets[key] }
|
|
|
|
|
|
const toggleModerationSecretClear = (key: 'callbackToken' | 'encodingAesKey') => { clearModerationSecrets[key] = !clearModerationSecrets[key] }
|
|
|
|
|
|
|
|
|
|
|
|
const copyCallbackUrl = async () => {
|
|
|
|
|
|
try {
|
|
|
|
|
|
await navigator.clipboard.writeText(moderationCallbackUrl.value)
|
|
|
|
|
|
message.success('回调 URL 已复制')
|
|
|
|
|
|
} catch {
|
|
|
|
|
|
message.error('复制失败,请手动选择并复制回调 URL')
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-06 21:41:09 +08:00
|
|
|
|
const saveSmsProvider = async () => {
|
|
|
|
|
|
const confirmed = window.confirm('保存后会同步全部短信验证码场景的模板、通道和发送方式,确认切换吗?')
|
|
|
|
|
|
if (!confirmed) return
|
|
|
|
|
|
savingSmsProvider.value = true
|
|
|
|
|
|
try {
|
|
|
|
|
|
await adminSystemParameterConfigApi.saveConfig({ ...smsProviderForm, configValue: smsProviderForm.configValue.toUpperCase(), enabled: 1 })
|
|
|
|
|
|
message.success('短信供应商已切换')
|
2026-10-25 20:34:15 +08:00
|
|
|
|
} catch (error) {
|
|
|
|
|
|
message.error(error instanceof Error ? error.message : '短信供应商保存失败')
|
2026-09-06 21:41:09 +08:00
|
|
|
|
} finally {
|
|
|
|
|
|
savingSmsProvider.value = false
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-09-05 23:46:35 +08:00
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
void load()
|
|
|
|
|
|
})
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
2026-10-25 20:34:15 +08:00
|
|
|
|
.system-settings { display: grid; gap: 22px; color: var(--admin-mobile-ink); }
|
|
|
|
|
|
.settings-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
|
|
|
|
|
|
.settings-eyebrow { color: var(--theme-primary-action); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
|
|
|
|
|
|
.settings-header h1 { margin: 7px 0 4px; font-size: 27px; }
|
|
|
|
|
|
.settings-header p, .pane-head p { margin: 0; color: var(--admin-mobile-muted); font-size: 13px; }
|
|
|
|
|
|
.settings-health, .account-status { display: inline-flex; align-items: center; gap: 7px; color: var(--admin-mobile-muted); font-size: 12px; white-space: nowrap; }
|
|
|
|
|
|
.settings-health i, .account-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--theme-primary); }
|
|
|
|
|
|
.settings-layout { display: grid; grid-template-columns: 214px minmax(0, 1fr); gap: 22px; align-items: start; }
|
|
|
|
|
|
.settings-nav { padding: 9px; border: 1px solid var(--admin-mobile-border); border-radius: 16px; background: color-mix(in srgb, var(--theme-card-bg) 84%, transparent); }
|
|
|
|
|
|
.settings-nav__label { display: block; padding: 7px 10px 8px; color: var(--admin-mobile-muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
|
|
|
|
|
|
.settings-nav__item { display: flex; width: 100%; align-items: center; gap: 9px; padding: 11px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--admin-mobile-muted); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
|
|
|
|
|
|
.settings-nav__item:hover, .settings-nav__item.is-active { background: var(--admin-mobile-accent-soft); color: var(--theme-primary-action); font-weight: 700; }
|
|
|
|
|
|
.settings-nav__icon { display: inline-flex; width: 22px; justify-content: center; color: var(--theme-primary); }
|
|
|
|
|
|
.settings-nav__hint { margin: 13px 8px 5px; padding-top: 12px; border-top: 1px solid var(--admin-mobile-border); color: var(--admin-mobile-muted); font-size: 11px; line-height: 1.55; }
|
|
|
|
|
|
.settings-pane, .settings-section-panel { min-width: 0; }
|
|
|
|
|
|
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 2px 0 14px; border-bottom: 1px solid var(--admin-mobile-border); }
|
|
|
|
|
|
.pane-head h2 { margin: 0 0 5px; font-size: 18px; }
|
|
|
|
|
|
.setting-group { margin-top: 17px; border-top: 1px solid var(--admin-mobile-border); }
|
|
|
|
|
|
.setting-group__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 13px 2px 8px; }
|
|
|
|
|
|
.setting-group__head--with-action { align-items: center; }
|
|
|
|
|
|
.setting-group__head--with-action .ant-btn { margin-left: auto; }
|
|
|
|
|
|
.setting-group__head strong { font-size: 13px; }
|
|
|
|
|
|
.setting-group__head span { color: var(--admin-mobile-muted); font-size: 11px; letter-spacing: .08em; }
|
|
|
|
|
|
.setting-row { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(220px, 1.35fr) auto; align-items: center; gap: 18px; min-height: 72px; padding: 10px 14px; border-bottom: 1px solid color-mix(in srgb, var(--admin-mobile-border) 70%, transparent); background: color-mix(in srgb, var(--theme-card-bg) 82%, transparent); }
|
|
|
|
|
|
.setting-row:first-of-type { border-radius: 10px 10px 0 0; }
|
|
|
|
|
|
.setting-row--last { border-radius: 0 0 10px 10px; }
|
|
|
|
|
|
.setting-copy { display: grid; gap: 4px; min-width: 0; }
|
|
|
|
|
|
.setting-copy strong { font-size: 13px; }
|
2026-10-26 22:11:03 +08:00
|
|
|
|
.setting-copy__link { display: inline-flex; align-items: center; gap: 3px; margin-left: 7px; color: var(--theme-primary-action); font-size: 11px; font-weight: 650; text-decoration: none; white-space: nowrap; }
|
|
|
|
|
|
.setting-copy__link:hover { text-decoration: underline; }
|
|
|
|
|
|
.setting-copy__link:focus-visible { outline: 2px solid color-mix(in srgb, var(--theme-primary) 55%, transparent); outline-offset: 2px; border-radius: 3px; }
|
|
|
|
|
|
.setting-copy__link :deep(.anticon) { font-size: 10px; }
|
2026-10-25 20:34:15 +08:00
|
|
|
|
.setting-copy span { color: var(--admin-mobile-muted); font-size: 11px; line-height: 1.45; }
|
|
|
|
|
|
.setting-control { display: flex; align-items: center; gap: 9px; min-width: 0; }
|
|
|
|
|
|
.setting-control > :deep(.ant-select) { width: 100%; }
|
|
|
|
|
|
.setting-control--password > :deep(.ant-input-affix-wrapper) { flex: 1; width: auto; min-width: 100px; }
|
|
|
|
|
|
.setting-control--password { min-width: 0; }
|
2026-10-30 17:08:00 +08:00
|
|
|
|
.setting-control--joined { min-width: 0; }
|
|
|
|
|
|
.setting-control--joined > :deep(.ant-input) { flex: 1; min-width: 0; }
|
|
|
|
|
|
.setting-control--joined > :deep(.ant-btn) { flex: 0 0 auto; }
|
2026-10-26 21:12:50 +08:00
|
|
|
|
.setting-control--number { width: min(220px, 100%); }
|
2026-10-25 20:34:15 +08:00
|
|
|
|
.control-note { color: var(--admin-mobile-muted); font-size: 11px; white-space: nowrap; }
|
|
|
|
|
|
.setting-row > .control-note { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
|
|
|
|
|
|
.setting-value { min-width: 0; color: var(--admin-mobile-ink); font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
|
|
|
|
.status-pill { display: inline-flex; align-items: center; gap: 5px; color: var(--theme-primary-action); font-size: 11px; white-space: nowrap; }
|
|
|
|
|
|
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--theme-primary); }
|
|
|
|
|
|
.status-pill.is-muted { color: var(--admin-mobile-muted); }
|
|
|
|
|
|
.status-pill.is-muted::before { background: var(--admin-mobile-muted); }
|
|
|
|
|
|
.warning-note { display: inline-flex; align-items: center; gap: 5px; color: #a66d22; font-size: 11px; white-space: nowrap; }
|
|
|
|
|
|
.warning-note::before { content: '!'; display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; border-radius: 50%; background: #fff3d9; font-size: 10px; font-weight: 800; }
|
2026-10-30 17:08:00 +08:00
|
|
|
|
.secure-note { margin: 0; padding: 12px 14px; color: var(--admin-mobile-muted); font-size: 12px; line-height: 1.65; background: color-mix(in srgb, var(--theme-primary) 7%, var(--theme-card-bg)); }
|
|
|
|
|
|
.secure-note__warning { display: block; margin-top: 6px; color: #8a4b0d; font-weight: 650; }
|
|
|
|
|
|
.secure-guide { margin: 0 12px 12px; padding: 14px 16px; background: color-mix(in srgb, var(--admin-mobile-accent-soft) 55%, var(--theme-card-bg)); color: var(--admin-mobile-ink); font-size: 12px; line-height: 1.65; }
|
|
|
|
|
|
.secure-guide > strong { font-size: 13px; }
|
|
|
|
|
|
.secure-guide ol { margin: 8px 0 10px; padding-left: 19px; color: var(--admin-mobile-muted); }
|
|
|
|
|
|
.secure-guide li + li { margin-top: 4px; }
|
|
|
|
|
|
.secure-guide__links { display: flex; flex-wrap: wrap; gap: 14px; }
|
|
|
|
|
|
.secure-guide__links a { display: inline-flex; align-items: center; gap: 5px; color: var(--theme-primary-action); text-decoration: none; }
|
|
|
|
|
|
.secure-guide__links a:hover { text-decoration: underline; }
|
|
|
|
|
|
.secure-guide__links a:focus-visible { outline: 2px solid color-mix(in srgb, var(--theme-primary) 55%, transparent); outline-offset: 2px; }
|
2026-10-25 20:34:15 +08:00
|
|
|
|
.section-footnote { margin: 12px 2px 0; color: var(--admin-mobile-muted); font-size: 11px; }
|
|
|
|
|
|
@media (max-width: 760px) {
|
|
|
|
|
|
.settings-header { align-items: flex-start; }
|
|
|
|
|
|
.settings-health, .account-status { display: none; }
|
|
|
|
|
|
.settings-layout { grid-template-columns: 1fr; gap: 14px; }
|
|
|
|
|
|
.settings-nav { display: flex; gap: 4px; overflow-x: auto; padding: 6px; }
|
|
|
|
|
|
.settings-nav__label, .settings-nav__hint { display: none; }
|
|
|
|
|
|
.settings-nav__item { width: auto; flex: 0 0 auto; white-space: nowrap; }
|
|
|
|
|
|
.pane-head { align-items: flex-start; flex-direction: column; }
|
|
|
|
|
|
.pane-head .ant-btn { width: 100%; }
|
|
|
|
|
|
.setting-group__head--with-action { flex-wrap: wrap; }
|
|
|
|
|
|
.setting-group__head--with-action .ant-btn { width: 100%; margin-left: 0; }
|
|
|
|
|
|
.setting-row { grid-template-columns: 1fr; gap: 9px; padding: 13px 12px; }
|
|
|
|
|
|
.setting-control { width: 100%; }
|
|
|
|
|
|
.status-pill, .warning-note, .control-note { justify-self: start; }
|
2026-09-05 23:46:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
</style>
|