feat: 商城使用文档跳转 https://auth.88531.cn/#/docs

This commit is contained in:
root committed 2026-10-13 11:12:41 +08:00
1 parent e465012973
commit c98f761275
1 file changed
+11 -2
+11 -2
View File
@@ -43,7 +43,7 @@
ref="navTabRefs"
class="nav-tab"
:class="{ active: activeTab === tab.key }"
@click="activeTab = tab.key"
@click="onNavTabClick(tab.key)"
type="button"
>
<component :is="tab.icon" class="tab-icon" />
@@ -270,7 +270,7 @@
</div>
<div class="docs-card docs-card-wide">
<div class="docs-card-head"><IconDoc /><span>开发者对接(API)— 详细文档详见 <a href="#/docs" style="color:#6758e8">系统介绍页</a></span></div>
<div class="docs-card-head"><IconDoc /><span>开发者对接(API)— 详细文档见 <a :href="DOCS_URL" target="_blank" rel="noopener" style="color:#6758e8">系统介绍页</a></span></div>
<p>统一响应 <code>{"code":200,"message":"…","data":{…}}</code>;公开接口无需认证,机器码验证需请求头 <code>X-Api-Key: 项目APIKey</code>(「项目管理」中获取)。</p>
<div class="docs-code">
<div class="docs-code-title">POST /api/public/verify 机器码授权验证</div>
@@ -577,6 +577,7 @@ const CheckIcon = () => h('svg', { viewBox: '0 0 16 16', width: 14, height: 14,
])
/* ===== 导航 ===== */
const DOCS_URL = 'https://auth.88531.cn/#/docs'
const activeTab = ref('buy')
const tabs = [
{ key: 'buy', label: '购买授权', icon: IconBuy },
@@ -584,6 +585,14 @@ const tabs = [
{ key: 'query', label: '授权查询', icon: IconQuery },
{ key: 'docs', label: '使用文档', icon: IconDoc },
]
function onNavTabClick(key) {
if (key === 'docs') {
window.open(DOCS_URL, '_blank', 'noopener')
return
}
activeTab.value = key
}
const navTabsRef = ref(null)
const navTabRefs = ref([])
const navSliderStyle = ref({ width: '0px', transform: 'translateX(0px)', opacity: 0 })