index_js.h 983 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* 自动生成的文本数据头文件 */
  2. /* 源文件: index.js */
  3. /* 文件大小: 417 字节 */
  4. /* 生成时间: 2025-09-16 05:47:25 */
  5. /* 编码: utf-8 */
  6. #ifndef P_INDEX_JS_H
  7. #define P_INDEX_JS_H
  8. #include <stddef.h>
  9. // 文本数据(UTF-8编码)
  10. const char *p_index_js =
  11. "export function getApiBaseUrl (){\n"
  12. " const { protocol, hostname, port } = window.location;\n"
  13. " // 开发环境特殊处理\n"
  14. " if (hostname === 'localhost' || hostname === '127.0.0.1') {\n"
  15. " return 'http://localhost:8084/pdu'; // 开发服务器地址\n"
  16. " }\n"
  17. " // 生产环境使用当前域名\n"
  18. " return port\n"
  19. " ? `${protocol}//${hostname}:${port}/pdu`\n"
  20. " : `${protocol}//${hostname}/pdu`;\n"
  21. "}\n"
  22. ;
  23. // 文本数据大小(包括null终止符)
  24. const size_t p_index_js_size = 418;
  25. // 文本长度(字符数)
  26. const size_t p_index_js_length = 367;
  27. #endif /* P_INDEX_JS_H */