chore: 初始开源发布

This commit is contained in:
MiFaZhan
2026-10-22 15:16:43 +08:00
commit 92f239fcc4
114 changed files with 8018 additions and 0 deletions
+122
View File
@@ -0,0 +1,122 @@
import { defineConfig } from 'vitepress'
const webManualItems = [
{ text: '快速开始', link: '/manual/web/' },
{ text: '首页与通用操作', link: '/manual/web/home' },
{ text: '卡信息', link: '/manual/web/card-info' },
{ text: '智能诊断', link: '/manual/web/intelligent-diagnosis' },
{ text: '业务受理与达量断网', link: '/manual/web/business-operations' },
{ text: '企业、用户与角色', link: '/manual/web/enterprise-management' },
{ text: '工单管理', link: '/manual/web/work-orders' },
{ text: 'API 凭证与执行日志', link: '/manual/web/api-and-logs' },
{ text: '常见问题', link: '/manual/web/faq' },
]
const miniProgramManualItems = [
{ text: '快速开始', link: '/manual/mini-program/' },
{ text: '首页公开查卡', link: '/manual/mini-program/home' },
{ text: '公开卡片详情', link: '/manual/mini-program/devices' },
{ text: '卡片排查', link: '/manual/mini-program/diagnosis' },
{ text: '常见问题', link: '/manual/mini-program/faq' },
]
function manualSidebar(_active: 'web' | 'mini' | 'both' = 'both') {
return [
{
text: 'Web端',
collapsed: false,
items: webManualItems,
},
{
text: '小程序端',
collapsed: false,
items: miniProgramManualItems,
},
]
}
export default defineConfig({
srcDir: './docs',
base: '/docs/',
title: 'iotLCM',
description: 'iotLCM documentation center',
lang: 'zh-CN',
cleanUrls: true,
lastUpdated: false,
head: [
['link', { rel: 'icon', type: 'image/png', href: '/docs/favicon.png' }]
],
vite: {
plugins: [
{
name: 'serve-root-favicon-in-dev',
configureServer(server) {
server.middlewares.use('/favicon.ico', (_request, response) => {
response.writeHead(302, { Location: '/docs/favicon.png' })
response.end()
})
}
}
]
},
themeConfig: {
logo: undefined,
nav: [
{ text: '文档首页', link: '/' },
{ text: '使用手册', link: '/manual/' },
{ text: 'OpenAPI', link: '/openapi/' },
{ text: '共享 Token 接口', link: '/openapi/operator/shared-token/' }
],
sidebar: {
'/manual/': manualSidebar(),
'/manual/web/': manualSidebar('web'),
'/manual/mini-program/': manualSidebar('mini'),
'/openapi/operator/': [
{
text: '共享 Token 接口',
collapsed: false,
items: [
{ text: '概览', link: '/openapi/operator/' },
{ text: '共享 Token 接口', link: '/openapi/operator/shared-token/' },
{ text: '白名单转发', link: '/openapi/operator/mobile-v5/' },
]
},
],
'/openapi/': [
{
text: 'V3 接口',
collapsed: false,
items: [
{ text: '概览与鉴权', link: '/openapi/v3/' },
{ text: '获取调用凭证', link: '/openapi/v3/token' },
{ text: '查询类', link: '/openapi/v3/query' },
{ text: '业务类', link: '/openapi/v3/common' },
]
},
{
text: '旧版兼容接口',
collapsed: false,
items: [
{ text: '概览与鉴权', link: '/openapi/legacy/' },
{ text: '查询类', link: '/openapi/legacy/query' },
]
},
]
},
outline: {
level: [2, 3],
label: '本页目录'
},
docFooter: {
prev: '上一页',
next: '下一页'
},
search: {
provider: 'local'
},
footer: {
message: 'iotLCM 文档中心',
copyright: ''
}
}
})