fix(lint): resolve unused vars and any types in apps/web/src/api/points/index.ts

This commit is contained in:
2026-09-15 08:53:04 +08:00
parent d396282fc7
commit c45ef34709
+4 -4
View File
@@ -236,16 +236,16 @@ function genMockTransactions(): PointsTransactionsResponse {
// Rebuild balance_after going forward
let running = 50 + 0 // after registration gift
for (let i = items.length - 1; i >= 0; i--) {
const it: any = items[i]
const it = items[i]
if (it.source === "task_reward" && it.description.includes("注册")) running = 50
}
running = 50
const fwd = [...items].reverse()
for (const it of fwd as any[]) {
for (const it of fwd) {
running += it.signed_amount
it.balance_after = running
}
return { items: fwd as any, total: fwd.length, page: 1, page_size: 20 }
return { items: fwd, total: fwd.length, page: 1, page_size: 20 }
}
// ==================== 真实 API ====================
@@ -285,7 +285,7 @@ export async function createPointsOrder(req: PointsRechargeRequest): Promise<Poi
const pkg = MOCK_PACKAGES.packages.find((p) => p.id === req.package_id)
const mt = MOCK_PACKAGES.user_member_type
const discountKey = `discounted_price_for_${mt}` as const
const price = (pkg as any)?.[discountKey] ?? pkg?.price ?? 0
const price = (pkg as PointsPackage & Record<string, number>)?.[discountKey] ?? pkg?.price ?? 0
return new Promise((r) =>
setTimeout(
() =>