chore(release): 客户端班级账号收尾 + README/安装包产物更新
- 客户端设置页展示班级码与登录方式(班级账号 / 个人学生账号)
- 冒烟脚本复用已有班级凭据(现成的班级码 + 密码可直接登录时不再改密码,避免污染实例)
- README: 学生端班级账号章节、功能页面/API/验收/命令计数(verify:e2e 125)同步
- 安装包 README 默认账号补充班级码 G101/G102/G203 + 班级密码 123456
验收: pnpm verify:e2e 125/125, verify:web 18/18, verify:desktop 40/40,
打包产物实测(portable.exe): 40/40, login=高一(1)班 classSession=true
This commit is contained in:
1 parent
1073436ad6
commit
d11f8e43a1
3 files changed
+27
-11
No files matched your search
@@ -84,6 +84,17 @@ async function provisionClassAccount() {
|
||||
if (!target) return null;
|
||||
|
||||
const code = target.code || `SMOKE${Math.floor(Math.random() * 9000 + 1000)}`;
|
||||
|
||||
// 若现有班级码 + 目标密码已经能登录,就直接复用,避免每次冒烟都改密码
|
||||
if (target.code) {
|
||||
const probe = await fetch(`${base}/auth/class-login`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ code: target.code, password }),
|
||||
});
|
||||
if (probe.ok) return { code: target.code, password, className: target.name };
|
||||
}
|
||||
|
||||
const patchResponse = await fetch(`${base}/classes/${target.id}/class-account`, {
|
||||
method: 'PATCH',
|
||||
headers: authHeaders,
|
||||
|
||||
Reference in new issue
Block a user