petstore-admin/README.md
2026-08-01 23:30:32 +08:00

40 lines
1.1 KiB
Markdown
Raw 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.

# 宠小它门店 Web 后台
Phase A 管理端Vue 3 + Vite + Element Plus
## 开发
```bash
cd admin
npm install
npm run dev
```
默认 http://localhost:5174 `/api` 代理到 `http://localhost:8080`
登录:老板/员工手机号 + 验证码dev 万能码见后端 `app.demo.sms-universal-code`,默认 `123456`)。
公开报告链接域名:`.env.development` / `.env.production` 中配置 `VITE_PUBLIC_H5_ORIGIN`
## 构建
```bash
npm run preflight:release
npm run build
```
仓库内 `.env.production` 使用 `.invalid` 安全占位符,默认门禁会失败。正式发布必须使用权限受控的域名文件:
```bash
PETSTORE_ADMIN_ENV_FILE=/secure/path/petstore-admin.env npm run preflight:release
cp /secure/path/petstore-admin.env .env.production.local
npm run build
```
`VITE_PUBLIC_H5_ORIGIN` 必须是本项目公开报告页的显式 HTTPS 源,不能是 localhost、`.invalid` 或已归属其他产品的 `www.s-good.com`。真实配置不得提交,发布后删除 `.env.production.local`
## Owner
- Store Admin FE → `admin/**`
- 客户聚合 APIBackend Core → `GET /api/admin/service-customers`