feat: 新增浏览器插件

This commit is contained in:
2026-08-16 16:45:24 +08:00
parent 2f32d955eb
commit f209d93733
38 changed files with 4727 additions and 0 deletions
@@ -0,0 +1,31 @@
/** 插件侧统一广告费模型(平台无关) */
export type PlatformType = 'pdd' | 'taobao' | 'jd' | 'mock' | 'unknown';
export interface AdvertisingCostItem {
goodsId: string;
feeAmount: number;
metadata?: Record<string, unknown>;
}
/**
* 一次读取/同步批次。
* channelShopId = BI channel_pdd_shop.id(不是 mallId)
* feeDate = Popup 所选日期 YYYY-MM-DD
*/
export interface AdvertisingCostBatch {
platform: PlatformType;
channelShopId: number;
feeDate: string;
items: AdvertisingCostItem[];
source: 'browser-extension';
importedAt: string;
}
export interface PageContext {
url: string;
title: string;
platform: PlatformType;
ready: boolean;
message?: string;
}