Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions MiniApp/Skills/miniapp-dev/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,11 @@ BuiltinApp {

- 传 `app_id` 和 1–5 张截图路径(PNG/JPEG/WebP,单张 ≤ 5 MiB)。
没有截图时先向用户要,或请用户在「市场 → 我的投稿」用「截取当前画面」生成。
- **截图比例用 16:9,推荐 1920×1080**。市场网页和 BitFun 桌面端都按 16:9
居中裁剪显示,非 16:9 的图会被切掉边缘。第一张是列表卡片封面,选最能说明
用途的那张,关键信息放画面中部不要贴边。超过 2560px 的边会被服务端缩到
2560,所以 2560×1440 是有效上限。显示契约见
`src/miniapp-market-web/README.md` 的「上架截图比例」。
- 名称、描述、图标、分类、标签自动取自 `meta.json`;slug 和版本号自动推导。
发布前确认 `meta.json` 的 `description` 非空、权限是最小集
(市场会拒绝 `node.enabled=true`、宽泛 fs scope 等)。
Expand Down
4 changes: 4 additions & 0 deletions src/crates/assembly/core/builtin_skills/miniapp-dev/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@ await app.fs.readFile(...)

- 传 `app_id` 和 1–5 张截图路径(PNG/JPEG/WebP,单张 ≤ 5 MiB)。
没有截图时先向用户要,或请用户在「市场 → 我的投稿」用「截取当前画面」生成。
- **截图比例用 16:9,推荐 1920×1080**。市场网页和 BitFun 桌面端都按 16:9
居中裁剪显示,非 16:9 的图会被切掉边缘。第一张是列表卡片封面,选最能说明
用途的那张,关键信息放画面中部不要贴边。超过 2560px 的边会被服务端缩到
2560,所以 2560×1440 是有效上限。
- 名称、描述、图标、分类、标签自动取自 `meta.json`;slug 和版本号自动推导。
发布前确认 `meta.json` 的 `description` 非空、权限是最小集
(市场会拒绝 `node.enabled=true`、宽泛 fs scope 等)。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Publishing is an outward-facing action: only call this when the user explicitly
"items": { "type": "string" },
"minItems": 1,
"maxItems": 5,
"description": "1-5 absolute paths to PNG/JPEG/WebP screenshots of the running app, each <= 5 MiB"
"description": "1-5 absolute paths to PNG/JPEG/WebP screenshots of the running app, each <= 5 MiB. Use a 16:9 aspect ratio (1920x1080 recommended, 2560x1440 max useful): both the web market and the BitFun desktop client crop screenshots to 16:9, so other ratios lose their edges. The first screenshot is the listing card cover — pick the one that best shows what the app does, and keep key content away from the edges."
},
"changelog": {
"type": "string",
Expand Down
26 changes: 26 additions & 0 deletions src/miniapp-market-web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,32 @@ BitFun 桌面端内嵌的原生市场 Scene 不在这里。它位于
`src/web-ui/src/app/scenes/miniapps/`,通过
`src/apps/desktop/src/api/miniapp_market_api.rs` 访问市场。

## 上架截图比例

**投稿截图推荐 16:9,建议 1920×1080。**

网页市场和 BitFun 桌面端的市场都用 `aspect-ratio: 16 / 9` + `object-fit: cover`
渲染截图,所以非 16:9 的图会被**居中裁剪**,上下或左右被切掉:

| 位置 | 文件 |
| --- | --- |
| 网页卡片 | `src/styles.css` 的 `.card-visual` |
| 网页详情页 | `src/styles.css` 的 `.detail-gallery` |
| 桌面端卡片 | `src/web-ui/src/app/scenes/miniapps/views/MiniAppMarketView.scss` |

改动其中一处必须同步另外两处,否则同一张截图在两个界面里的裁剪结果会不一致。

给投稿方的要点:

- 第一张截图是列表卡片的封面,选最能说明用途的那张;
- 关键信息(标题、主图表、核心按钮)放在画面中部,避免贴边被裁掉;
- 后端会把超过 2560px 的边缩到 2560,所以 2560×1440 是有效上限,
再大只是浪费上传体积。

后端硬性校验在 `src/crates/services/miniapp-market-service/src/package.rs`
的 `validate_screenshot`:1–5 张,PNG/JPEG/WebP,单张 ≤ 5 MiB,单边 ≤ 16384px
且总像素 ≤ 40MP。它**不校验宽高比**——16:9 是显示契约,不是上传门槛。

## 本地开发

首次开发先在仓库根目录安装依赖:
Expand Down
Loading