fix:提交修复6个问题
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
export type LeaderboardEntry = {
|
||||
rank: number;
|
||||
name: string;
|
||||
role: string;
|
||||
totalStores: number;
|
||||
monthStores: number;
|
||||
};
|
||||
import type { PartnerLeaderboardPeriod, PartnerLeaderboardResponse } from '@dukang/shared-types';
|
||||
import { request } from './api';
|
||||
|
||||
/** preV1:贡献榜 Mock,待 `/partner/dashboard/leaderboard` 接入后替换 */
|
||||
export const LEADERBOARD_MOCK: LeaderboardEntry[] = [
|
||||
{ rank: 1, name: '陈经理', role: '内部员工', totalStores: 45, monthStores: 8 },
|
||||
{ rank: 2, name: '李华', role: '城市合伙人', totalStores: 32, monthStores: 5 },
|
||||
{ rank: 3, name: '王拓', role: '推广员', totalStores: 18, monthStores: 3 },
|
||||
{ rank: 4, name: '赵敏', role: '内部员工', totalStores: 12, monthStores: 2 },
|
||||
];
|
||||
export function fetchPartnerLeaderboard(period: PartnerLeaderboardPeriod = 'total') {
|
||||
return request<PartnerLeaderboardResponse>(
|
||||
'PARTNER_H5',
|
||||
`/partner/dashboard/leaderboard?period=${period}`,
|
||||
);
|
||||
}
|
||||
|
||||
export type { PartnerLeaderboardPeriod, PartnerLeaderboardResponse };
|
||||
export type { PartnerLeaderboardEntry } from '@dukang/shared-types';
|
||||
|
||||
Reference in New Issue
Block a user