diff --git a/apps/web/.env.production b/apps/web/.env.production index b6913ab..a241ae7 100644 --- a/apps/web/.env.production +++ b/apps/web/.env.production @@ -1,4 +1,3 @@ PUBLIC_ENV=xuyue.cc -PUBLIC_MAXKB_URL=https://maxkb.xuyue.cc/chat/api/embed?protocol=https&host=maxkb.xuyue.cc&token=dd37457027c40b39 PUBLIC_CODE_URL=https://code.xuyue.cc PUBLIC_ICONIFY_URL=https://icon.xuyue.cc \ No newline at end of file diff --git a/apps/web/.env.staging b/apps/web/.env.staging index a913ce6..190af53 100644 --- a/apps/web/.env.staging +++ b/apps/web/.env.staging @@ -1,4 +1,3 @@ PUBLIC_ENV=school -PUBLIC_MAXKB_URL=http://10.13.114.114:92/chat/api/embed?protocol=http&host=10.13.114.114:92&token=dd37457027c40b39 PUBLIC_CODE_URL=http://10.13.114.114:82 PUBLIC_ICONIFY_URL=http://10.13.114.114:8098 diff --git a/apps/web/.env.test b/apps/web/.env.test index 38e91cf..dd12c88 100644 --- a/apps/web/.env.test +++ b/apps/web/.env.test @@ -1,4 +1,3 @@ PUBLIC_ENV=test -PUBLIC_MAXKB_URL=http://10.13.114.114:92/chat/api/embed?protocol=http&host=10.13.114.114:92&token=dd37457027c40b39 PUBLIC_CODE_URL=http://10.13.114.114:82 PUBLIC_ICONIFY_URL=http://10.13.114.114:8098 diff --git a/apps/web/CLAUDE.md b/apps/web/CLAUDE.md index 4dcef82..5213ee9 100644 --- a/apps/web/CLAUDE.md +++ b/apps/web/CLAUDE.md @@ -59,7 +59,7 @@ API 调用不按模块分:学生端全在 `oj/api.ts`、后台全在 `admin/ap Shared logic lives in `shared/`: - `store/` — Pinia stores: `user` (auth/roles), `config` (site-wide settings), `authModal` (login/signup form state), `collab` (help-request queue + collab room), `achievement` (解锁弹窗队列), `myFlowchart` (题面「你画的流程图」那张 A/S 图的 mermaid 源码) -- `composables/` — `aiStream`, `pagination` (URL-synced), `websocket` (reconnect + heartbeat), `collabDoc` (Yjs binding for the collab channel), `configUpdate` (WS-pushed config sync), `useMermaid` (lazy Mermaid render), `darkTransition` (View Transitions,111 以下走降级分支), `leaveStudents` (课堂看板的「请假」), `chartTheme`, `breakpoints`, `maxkb`, `rarity` +- `composables/` — `aiStream`, `pagination` (URL-synced), `websocket` (reconnect + heartbeat), `collabDoc` (Yjs binding for the collab channel), `configUpdate` (WS-pushed config sync), `useMermaid` (lazy Mermaid render), `darkTransition` (View Transitions,111 以下走降级分支), `leaveStudents` (课堂看板的「请假」), `chartTheme`, `breakpoints`, `rarity` - `layout/` — `default.vue` and `admin.vue` layout wrappers - `api.ts` — shared API calls (auth, profile, tags, captcha) @@ -168,7 +168,6 @@ Env files: `.env`(本机)、`.env.production`(服务器)、`.env.staging |---|---| | `PUBLIC_ENV` | 环境角标:`test` → 「测试版」,`dev` → 「开发版」,其余不显示 | | `PUBLIC_CODE_URL` | 代码分享服务(提交详情、题目页的「分享」) | -| `PUBLIC_MAXKB_URL` | 知识库问答挂件 | | `PUBLIC_ICONIFY_URL` | 自建 Iconify 图标源,不设则走公共 CDN | 后端地址**不在这里**:`utils/api.ts` 写死 `baseURL: "/api"`,dev 由 `vite.config.ts` 的 diff --git a/apps/web/index.html b/apps/web/index.html index 3737e63..1be5500 100644 --- a/apps/web/index.html +++ b/apps/web/index.html @@ -6,9 +6,6 @@ 判题狗 -
diff --git a/apps/web/src/App.vue b/apps/web/src/App.vue index 9a6ac7f..ce96930 100644 --- a/apps/web/src/App.vue +++ b/apps/web/src/App.vue @@ -4,7 +4,6 @@ import "normalize.css" import "./index.css" import { useConfigStore } from "shared/store/config" import { useConfigUpdate } from "shared/composables/configUpdate" -import { useMaxKB } from "shared/composables/maxkb" import { useUserStore } from "shared/store/user" import { useCollabStore } from "shared/store/collab" import CollabHost from "shared/components/CollabHost.vue" @@ -20,11 +19,9 @@ onMounted(() => { userStore.getMyProfile() }) -// 配置实时推送 + MaxKB 挂件。阶段 2 时因为后端还没有 /ws/config 而暂时关掉, -// 阶段 3 迁完之后一直没接回来 —— 表现是管理员改站点配置后学生要刷新才生效、 -// 知识库挂件根本不出现,且没有任何报错。两者现在都走新后端的 /ws/config。 +// 配置实时推送。阶段 2 时因为后端还没有 /ws/config 而暂时关掉,阶段 3 迁完之后一直 +// 没接回来 —— 表现是管理员改站点配置后学生要刷新才生效,且没有任何报错。现在走新后端的 /ws/config。 useConfigUpdate() -useMaxKB() // 课堂求助通道。和 /ws/config 一样是全局常驻的:老师可能正在后台改题时 // 收到求助,学生也要在排队期间一直挂着,所以不放在题目页里起落。 diff --git a/apps/web/src/admin/setting/config.vue b/apps/web/src/admin/setting/config.vue index a9d57bf..78a1f15 100644 --- a/apps/web/src/admin/setting/config.vue +++ b/apps/web/src/admin/setting/config.vue @@ -1,9 +1,10 @@