hyapp-h5/AGENTS.md
2026-06-11 01:01:40 +08:00

14 lines
1.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

common 里存放环境的js 如果有参数 ?env=test 就走test api
如果没有参数默认是 线上的api
如果env=local 就是本地的api
H5 通用主题放在 common/theme.css新页面默认引用该文件。
当前通用主题为浅紫色,不使用流光、彩虹渐变或高饱和装饰效果:主色使用 --hy-theme-primary / --hy-theme-primary-strong按钮使用 --hy-theme-button页面背景使用 --hy-theme-bg卡片使用 --hy-theme-surface。
页面样式不要硬编码主色,优先消费 common/theme.css 里的 CSS 变量;只有 Figma 强制要求 100% 还原时才允许局部覆盖。
H5 多语言能力放在 common/i18n.js 和 common/locales/\*.json当前面向英语 en、阿拉伯语 ar、土耳其语 tr、西班牙语 es。页面文案使用 data-i18n / data-i18n-placeholder / data-i18n-aria 绑定语言包 key新增页面必须优先复用 common 的语言包机制,不在页面脚本里硬编码多语言字典。
所有逻辑功能配置默认打开;只有密钥、地址、三方账号等必须由环境提供的敏感值使用占位符或环境配置,不在默认配置里伪造可用凭证。
所有业务逻辑、状态流转、权限判断、支付链路、异步流程都保持高密度逻辑注释,注释解释为什么这样处理和失败分支,不复述语法。