2025-04-18 16:22:50 +08:00
|
|
|
'use server'
|
2025-04-26 14:18:08 +08:00
|
|
|
import {callByUser, callPublic} from '@/actions/base'
|
2025-04-18 16:22:50 +08:00
|
|
|
|
2025-06-19 18:21:45 +08:00
|
|
|
export async function RechargePrepare(props: {
|
2025-06-27 10:57:50 +08:00
|
|
|
amount: number
|
2025-06-18 19:05:38 +08:00
|
|
|
platform: number
|
|
|
|
|
method: number
|
2025-04-18 16:22:50 +08:00
|
|
|
}) {
|
|
|
|
|
return callByUser<{
|
|
|
|
|
trade_no: string
|
|
|
|
|
pay_url: string
|
2025-06-27 10:57:50 +08:00
|
|
|
}>('/api/trade/create', {
|
|
|
|
|
platform: props.platform,
|
|
|
|
|
method: props.method,
|
|
|
|
|
type: 2,
|
|
|
|
|
recharge: {
|
|
|
|
|
amount: props.amount,
|
|
|
|
|
},
|
|
|
|
|
})
|
2025-04-18 16:22:50 +08:00
|
|
|
}
|
|
|
|
|
|
2025-06-19 18:21:45 +08:00
|
|
|
export async function RechargeComplete(props: {
|
2025-04-18 16:22:50 +08:00
|
|
|
trade_no: string
|
2025-06-27 10:57:50 +08:00
|
|
|
method: number
|
2025-04-18 16:22:50 +08:00
|
|
|
}) {
|
2025-06-27 10:57:50 +08:00
|
|
|
return callByUser('/api/trade/complete', props)
|
2025-04-18 16:22:50 +08:00
|
|
|
}
|
2025-04-26 14:18:08 +08:00
|
|
|
|
|
|
|
|
export async function Identify(props: {
|
|
|
|
|
type: number
|
|
|
|
|
name: string
|
|
|
|
|
iden_no: string
|
|
|
|
|
}) {
|
|
|
|
|
return await callByUser<{
|
|
|
|
|
identified: boolean
|
|
|
|
|
target: string
|
|
|
|
|
}>('/api/user/identify', props)
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-29 18:47:36 +08:00
|
|
|
export async function update(props: {
|
2026-04-16 14:41:42 +08:00
|
|
|
username?: string
|
|
|
|
|
email?: string
|
|
|
|
|
contact_qq?: string
|
|
|
|
|
contact_wechat?: string
|
2025-04-29 18:47:36 +08:00
|
|
|
}) {
|
|
|
|
|
return await callByUser('/api/user/update', props)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function updatePassword(props: {
|
2026-04-16 14:41:42 +08:00
|
|
|
// phone: string
|
2025-04-29 18:47:36 +08:00
|
|
|
code: string
|
|
|
|
|
password: string
|
|
|
|
|
}) {
|
|
|
|
|
return await callByUser('/api/user/update/password', props)
|
|
|
|
|
}
|