更新充值和购买支付宝接口和传参,我的账单列表更新&解决banner拉伸&更新登录的访问令牌

This commit is contained in:
Eamon-meng
2025-06-27 10:57:50 +08:00
parent 570a1ffa65
commit 9057d6c2fc
10 changed files with 127 additions and 366 deletions

View File

@@ -120,6 +120,7 @@ export async function refreshAuth() {
cookie.set('auth_refresh', nextRefreshToken, {
httpOnly: true,
sameSite: 'strict',
maxAge: Number.MAX_SAFE_INTEGER,
})
// 返回新的访问令牌

View File

@@ -10,6 +10,7 @@ export async function listBills(params: {
type?: number
create_after?: Date
create_before?: Date
trade_id?: string
}) {
return await callByUser<PageRecord<Bill>>('/api/bill/list', params)
}

View File

@@ -76,11 +76,21 @@ export async function prepareResource(props: {
return await callByUser<{
trade_no: string
pay_url: string
}>('/api/resource/create/prepare', props)
}>('/api/trade/create', {
platform: props.payment_platform,
method: props.payment_method,
type: 1,
resource: {
type: props.type,
short: props.short,
long: props.long,
},
})
}
export async function completeResource(props: {
trade_no: string
method: number
}) {
return await callByUser('/api/resource/create/complete', props)
return callByUser('/api/trade/complete', props)
}

View File

@@ -2,20 +2,28 @@
import {callByUser, callPublic} from '@/actions/base'
export async function RechargePrepare(props: {
amount: string
amount: number
platform: number
method: number
}) {
return callByUser<{
trade_no: string
pay_url: string
}>('/api/user/recharge/prepare', props)
}>('/api/trade/create', {
platform: props.platform,
method: props.method,
type: 2,
recharge: {
amount: props.amount,
},
})
}
export async function RechargeComplete(props: {
trade_no: string
method: number
}) {
return callByUser('/api/user/recharge/complete', props)
return callByUser('/api/trade/complete', props)
}
export async function Identify(props: {