顶栏、账户菜单、命令面板、画布余额和 /wallet 回跳都打开同一积分中心弹窗,支付结果不再跳进整页超市。 Co-authored-by: Cursor <cursoragent@cursor.com>
12 lines
441 B
TypeScript
12 lines
441 B
TypeScript
export const WORKSPACE_WALLET_OPEN_EVENT = "wallet:open";
|
|
|
|
export type WorkspaceWalletOpenDetail = {
|
|
paymentOrderId?: string;
|
|
paymentInvalid?: boolean;
|
|
};
|
|
|
|
/** 工作台任意入口打开积分中心弹窗,不再进入独立钱包页。 */
|
|
export function openWorkspaceWallet(detail: WorkspaceWalletOpenDetail = {}) {
|
|
window.dispatchEvent(new CustomEvent<WorkspaceWalletOpenDetail>(WORKSPACE_WALLET_OPEN_EVENT, { detail }));
|
|
}
|