Skip to content

Commit 3d597a6

Browse files
committed
增加更多guide分章节
1 parent 2f96e53 commit 3d597a6

File tree

5 files changed

+89
-44
lines changed

5 files changed

+89
-44
lines changed

docs/.vitepress/theme/constrants/route.ts

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// todo: 增加sidebar的层次感
2+
13
export type ChapterItem = {
24
// 标题
35
text: string;
@@ -19,7 +21,9 @@ export enum Chapters {
1921
// guide
2022
xrobot_guide = "/xrobot/guide",
2123
xrobot_guide_mp = "/xrobot/guide/mini-program",
22-
xrobot_guide_device = "/xrobot/device/",
24+
xrobot_guide_device = "/xrobot/device/", // todo: 调整device位置
25+
xrobot_guide_console = "/xrobot/guide/console",
26+
xrobot_guide_net_config = "/xrobot/guide/net-config",
2327
// api
2428
xrobot_api = "/xrobot/api/",
2529
xrobot_api_server = "/xrobot/api/server/",
@@ -126,12 +130,39 @@ export const items_xrobot_guide_device = [
126130
},
127131
];
128132

133+
const items_xrobot_guide_console = [
134+
{
135+
text: "控制台(智控台)",
136+
link: Chapters.xrobot_guide_console,
137+
collapsed: true,
138+
items: [{ text: "设备绑定", link: "" }].map((item) =>
139+
apply_prefix(item, Chapters.xrobot_guide_console)
140+
),
141+
},
142+
];
143+
144+
const items_xrobot_guide_net_config = [
145+
{
146+
text: "配网",
147+
link: Chapters.xrobot_guide_net_config,
148+
collapsed: true,
149+
items: [{ text: "通过微信小程序", link: "mp" }].map((item) =>
150+
apply_prefix(item, Chapters.xrobot_guide_net_config)
151+
),
152+
},
153+
];
154+
129155
export const items_xrobot_guide = [
130156
{
131157
text: "厂商接入指南",
132158
link: Chapters.xrobot_guide,
133159
collapsed: false,
134-
items: [...items_xrobot_guide_mp, ...items_xrobot_guide_device],
160+
items: [
161+
...items_xrobot_guide_mp,
162+
...items_xrobot_guide_device,
163+
...items_xrobot_guide_console,
164+
...items_xrobot_guide_net_config,
165+
],
135166
},
136167
];
137168

@@ -213,6 +244,14 @@ export const ChapterItems: Record<Chapters, ChapterItem[]> = {
213244
gobackItem(Chapters.xrobot_guide),
214245
...items_xrobot_guide_device,
215246
],
247+
[Chapters.xrobot_guide_console]: [
248+
gobackItem(Chapters.xrobot_guide),
249+
...items_xrobot_guide_console,
250+
],
251+
[Chapters.xrobot_guide_net_config]: [
252+
gobackItem(Chapters.xrobot_guide),
253+
...items_xrobot_guide_net_config,
254+
],
216255
// platform
217256
[Chapters.xrobot_platform]: [
218257
gobackItem(Chapters.xrobot),

docs/xrobot/guide/console/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<script setup>
2+
import { Chapters } from "../../../.vitepress/theme/constrants/route";
3+
4+
const chapter_root = Chapters.xrobot_guide_console;
5+
</script>
6+
7+
<ChapterContents :chapter=chapter_root />

docs/xrobot/guide/mini-program/device-net-config.md

Lines changed: 22 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -7,77 +7,57 @@ title: 设备配网
77
在设备管理页面中,点击绑定设备后,再点击去配网按钮即可进入配网页面。可根据设备支持的配网类型选择 WiFi 配网或蓝牙配网。
88

99
| ![image-20250804164601162](./imgs/device-net-config/image-20250804164601162.png) | ![image-20250804164608303](./imgs/device-net-config/image-20250804164608303.png) |
10-
| ------------------------------------------------------------ | ------------------------------------------------------------ |
11-
12-
10+
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
1311

1412
## 2. WIFI 配网
1513

1614
### 2.1. IOS/苹果设备
1715

1816
1. 搜寻设备热点,在 IOS 「设置->无线局域网」 页面搜寻到设备热点后返回小程序继续操作。
19-
17+
2018
| ![image-20250804164747289](./imgs/device-net-config/image-20250804164747289.png) | ![image-20250804164755627](./imgs/device-net-config/image-20250804164755627.png) | ![image-20250804164801760](./imgs/device-net-config/image-20250804164801760.png) |
21-
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
22-
23-
24-
19+
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
20+
2521
2. 连接设备热点。
26-
22+
2723
| ![image-20250804164811543](./imgs/device-net-config/image-20250804164811543.png) | ![image-20250804164819114](./imgs/device-net-config/image-20250804164819114.png) |
28-
| ------------------------------------------------------------ | ------------------------------------------------------------ |
24+
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
2925

30-
31-
3226
3. 配置 wifi。
33-
27+
3428
| ![image-20250804164828470](./imgs/device-net-config/image-20250804164828470.png) | ![image-20250804164834423](./imgs/device-net-config/image-20250804164834423.png) | ![image-20250804164840542](./imgs/device-net-config/image-20250804164840542.png) |
35-
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
36-
37-
29+
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
3830

3931
### 2.2 安卓设备
4032

4133
1. 搜寻设备热点,并连接。
42-
34+
4335
| ![image-20250804164850167](./imgs/device-net-config/image-20250804164850167.png) | ![image-20250804164858013](./imgs/device-net-config/image-20250804164858013.png) | ![image-20250804164902875](./imgs/device-net-config/image-20250804164902875.png) |
44-
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
36+
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
4537

46-
47-
4838
2. 配置 wifi。
49-
39+
5040
| ![image-20250804164933033](./imgs/device-net-config/image-20250804164933033.png) | ![image-20250804164939227](./imgs/device-net-config/image-20250804164939227.png) | ![image-20250804164946083](./imgs/device-net-config/image-20250804164946083.png) |
51-
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
52-
53-
41+
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
5442

5543
### 2.3 蓝牙配网
5644

5745
1. 进入蓝牙配网页面后,点击开始扫描设备,如果系统弹窗提示需获取蓝牙权限,点击允许,即可扫描蓝牙设备。请确保手机蓝牙已打开。
58-
46+
5947
| ![image-20250804164955798](./imgs/device-net-config/image-20250804164955798.png) | ![image-20250804165005103](./imgs/device-net-config/image-20250804165005103.png) | ![image-20250804165014097](./imgs/device-net-config/image-20250804165014097.png) |
60-
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
48+
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
6149

62-
63-
6450
2. 扫描到蓝牙设备后,选择相应的蓝牙设备卡片,点击连接设备按钮。
65-
51+
6652
| ![image-20250804165023508](./imgs/device-net-config/image-20250804165023508.png) | ![image-20250804165029247](./imgs/device-net-config/image-20250804165029247.png) |
67-
| ------------------------------------------------------------ | ------------------------------------------------------------ |
68-
69-
70-
53+
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
54+
7155
3. 等待扫描到 WIFI 列表后,选择想要连接的 WiFi。
72-
56+
7357
| ![image-20250804165038208](./imgs/device-net-config/image-20250804165038208.png) | ![image-20250804165044596](./imgs/device-net-config/image-20250804165044596.png) |
74-
| ------------------------------------------------------------ | ------------------------------------------------------------ |
75-
76-
77-
58+
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
59+
7860
4. 输入 WiFi 密码后,点击开始配网按钮后,等待设备配网成功。
79-
61+
8062
| ![image-20250804165052520](./imgs/device-net-config/image-20250804165052520.png) | ![image-20250804165059545](./imgs/device-net-config/image-20250804165059545.png) |
81-
| ------------------------------------------------------------ | ------------------------------------------------------------ |
82-
83-
63+
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<script setup>
2+
import { Chapters } from "../../../.vitepress/theme/constrants/route";
3+
4+
const chapter_root = Chapters.xrobot_guide_net_config;
5+
</script>
6+
7+
<ChapterContents :chapter=chapter_root />

docs/xrobot/guide/net-config/mp.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: "通过微信小程序"
3+
---
4+
5+
<script setup>
6+
import { Chapters, ChapterItems } from "../../../.vitepress/theme/constrants/route";
7+
8+
const chapter_root = Chapters.xrobot_guide_mp;
9+
const mp_net_config_link = ChapterItems[chapter_root][1].items.filter(item => item.link.endsWith("net-config"))[0].link;
10+
</script>
11+
12+
参考 <a :href="mp_net_config_link">微信小程序-设备配网</a>

0 commit comments

Comments
 (0)