fix(apps): 修复云超服市场单段 slug 商品下载链路
- 前端 buildMarketDownloadUrl:id 拆分不到 owner/name 两段时, 不再产生 owner/undefined,统一按 pineagents/<id> 处理 - 后端 _fetch_market_bundle_bytes:owner/name 精确匹配失败后, 回退按 name 单段精确匹配,兼容历史未补 owner 前缀的商品 (如 creator、公众号爆款封面生成) 配套:server-core 侧已把存量单段 slug 数据规范化为 pineagents/<slug>
This commit is contained in:
@@ -94,7 +94,10 @@ export function buildMarketDownloadUrl(
|
||||
source?: string,
|
||||
): string {
|
||||
const id = entry.id.startsWith("@") ? entry.id.slice(1) : entry.id;
|
||||
const [owner, name] = id.split("/");
|
||||
const parts = id.split("/");
|
||||
// 单段 id(历史数据未补 owner 前缀):统一按 pineagents/<id> 处理,避免 owner/undefined
|
||||
const owner = parts[0] || "pineagents";
|
||||
const name = parts[1] || parts[0];
|
||||
// 云超服市场源:下载指向本端代理(带登录态转发到 server-core bundle)。
|
||||
if (source === "pineagents") {
|
||||
return getApiUrl(`/plugins/market/download/${owner}/${name}`);
|
||||
|
||||
Reference in New Issue
Block a user