feat(desktop-client/wangyihao): harden token capture and draft submit flow
Inject the YiDun guardian client to obtain ursToken without relying on window.neg, fetch the publish detail (wemediaId/onlineState/...) before saving drafts so 100002 "参数错误" stops blocking submit, downgrade markdown tables to paragraph rows like Baijiahao, and surface friendlier errors for token, draft and publish-click failures. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import type { DesktopArticleContent } from "@geo/shared-types";
|
||||
import {
|
||||
prepareBaijiahaoMarkdown,
|
||||
renderTablesAsParagraphRows,
|
||||
} from "../../../../../packages/publisher-platforms/src/baijiahao";
|
||||
|
||||
import { normalizeArticleHtml } from "./common";
|
||||
|
||||
export function prepareWangyihaoArticleHtml(article: DesktopArticleContent): string {
|
||||
return renderTablesAsParagraphRows(
|
||||
normalizeArticleHtml(article, {
|
||||
prepareMarkdown: prepareBaijiahaoMarkdown,
|
||||
}),
|
||||
).trim();
|
||||
}
|
||||
Reference in New Issue
Block a user