Skip to content

Commit 5883f9d

Browse files
committed
update
1 parent b5e9377 commit 5883f9d

File tree

2 files changed

+101
-12
lines changed

2 files changed

+101
-12
lines changed

docs/.vitepress/config.mts

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,17 @@ export default defineConfig({
3838
{ text: '🔒 高级设置', link: '/settings/advanced' },
3939
{ text: '🔌 插件管理', link: '/settings/plugins' },
4040
{ text: '🔗 URL协议', link: '/settings/url' }
41-
]
41+
]
42+
},
43+
{ text: '🆘 支持与资源',
44+
items: [
45+
{ text: '🛠️ 故障排除', link: '/trouble' },
46+
{ text: '👥 团队', link: '/team' },
47+
{ text: '📥 下载', link: '/download' },
48+
{ text: '📋 版本历史', link: '/changelog' },
49+
{ text: '💲 捐赠', link: '/donate' }
50+
]
4251
},
43-
{ text: '🛠️ 故障排除', link: '/trouble' },
44-
{ text: '👥 团队', link: '/team' },
45-
{ text: '📥 下载', link: '/download' },
46-
{ text: '📋 版本历史', link: '/changelog' },
47-
{ text: '💲 捐赠', link: '/donate' },
4852
{ text: '🔗 Hub', link: 'https://sectl-hub.netlify.app/' }
4953
],
5054

@@ -75,13 +79,17 @@ export default defineConfig({
7579
{ text: '🔒 高级设置', link: '/settings/advanced' },
7680
{ text: '🔌 插件管理', link: '/settings/plugins' },
7781
{ text: '🔗 URL协议', link: '/settings/url' }
78-
]
82+
]
83+
},
84+
{ text: '🆘 支持与资源',
85+
items: [
86+
{ text: '🛠️ 故障排除', link: '/trouble' },
87+
{ text: '👥 团队', link: '/team' },
88+
{ text: '📥 下载', link: '/download' },
89+
{ text: '📋 版本历史', link: '/changelog' },
90+
{ text: '💲 捐赠', link: '/donate' }
91+
]
7992
},
80-
{ text: '🛠️ 故障排除', link: '/trouble' },
81-
{ text: '👥 团队', link: '/team' },
82-
{ text: '📥 下载', link: '/download' },
83-
{ text: '📋 版本历史', link: '/changelog' },
84-
{ text: '💲 捐赠', link: '/donate' },
8593
{ text: '🔗 Hub', link: 'https://sectl-hub.netlify.app/' }
8694
],
8795

docs/settings/url.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,19 @@
9999

100100
</div>
101101

102+
### 8. 闪抽界面
103+
<div class="config-card">
104+
105+
- **URL**: `secrandom://direct_extraction`
106+
- **功能**: 打开闪抽界面,快速进行抽取操作,并会在设定的时间后自动关闭。(关闭时间可在设置中进行调整)
107+
108+
**使用场景**
109+
- 需要快速完成单次抽取操作
110+
- 课堂或会议中进行快速随机选择
111+
- 活动中需要短时间内完成抽取并自动结束
112+
113+
</div>
114+
102115
## 带Action参数的URL
103116

104117
### 抽人相关操作
@@ -183,6 +196,21 @@ start secrandom://reward?action=stop
183196

184197
</div>
185198

199+
### 闪抽相关操作
200+
<div class="config-card highlight">
201+
202+
#### 使用闪抽
203+
- **URL**: `secrandom://direct_extraction`
204+
- **功能**: 自动切换到闪抽界面并开始抽取操作,当到达设定时间会自动关闭。
205+
206+
**使用示例**
207+
```batch
208+
# 批处理文件示例
209+
start secrandom://direct_extraction
210+
```
211+
212+
</div>
213+
186214
## 💡 URL协议使用指南
187215

188216
<div class="tip-box">
@@ -260,6 +288,10 @@ class SecRandomController:
260288
"""打开设置界面"""
261289
os.system(f"start {self.base_url}settings")
262290

291+
def open_direct_extraction(self):
292+
"""使用闪抽"""
293+
os.system(f"start {self.base_url}direct_extraction")
294+
263295
# 使用示例
264296
controller = SecRandomController()
265297
controller.open_main()
@@ -300,6 +332,16 @@ class SecRandomController {
300332
});
301333
});
302334
}
335+
336+
async openDirectExtraction() {
337+
// 使用闪抽
338+
return new Promise((resolve, reject) => {
339+
exec(`start ${this.baseUrl}direct_extraction`, (error) => {
340+
if (error) reject(error);
341+
else resolve();
342+
});
343+
});
344+
}
303345
}
304346

305347
// 使用示例
@@ -351,6 +393,16 @@ class SecRandomController
351393
UseShellExecute = true
352394
});
353395
}
396+
397+
public void OpenDirectExtraction()
398+
{
399+
// 使用闪抽
400+
Process.Start(new ProcessStartInfo
401+
{
402+
FileName = BaseUrl + "direct_extraction",
403+
UseShellExecute = true
404+
});
405+
}
354406
}
355407

356408
// 使用示例
@@ -389,6 +441,23 @@ class SecRandomController {
389441
e.printStackTrace();
390442
}
391443
}
444+
445+
public void openSettings() {
446+
try {
447+
Desktop.getDesktop().browse(new URI(BASE_URL + "settings"));
448+
} catch (Exception e) {
449+
e.printStackTrace();
450+
}
451+
}
452+
453+
public void openDirectExtraction() {
454+
// 使用闪抽
455+
try {
456+
Desktop.getDesktop().browse(new URI(BASE_URL + "direct_extraction"));
457+
} catch (Exception e) {
458+
e.printStackTrace();
459+
}
460+
}
392461
}
393462

394463
// 使用示例
@@ -498,6 +567,11 @@ timeout /t 2 >nul
498567
499568
echo 5. 打开设置界面
500569
start secrandom://settings
570+
timeout /t 2 >nul
571+
572+
echo 6. 使用闪抽
573+
start secrandom://direct_extraction
574+
timeout /t 2 >nul
501575
502576
echo 演示完成!
503577
pause
@@ -526,6 +600,7 @@ function Invoke-SecRandom {
526600
Invoke-SecRandom -Action "main"
527601
Invoke-SecRandom -Action "pumping" -Parameters "action=start"
528602
Invoke-SecRandom -Action "settings"
603+
Invoke-SecRandom -Action "direct_extraction"
529604
```
530605

531606
#### Web 应用集成
@@ -534,6 +609,7 @@ Invoke-SecRandom -Action "settings"
534609
<button onclick="openSecRandom('main')">打开SecRandom</button>
535610
<button onclick="startPumping()">开始抽人</button>
536611
<button onclick="stopPumping()">停止抽人</button>
612+
<button onclick="openDirectExtraction()">使用闪抽</button>
537613

538614
<script>
539615
function openSecRandom(action, params = '') {
@@ -548,6 +624,11 @@ function startPumping() {
548624
function stopPumping() {
549625
openSecRandom('pumping', 'action=stop');
550626
}
627+
628+
function openDirectExtraction() {
629+
// 使用闪抽
630+
openSecRandom('direct_extraction');
631+
}
551632
</script>
552633
```
553634

0 commit comments

Comments
 (0)