nomadro/apps/nomadweb/wemini/README.md
eric d93a355fd5 Migrate navmini/ebook/nomadweb into apps/ as same-origin portal subpaths.
Shield external portal jumps (keep EXTERNAL_* for later), serve /nav from static build, and proxy /book + /community to vertical Next apps with Caddy notes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 03:30:34 -05:00

56 lines
1.6 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.

# wemini · nomadro 微信小程序
Taro 原生 weapp(参考 `C:\Users\admin\Desktop\wemini`:`ScrollView` + 手写 weapp-safe SCSS),**不用 web-view**,也不灌整份 H5 `globals.css`。
视觉对齐官网 H5(`#0a0e17`、渐变 CTA、目的地卡 / 活动卡 / 三条环),样式:
- `src/app.scss`
- `src/styles/h5-theme.scss`
API:`https://nomadweb.nomadro.com/api/v1`
## 凭证(明文)
| 项 | 值 |
|----|-----|
| AppID | `wx11f6afc44ea1532f` |
| AppSecret | `d1814f60f900cfdee1813ccc6e00bc2d` |
服务端:
```env
WECHAT_APPID=wx11f6afc44ea1532f
WECHAT_SECRET=d1814f60f900cfdee1813ccc6e00bc2d
WECHAT_ALLOW_DEVTOOLS=true
```
登录:`wx.login` → `POST /auth/wechat` `{ "code": "..." }`。
## 页面
| Tab | 路由 | 内容 |
|-----|------|------|
| 首页 | `pages/home` | Hero、ticker、三条环、目的地、生活方式、签证、心声、FAQ |
| 目的地 | `pages/destinations` | 筛选排序 + 城市卡 |
| 详情 | `pages/destination` | 城市详情 |
| 活动 | `pages/meetups` | Meetup 列表 |
| 我的 | `pages/mine` | 微信登录 / 收藏 / 等级 |
## 开发
```bash
cd wemini
npm install --legacy-peer-deps
npm run dev:weapp
```
微信开发者工具打开本目录(`miniprogramRoot=dist/`),勾选不校验合法域名,清缓存后编译。
## 本地数据兜底
活动 / 目的地 / 签证 / 心声在 API 不可用或返回空列表时,自动使用 `src/data/localCatalog.ts`(与 redmini 离线包同源)。
```bash
python wemini/scripts/build_local_catalog.py # 从 redmini/src/data.js 重新生成
```