lvfengfree b92e1119ae fix: 修复菜单为空问题 - 移除后端过滤home路由的错误逻辑
- 修复RouteService中错误过滤home路由的问题
- 后端现在正确返回所有用户有权限的路由
- 添加设备管理相关功能(列表、在线监控、电源管理、远程监控)
- 添加详细的修复文档和重启脚本
- 更新权限配置脚本

问题根源:后端代码中有逻辑会过滤掉home路由,导致前端收到空数组,无法生成菜单
解决方案:移除过滤home路由的逻辑,让后端返回所有有权限的路由
2026-03-01 09:50:19 +08:00

82 lines
1.8 KiB
C

/*
* testModule.c : a small tester program for xmlModule
*
* See Copyright for the status of this software.
*
* joelwreed@comcast.net
*/
#include <stdio.h>
#include <libxml/xmlversion.h>
#ifdef LIBXML_MODULES_ENABLED
#include <limits.h>
#include <string.h>
#include <stdarg.h>
#include <libxml/xmlmemory.h>
#include <libxml/debugXML.h>
#include <libxml/xmlmodule.h>
#ifdef _WIN32
#define MODULE_PATH "."
#include <stdlib.h> /* for _MAX_PATH */
#ifndef __MINGW32__
#define PATH_MAX _MAX_PATH
#endif
#else
#define MODULE_PATH ".libs"
#endif
/* Used for SCO Openserver*/
#ifndef PATH_MAX
#ifdef _POSIX_PATH_MAX
#define PATH_MAX _POSIX_PATH_MAX
#else
#define PATH_MAX 4096
#endif
#endif
typedef int (*hello_world_t)(void);
int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
xmlChar filename[PATH_MAX];
xmlModulePtr module = NULL;
hello_world_t hello_world = NULL;
/* build the module filename, and confirm the module exists */
xmlStrPrintf(filename, sizeof(filename),
"%s/testdso%s",
(const xmlChar*)MODULE_PATH,
(const xmlChar*)LIBXML_MODULE_EXTENSION);
module = xmlModuleOpen((const char*)filename, 0);
if (module == NULL) {
fprintf(stderr, "Failed to open module\n");
return(1);
}
if (xmlModuleSymbol(module, "hello_world", (void **) &hello_world)) {
fprintf(stderr, "Failure to lookup\n");
return(1);
}
if (hello_world == NULL) {
fprintf(stderr, "Lookup returned NULL\n");
return(1);
}
(*hello_world)();
xmlModuleClose(module);
return(0);
}
#else
int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
printf("%s : Module support not compiled in\n", argv[0]);
return(0);
}
#endif /* LIBXML_SCHEMAS_ENABLED */