This commit is contained in:
hero920103 committed 2026-11-03 11:13:59 +08:00
1 parent 012f8edf8b
commit 36ff960fbd
33 files changed
+1644 -344

No files matched your search

+29
View File
@@ -33,3 +33,32 @@ export function clearHomeCache() {
cache = null
cacheAt = 0
}
/**
* 免登录模块宫格:GET /api/modules/public(公开接口,无需 token)。
* 返回 [{ id, code, name, icon, path, description, require_login }]。
* 供未登录用户渲染 nav 首页,按 require_login 决定点击是「进登录引导」还是「直接进入」。
*/
export function fetchPublicModules() {
return request({
url: '/api/modules/public',
method: 'GET',
silent: true,
timeout: 15000
})
}
/**
* 免登录菜单:GET /api/menus/public(公开接口,无需 token)。
* 返回 [{ id, pid, title, path, icon, type, sort, module, leaf }],
* 菜单级 require_login=0 的集合:游客(持游客令牌)可用功能的唯一入口清单,
* nav 宫格据此判定模块是否可免登录进入,子系统据此渲染游客功能列表。
*/
export function fetchPublicMenus() {
return request({
url: '/api/menus/public',
method: 'GET',
silent: true,
timeout: 15000
})
}