Commit Graph

98 Commits

Author SHA1 Message Date
weli fb7d15e6a1 fix: read course_id from route for course section list
WeChat webview can desync route query from route props; use useRoute for course_id and log API failures to console. Watch course_id to refetch when query changes.

Made-with: Cursor
2026-04-28 00:25:38 +08:00
weli 4f67165d59 fix: normalize course section resources to array
Sanitize course section resources payloads across list and id queries to avoid runtime filter/some failures from malformed resource shapes, with CourseSectionResourceDebug diagnostics.

Made-with: Cursor
2026-04-28 00:21:24 +08:00
weli 8977f13a05 fix: guard course section pagination payload shape
Normalize paged and list responses for course section APIs to prevent runtime errors on infinite scroll and emit CourseSectionPayloadDebug diagnostics for malformed payloads.

Made-with: Cursor
2026-04-28 00:19:23 +08:00
weli 7d4dd382b4 fix: guard clazz list payload shape with debug logs
Prevent runtime filter crashes in /clazz by normalizing API payloads to arrays and emitting ClazzPayloadDebug diagnostics when response shape is unexpected.

Made-with: Cursor
2026-04-28 00:17:02 +08:00
weli 98c0bfd195 refactor: rename clazz UI label to 排课
Use 排课 for /clazz tab and page titles to avoid confusion with teaching-domain 课程 terminology.

Made-with: Cursor
2026-04-28 00:15:33 +08:00
weli 543cab9ea7 fix: guard course list shape before filtering
Normalize find_all_courses response to an array and add page-level array fallback to prevent filter runtime errors when response payload is malformed.

Made-with: Cursor
2026-04-28 00:12:09 +08:00
weli 9f2ba95b1f fix: read org context from jwt sub claim payload
Parse current_org_id/current_org_role_keys from subject payload when tokens are encoded under claims.sub, so org switch context is correctly detected.

Made-with: Cursor
2026-04-28 00:05:49 +08:00
weli e15b68b16f chore(debug): add detailed org switch token diagnostics
Record before/after jwt org context decode details for org switch into console and localStorage, and surface actionable debug dialog when returned token lacks org context.

Made-with: Cursor
2026-04-28 00:03:00 +08:00
weli 713af27749 fix: harden org switch token validation and exit org page
Validate current_org_id from switch token before accepting it, align auth/sudo tokens, and force full navigation to home after switch to avoid staying on org-select state.

Made-with: Cursor
2026-04-27 23:59:56 +08:00
weli da9c365fc0 fix: avoid blocking org switch on full user refresh
After org switch, sync sudo token and navigate to home immediately instead of awaiting read() chain, preventing org select page from stalling.

Made-with: Cursor
2026-04-27 23:57:51 +08:00
weli d1caecd9e0 fix: decode org context from jwt payload robustly
Add base64 padding before atob when parsing token payload so current_org_id extraction no longer fails intermittently and loops users back to org select.

Made-with: Cursor
2026-04-27 23:55:24 +08:00
weli eb7c8e8831 fix: keep org context when refreshing user session
Avoid overwriting switched auth context with sudo2 token in read(); reuse Authorization as sudo token when current_org_id already exists.

Made-with: Cursor
2026-04-27 23:42:20 +08:00
weli 29262d67ec fix: align sudo token with switched auth org context
After org switch, set HtySudoerToken to the refreshed Authorization token so ws endpoints receive current_org_id instead of a sudo2 token without org context.

Made-with: Cursor
2026-04-27 23:40:16 +08:00
weli be5c4fa046 fix: refresh sudo token after org switch
Regenerate HtySudoerToken after switching organization so ws endpoints that read org context from sudo token no longer fail with current_org_id required.

Made-with: Cursor
2026-04-27 23:36:44 +08:00
weli 79a69719b1 fix: auto bootstrap org context outside index route
Ensure authenticated users without current_org_id are redirected or auto-switched before entering business routes, preventing global 500 errors after multi-organization rollout.

Made-with: Cursor
2026-04-27 23:32:48 +08:00
weli 0ea90bd282 feat(front): render organization homepage on role home pages
Show current organization homepage text on student and teacher home pages and provide fallback guidance when org is not selected.

Made-with: Cursor
2026-04-27 22:35:37 +08:00
weli 77f90b1948 fix(front): route legacy jihua notifications to daka pages
Avoid dead links after jihua route cleanup by redirecting related notification actions to daka flows with safe fallback behavior.

Made-with: Cursor
2026-04-27 22:06:33 +08:00
weli 02f39ddaf6 feat(front): add org context UI and role scoping
Introduce organization selection/homepage flows, show current organization on profile pages, and scope displayed roles to the active organization context while preserving system-wide behavior.

Made-with: Cursor
2026-04-27 21:52:26 +08:00
weli 80459e2b60 front: recover watermark url from DONE tasks or resubmit when missing result
Made-with: Cursor
2026-04-27 16:46:39 +08:00
weli 968ed4ab09 front: refresh ref_resource before reporting watermark transcoding
Made-with: Cursor
2026-04-27 10:53:05 +08:00
weli f5ad926bf9 front: prevent download freeze on watermark completed tasks
Made-with: Cursor
2026-04-27 10:48:42 +08:00
weli 75e712aa21 front: download watermark URL from vals before TS-only branch
Made-with: Cursor
2026-04-27 08:17:41 +08:00
weli 7955cde30e front: canonical watermarked_video_url for WATERMARK task_result
Made-with: Cursor
2026-04-27 08:13:27 +08:00
weli 7015337d94 migrate TS API calls from /api/v1/ts/ to /api/v2/ts/ 2026-04-26 22:19:27 +08:00
weli b5be88c073 fix: show actual createTask error reason in toast 2026-04-26 22:16:50 +08:00
weli 549738c4a1 fix(front): 练习/课程视频上传后创建 VIDEO_COMPRESSION 任务
上传又拍云并 create_hty_resource 成功后调用 TS create_task,
把任务写入 ref_resource.tasks,供 htyproc 处理与 ref-resource 轮询。

Made-with: Cursor
2026-04-26 22:00:24 +08:00
weli f5b18ae0e1 fix(cdn): upload_assets 默认调用 /usr/local/bin/upyun_tool
可通过环境变量 UPYUN_TOOL 覆盖路径。

Made-with: Cursor
2026-04-26 21:49:13 +08:00
weli 81fe1224df fix(scripts): cp_dist_moicen 用 hostname 与 POSIX 判断,固定 build:moicen
避免 SSH 非登录环境下 HOSTNAME 为空导致 npm run build: 失败;/bin/sh 下 [[ 不可用。

Made-with: Cursor
2026-04-26 21:39:15 +08:00
weli 19fbb53060 fix(front): 打卡/计划提交不再强制课程含图片;选课不限媒体;曲谱文案改为图片
- daka/jihua prepare 去掉仅 Picture+CourseSection 的前端校验
- pick 列表始终可选课,去掉仅按图片判断的警告
- 课程与练习相关界面 ref_name 与提示由「曲谱」改为「图片」等

Made-with: Cursor
2026-04-26 21:38:34 +08:00
weli be211a2638 fix(front): tabbar 首页直达角色工作台路径;路由与类型调整(music-room 欢迎页等)
Made-with: Cursor
2026-04-26 17:09:42 +08:00
weli 31f071ff80 fix(vite): moicen assets_base / for nginx music-room self-host (avoid static 404)
Made-with: Cursor
2026-04-26 16:11:12 +08:00
weli f5451f97f7 feat(dev): add /__dev/session to paste UC JWT + sudo for local browser QA
Production build omits route via import.meta.env.DEV guard.

Made-with: Cursor
2026-04-26 16:08:59 +08:00
weli 9dff5a04b6 fix(index): replace huiwings.cn iframe with in-app role home redirect
Logged-in users on music-room.moicen.com saw a blank center because iframe
targeted huiwings.cn (cross-origin / no session). Redirect to /student/home,
/teacher/home, /admin/teachers, /tester, or supervisor path on same origin.

Made-with: Cursor
2026-04-26 16:06:44 +08:00
weli b1996f3cd1 fix(wx): strip identity from share page_path; guard router unionid switch
- Sanitize page_path before router.push (H5) to prevent cross-user login via shared link
- onShareAppMessage: remove unionid/openid/status and related query keys from shared path
- main.ts: fix login(to.query.toString()) bug; when already logged in, strip foreign unionid from URL instead of logout

Made-with: Cursor
2026-04-26 15:58:56 +08:00
weli 3a6b9b6973 refactor(types): Tongzhi/TongzhiContent from domain; align with commons envelope DTO
Made-with: Cursor
2026-04-24 09:48:47 +08:00
weli 7d4170913b chore: export NotifyTypes from src/domain/notifyTypes
Made-with: Cursor
2026-04-24 09:17:36 +08:00
weli d661413a53 ci: 同级检出 AuthCoreJS 以满足 file:../AuthCoreJS
pnpm 安装时会解析本地 path 依赖,单仓库检出时 ../AuthCoreJS 不存在导致 ENOENT。
与 monorepo 布局一致:huike-front/ 与 AuthCoreJS/ 并列;pnpm/nodejs cache 指向子目录 lockfile。

Made-with: Cursor
2026-04-24 08:38:34 +08:00
weli 091c94b393 chore: private 包标记并重生成 pnpm-lock(对齐 file AuthCoreJS)
pnpm install --frozen-lockfile 需与 package.json 一致。

Made-with: Cursor
2026-04-24 08:35:15 +08:00
weli b7fa0a3d7e feat: 课程模块更名为 clazz(路由 /clazz、store、通知与选型)
对接 AuthCoreJS 通知枚举与 clazz_id;打卡与通知页使用 clazz 字段;补充 package-lock。

Made-with: Cursor
2026-04-24 07:43:06 +08:00
weli a7d09b4f1c docs update frontend ci badges
Point README CI badge to huike-front and remove obsolete release badge with no workflow.

Made-with: Cursor
2026-04-23 21:50:46 +08:00
weli 37ac462b45 refactor remove legacy qumu pick target compatibility
Use only COURSE_SECTION and COURSE_GROUP target keys so frontend strictly matches the new backend naming contract.

Made-with: Cursor
2026-04-23 21:47:55 +08:00
weli 3007c73c80 refactor frontend terminology to course system mapping
Align frontend wording with final domain terms (course system/course/lesson block), keep PickTargets backward compatible with backend values, and fix related import paths.

Made-with: Cursor
2026-04-23 21:47:02 +08:00
weli 3849426ad9 fix frontend route component import paths
Point admin and course route imports to existing qumu page files to resolve missing file errors in Vite build.

Made-with: Cursor
2026-04-23 21:42:45 +08:00
weli 5afb50513a ci add github actions workflow for frontend build
Run pnpm install and build on push/pull_request to ensure huike-front stays buildable in CI.

Made-with: Cursor
2026-04-23 21:40:55 +08:00
weli 88122f8579 refactor frontend course field naming alignment
Align frontend types, stores, pages, and routes to the renamed course/course_section/course_group domain fields for backend compatibility.

Made-with: Cursor
2026-04-23 21:38:49 +08:00
weli 81a838d273 Update README.md 2026-04-23 16:48:35 +08:00
weli 3d7da4d70f chore: ignore and remove local credential files
Remove local deployment credential files and private weapp config from tracking, and add explicit ignore rules to prevent re-adding them.

Made-with: Cursor
2026-04-23 16:37:33 +08:00
weli a661e439a0 chore: initialize frontend repo with teaching terminology updates
Add the current frontend codebase with a baseline .gitignore and update piano-specific UI terms to teaching-oriented terms for the current product context.

Made-with: Cursor
2026-04-23 16:37:14 +08:00