feat(route-detail): 实现路线详情独立管理全链路功能
添加`DetailRecord`数据库模型、迁移脚本及完整的CRUD管理接口,将路线详情从玩法路线表解耦,实现独立存储。 在Admin UI的路线编辑器中集成详情配置面板,支持编辑详情文案、图片等展示内容。 完善MiniAPP路线详情页,新增导航函数、API调用及数据归一化逻辑,并添加对应单元测试。 更新所有相关文档,明确领域边界、联调流程及接口契约规范。 调整首页和玩法页的点击跳转逻辑,优先跳转路线详情页而非原需求页。 新增数值格式化工具函数优化内容展示效果。
This commit is contained in:
1 parent
7ba92f3c5d
commit
c143b67275
32 files changed
+1343
-259
No files matched your search
@@ -0,0 +1,20 @@
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
import { goWanfaRouteDetail } from "@/lib/navigation";
|
||||
|
||||
describe("wanfa route detail navigation", () => {
|
||||
const navigateTo = vi.fn();
|
||||
|
||||
beforeEach(() => {
|
||||
navigateTo.mockReset();
|
||||
vi.stubGlobal("uni", { navigateTo });
|
||||
});
|
||||
|
||||
it("encodes the route id in the detail page URL", () => {
|
||||
goWanfaRouteDetail("family water");
|
||||
|
||||
expect(navigateTo).toHaveBeenCalledWith({
|
||||
url: "/pages/detail/index?routeId=family%20water",
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user