# install dependencies
pnpm i

# Run
pnpm dev

# Build product
pnpm build

本地开发跳过翼虎 SSO 登录

本地开发时,通过 whistle 代理将线上域名指向本地服务,从而复用线上登录态,跳过 SSO 登录流程。

1. 外部工具配置

1.1 安装 whistle 代理

npm i whistle -g

1.2 配置代理规则

启动 whistle 后打开 localhost:8899,新增规则:

# RT 预发
https://rt-admin.deploy-test.xiaopeng.com http://127.0.0.1:9980

1.3 配置浏览器代理插件

  1. 下载 Chrome 插件 Proxy SwitchyOmega (V3)
  2. 新增情景模式 whistle,代理服务器设置为 http://127.0.0.1:8899
  3. 在 auto switch 下新增域名通配符规则,仅当域名为 rt-admin.deploy-test.xiaopeng.com 时触发代理

2. 项目配置

2.1 开启 HTTP 代理

在 .env 或对应环境配置文件中设置:

VITE_HTTP_PROXY = Y

2.2 配置服务地址

将 serviceConfig 的开发环境 URL 指向预发域名:

serviceConfig.dev.url = 'https://rt-admin.deploy-test.xiaopeng.com'

2.3 Vite 允许外部域名访问

在 vite.config.ts 的 server 配置中添加:

server: {
  allowedHosts: true
}

3. 使用方式

  1. 启动 whistle:w2 start
  2. 切换 SwitchyOmega 到 auto switch 模式
  3. 运行 pnpm dev 启动本地服务
  4. 浏览器访问 https://rt-admin.deploy-test.xiaopeng.com,请求将被代理到本地,同时复用线上登录态
MIT License

Copyright (c) 2022 Rock chen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
.kiro/dms-behavior-monitor/specs/design 8 KB
.kiro/dms-behavior-monitor/specs/requirements 4 KB
.kiro/dms-behavior-monitor/specs/summary 7 KB
.kiro/dms-behavior-monitor/specs/tasks 8 KB
.kiro/dms-behavior-monitor/tests/test-cases 3 KB
.kiro/dms-behavior-monitor/tests/test-report 6 KB
.kiro/kpi-light-theme/specs/design 8 KB
.kiro/kpi-light-theme/specs/requirements 5 KB
.kiro/kpi-light-theme/specs/summary 6 KB
.kiro/kpi-light-theme/specs/tasks 7 KB
.kiro/kpi-light-theme/tests/test-cases 2 KB
.kiro/kpi-light-theme/tests/test-report 6 KB
.kiro/lark-doc-implement/specs/design 13 KB
.kiro/lark-doc-implement/specs/requirements 11 KB
.kiro/lark-doc-implement/specs/summary 7 KB
.kiro/lark-doc-implement/specs/tasks 12 KB
.kiro/lark-doc-implement/tests/test-cases 3 KB
.kiro/lark-doc-implement/tests/test-report 4 KB
.kiro/lark-wiki-dev/specs/design 28 KB
.kiro/lark-wiki-dev/specs/requirements 24 KB
.kiro/lark-wiki-dev/specs/summary 8 KB
.kiro/lark-wiki-dev/specs/tasks 31 KB
.kiro/lark-wiki-dev/tests/test-cases 3 KB
.kiro/lark-wiki-dev/tests/test-report 6 KB
.kiro/lark-wiki-dev_084245/specs/requirements 24 KB
.kiro/lark-wiki-fetch/specs/design 11 KB
.kiro/lark-wiki-fetch/specs/requirements 10 KB
.kiro/lark-wiki-fetch/specs/summary 8 KB
.kiro/lark-wiki-fetch/specs/tasks 10 KB
.kiro/lark-wiki-fetch/tests/test-cases 3 KB
.kiro/lark-wiki-fetch/tests/test-report 9 KB
.kiro/skills/code-specification/SKILL 4 KB
.kiro/skills/language-preference/SKILL 535 b
.trae/skills/修改列表宽度/SKILL 2 KB
.trae/skills/修改表单/SKILL 577 b
.trae/skills/国际化/SKILL 580 b
.trae/skills/通用规范/SKILL 510 b
README 1 KB
command-center-api 16 KB
docs/superpowers/plans/2026-07-29-agreement-h5-admin 16 KB
docs/virtualOrderFeat 9 KB
docs/点位管理/点位管理接口文档 7 KB
src/components/ConfirmDialog/README 3 KB