diff --git a/TUICallKit-Vue3/main.js b/TUICallKit-Vue3/main.js index 0b46ee0..b4f98ee 100644 --- a/TUICallKit-Vue3/main.js +++ b/TUICallKit-Vue3/main.js @@ -1,5 +1,6 @@ import App from './App' -var baseUrl ='https://admin.zhenyangtang.com.cn/'; +import { API_BASE_URL } from './config/api.js' +var baseUrl = API_BASE_URL; function joinApiUrl(base, path) { const b = String(base || '').replace(/\/+$/, '') @@ -168,4 +169,4 @@ export function createApp() { app } } -// #endif \ No newline at end of file +// #endif diff --git a/TUICallKit-Vue3/package.json b/TUICallKit-Vue3/package.json index 31871be..095b472 100644 --- a/TUICallKit-Vue3/package.json +++ b/TUICallKit-Vue3/package.json @@ -9,7 +9,9 @@ "dev:app": "UNI_INPUT_DIR=\"$PWD\" uni -p app", "build:mp-weixin": "UNI_INPUT_DIR=\"$PWD\" uni build -p mp-weixin", "build:h5": "UNI_INPUT_DIR=\"$PWD\" uni build", - "build:app": "UNI_INPUT_DIR=\"$PWD\" uni build -p app" + "build:app": "UNI_INPUT_DIR=\"$PWD\" uni build -p app", + "test:tang": "node --test build/tang-detective-native-plugin.test.mjs build/tang-detective-cos-media.test.mjs scripts/tang-cos/upload.test.mjs scripts/test-tang-platform.cjs scripts/test-tang-page-lifecycle.cjs", + "check:tang-output": "node build/validate-tang-detective-output.mjs dist/build/mp-weixin" }, "keywords": [], "author": "", diff --git a/TUICallKit-Vue3/pages.json b/TUICallKit-Vue3/pages.json index 223d8b3..bc67e4a 100644 --- a/TUICallKit-Vue3/pages.json +++ b/TUICallKit-Vue3/pages.json @@ -220,8 +220,15 @@ } } }, - { - "path": "endless-game/index", + { + "path": "tang-detective/index", + "style": { + "navigationBarTitleText": "唐侦探", + "backgroundColor": "#f4fbf4" + } + }, + { + "path": "endless-game/index", "style": { "navigationStyle": "custom", "navigationBarTitleText": "识糖小课堂", diff --git a/TUICallKit-Vue3/tongji/pages/weekly.vue b/TUICallKit-Vue3/tongji/pages/weekly.vue index 8099325..b83873c 100644 --- a/TUICallKit-Vue3/tongji/pages/weekly.vue +++ b/TUICallKit-Vue3/tongji/pages/weekly.vue @@ -98,7 +98,17 @@ 示例数据,累计记录满 7 天后显示您的真实趋势 - + + + + + + + 唐侦探 + 看连环画,找线索,听一家人的故事 + + + @@ -1523,9 +1533,13 @@ function openGamePage(url) { }) } -function goEndlessGamePage() { - openGamePage('/tongji/endless-game/index') -} +function goEndlessGamePage() { + openGamePage('/tongji/endless-game/index') +} + +function goTangDetectivePage() { + openGamePage('/tongji/tang-detective/index') +} function navToUser() { uni.redirectTo({ url: '/pages/user/user' }) diff --git a/TUICallKit-Vue3/vite.config.ts b/TUICallKit-Vue3/vite.config.ts index d77e038..030fad0 100644 --- a/TUICallKit-Vue3/vite.config.ts +++ b/TUICallKit-Vue3/vite.config.ts @@ -1,6 +1,8 @@ import { defineConfig } from 'vite' import uni from '@dcloudio/vite-plugin-uni' import Optimization from '@uni-ku/bundle-optimizer' +import tangDetectiveNativePlugin from './build/tang-detective-native-plugin.mjs' +import { API_BASE_URL } from './config/api.js' // uni-app 工程根目录就是源码目录(HBuilderX 兼容) // 编译产物默认输出到 ./dist// @@ -16,6 +18,7 @@ export default defineConfig({ dts: false, logger: false, }), + tangDetectiveNativePlugin({ apiBaseUrl: API_BASE_URL }), ], css: { preprocessorOptions: { diff --git a/TongjiUniApp/main.js b/TongjiUniApp/main.js index a3747c4..539ae2c 100644 --- a/TongjiUniApp/main.js +++ b/TongjiUniApp/main.js @@ -1,6 +1,7 @@ import App from './App' +import { API_BASE_URL } from './config/api.js' -var baseUrl = 'https://xt.zhenyangtang.com.cn/' +var baseUrl = API_BASE_URL function joinApiUrl(base, path) { const b = String(base || '').replace(/\/+$/, '') diff --git a/TongjiUniApp/package.json b/TongjiUniApp/package.json index 025e4ec..c92b6c5 100644 --- a/TongjiUniApp/package.json +++ b/TongjiUniApp/package.json @@ -9,7 +9,9 @@ "dev:app": "cross-env UNI_INPUT_DIR=. uni -p app", "build:mp-weixin": "cross-env UNI_INPUT_DIR=. uni build -p mp-weixin", "build:h5": "cross-env UNI_INPUT_DIR=. uni build", - "build:app": "cross-env UNI_INPUT_DIR=. uni build -p app" + "build:app": "cross-env UNI_INPUT_DIR=. uni build -p app", + "test:tang": "node --test build/tang-detective-native-plugin.test.mjs build/tang-detective-cos-media.test.mjs build/tang-detective-source-validation.test.mjs scripts/tang-cos/upload.test.mjs scripts/test-tang-platform.cjs scripts/test-tang-page-lifecycle.cjs", + "check:tang-output": "node build/validate-tang-detective-output.mjs dist/build/mp-weixin && node build/validate-tang-tongji-host.mjs dist/build/mp-weixin" }, "keywords": [ "uniapp", diff --git a/TongjiUniApp/pages.json b/TongjiUniApp/pages.json index 9e2d131..f38e505 100644 --- a/TongjiUniApp/pages.json +++ b/TongjiUniApp/pages.json @@ -94,6 +94,13 @@ "enableShareAppMessage": true, "enableShareTimeline": true } + }, + { + "path": "tongji/tang-detective/index", + "style": { + "navigationBarTitleText": "唐侦探", + "backgroundColor": "#f4fbf4" + } } ], "subPackages": [ diff --git a/TongjiUniApp/static/background.svg b/TongjiUniApp/static/background.svg deleted file mode 100644 index 05e741c..0000000 --- a/TongjiUniApp/static/background.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - 背景 - Created with Sketch. - - - - - - - - - - - - - - \ No newline at end of file diff --git a/TongjiUniApp/static/calling-logo.png b/TongjiUniApp/static/calling-logo.png deleted file mode 100644 index dc6d126..0000000 Binary files a/TongjiUniApp/static/calling-logo.png and /dev/null differ diff --git a/TongjiUniApp/static/check.png b/TongjiUniApp/static/check.png deleted file mode 100644 index c4c5a0a..0000000 Binary files a/TongjiUniApp/static/check.png and /dev/null differ diff --git a/TongjiUniApp/static/user/home.png b/TongjiUniApp/static/user/home.png deleted file mode 100644 index bda5848..0000000 Binary files a/TongjiUniApp/static/user/home.png and /dev/null differ diff --git a/TongjiUniApp/static/user/home_no.png b/TongjiUniApp/static/user/home_no.png deleted file mode 100644 index fede2f9..0000000 Binary files a/TongjiUniApp/static/user/home_no.png and /dev/null differ diff --git a/TongjiUniApp/static/wjw.png b/TongjiUniApp/static/wjw.png deleted file mode 100644 index 92bbf23..0000000 Binary files a/TongjiUniApp/static/wjw.png and /dev/null differ diff --git a/TongjiUniApp/static/ys.png b/TongjiUniApp/static/ys.png deleted file mode 100644 index 1620b68..0000000 Binary files a/TongjiUniApp/static/ys.png and /dev/null differ diff --git a/TongjiUniApp/static/yy.png b/TongjiUniApp/static/yy.png deleted file mode 100644 index 9b3894f..0000000 Binary files a/TongjiUniApp/static/yy.png and /dev/null differ diff --git a/TongjiUniApp/static/zs.jpg b/TongjiUniApp/static/zs.jpg deleted file mode 100644 index 00b3336..0000000 Binary files a/TongjiUniApp/static/zs.jpg and /dev/null differ diff --git a/TongjiUniApp/tongji/pages/weekly.vue b/TongjiUniApp/tongji/pages/weekly.vue index 0e2d055..411640e 100644 --- a/TongjiUniApp/tongji/pages/weekly.vue +++ b/TongjiUniApp/tongji/pages/weekly.vue @@ -99,6 +99,16 @@ 示例数据,累计记录满 7 天后显示您的真实趋势 + + + + + + 唐侦探 + 看连环画,找线索,听一家人的故事 + + + @@ -1527,6 +1537,10 @@ function goEndlessGamePage() { openGamePage('/tongji/endless-game/index') } +function goTangDetectivePage() { + openGamePage('/tongji/tang-detective/index') +} + function navToUser() { uni.redirectTo({ url: '/pages/user/user' }) } diff --git a/TongjiUniApp/training/static/README.md b/TongjiUniApp/training/static/README.md index 42d98e1..2f40d98 100644 --- a/TongjiUniApp/training/static/README.md +++ b/TongjiUniApp/training/static/README.md @@ -10,9 +10,10 @@ training/static/ ├── voice/ # (规划中) TTS 语音教练 │ ├── numbers/ 数字报数 1~30 │ └── prompts/ 开始/休息/再来 等口令 -├── bgm/ # (规划中) 训练/休息背景乐 -└── footprint.svg # 脚印图标(早期方案残留,可保留作为备用素材) -``` +└── bgm/ # (规划中) 训练/休息背景乐 +``` + +早期备用脚印图标 `footprint.svg` 无运行时引用,已于 2026-09-08 随素材清理移出到项目外可恢复备份;记录见 `docs/TANG-COS-MIGRATION-20260908.md`。 > 节拍器音频已完全走 CDN(`gz-1349751149.cos.ap-guangzhou.myqcloud.com`),减少小程序包体积约 210 KB。`useMetronomeBg.ts` / `useMetronome.ts` 中的 URL 即源信息,更换音色只需改 hook 里的常量。 diff --git a/TongjiUniApp/training/static/footprint.svg b/TongjiUniApp/training/static/footprint.svg deleted file mode 100644 index 6696613..0000000 --- a/TongjiUniApp/training/static/footprint.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/TongjiUniApp/vite.config.ts b/TongjiUniApp/vite.config.ts index e6d9fc8..bbb83a3 100644 --- a/TongjiUniApp/vite.config.ts +++ b/TongjiUniApp/vite.config.ts @@ -1,8 +1,10 @@ import { defineConfig } from 'vite' import uni from '@dcloudio/vite-plugin-uni' +import tangDetectiveNativePlugin from './build/tang-detective-native-plugin.mjs' +import { API_BASE_URL } from './config/api.js' export default defineConfig({ - plugins: [uni()], + plugins: [uni(), tangDetectiveNativePlugin({ apiBaseUrl: API_BASE_URL })], css: { preprocessorOptions: { scss: { diff --git a/server/app/api/route/app.php b/server/app/api/route/app.php index 3e3b184..cf8a4a7 100644 --- a/server/app/api/route/app.php +++ b/server/app/api/route/app.php @@ -14,3 +14,8 @@ Route::post('ej-pharmacy/webhook', 'EjPharmacyCallback/webhook'); // 企业微信内部应用推广助手:公开 JS 与服务端随机分流。 Route::get('qywx-promotion/js/:key', 'QywxPromotionPublic/script'); Route::get('qywx-promotion/go/:key', 'QywxPromotionPublic/redirect'); + +// 唐侦探独立章节存档:使用统一 token,与控糖消消乐周榜隔离。 +Route::get('tang/catalog', 'TangDetective/catalog'); +Route::get('tang/progress', 'TangDetective/progress'); +Route::post('tang/saveProgress', 'TangDetective/saveProgress');