rollcall-classroom-assets 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/mk-app.js CHANGED
@@ -40,7 +40,7 @@
40
40
  // 第一版这里跳 /login?next=… 直接把老师送进 404「无法使用」。会话过期只说清楚,让人点回去。
41
41
  if (r.status === 401) {
42
42
  document.body.innerHTML = '<div style="padding:26px;font-family:sans-serif;font-size:15px">登录已过期(或这个域名还没登录过)。' +
43
- '<a href="/mk">回到登录页</a> <span style="color:#888;font-size:12.5px">注:zy.19860103.xyz 与裸域 19860103.xyz 的登录是分开的(cookie 不跨主机)。</span></div>';
43
+ '<a href="' + (location.pathname || '/ks') + '">回到登录页</a> <span style="color:#888;font-size:12.5px">注:zy.19860103.xyz 与裸域 19860103.xyz 的登录是分开的(cookie 不跨主机)。</span></div>';
44
44
  throw new Error('未登录');
45
45
  }
46
46
  return { status: r.status, j: j || {} };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rollcall-classroom-assets",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "Static assets for the classroom workbench (roll-call): app JS, pinyin/xlsx/zxing engines and icons. Published only so they can be served from a China-friendly CDN.",
5
5
  "keywords": [
6
6
  "assets",
package/zuoye-app.js CHANGED
@@ -8372,6 +8372,12 @@ if (isMobileView() && !isRepOnlyMe()) {
8372
8372
  document.addEventListener('keydown', (e) => { if (e.key === 'Escape') gearMenu.style.display = 'none'; });
8373
8373
  // 🎲 点名器:齿轮右侧的悬浮钮 + 菜单内入口,都走统一出口(离开前先把待上传数据落库)
8374
8374
  if ($('dmBtn')) $('dmBtn').addEventListener('click', (e) => { e.preventDefault(); gotoDm($('dmBtn')); });
8375
+ // 📇 读卡(答题卡判分):同一个出口,理由和「🎲 点名器」一模一样 —— 离开前先把待上传的
8376
+ // 扫描记录落库(leaveTo 里那句 flushScanSaves)。直接走 href 的话,攒在队列里那几张
8377
+ // 要等页面 unload 之后才知道传没传上,弱网下就是「扫了却没分数」。
8378
+ // HTML 里 href="/ks" 留着:JS 挂了它仍然是个能点的普通链接。
8379
+ // 地址口径(2026-10-14):读卡 = /ks(/mk 是同一个页面的老写法,仍然能用)。
8380
+ if ($('mkBtn')) $('mkBtn').addEventListener('click', (e) => { e.preventDefault(); leaveTo('/ks', $('mkBtn')); });
8375
8381
  // 👥 账号管理:仅 admin 可见
8376
8382
  if (uAdminBtn) uAdminBtn.addEventListener('click', () => { window.open('/admin', '_blank'); });
8377
8383
  // ⚙️ 我的设置:任教班级 / 点中率在点名页设置里(本页无此弹窗)→ 带参数直达