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-05-22 14:59:22 +08:00
|
|
|
amount: string
|
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-18 19:05:38 +08:00
|
|
|
}>('/api/user/recharge/prepare', props)
|
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-19 18:21:45 +08:00
|
|
|
return callByUser('/api/user/recharge/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)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function IdentifyCallback(props: {
|
|
|
|
|
id: string
|
|
|
|
|
}) {
|
|
|
|
|
return await callPublic<{
|
|
|
|
|
success: boolean
|
|
|
|
|
message: string
|
|
|
|
|
}>('/api/user/identify/callback', props)
|
|
|
|
|
}
|
2025-04-29 18:47:36 +08:00
|
|
|
|
|
|
|
|
export async function update(props: {
|
|
|
|
|
username: string
|
|
|
|
|
email: string
|
|
|
|
|
contact_qq: string
|
|
|
|
|
contact_wechat: string
|
|
|
|
|
}) {
|
|
|
|
|
return await callByUser('/api/user/update', props)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function updatePassword(props: {
|
|
|
|
|
phone: string
|
|
|
|
|
code: string
|
|
|
|
|
password: string
|
|
|
|
|
}) {
|
|
|
|
|
return await callByUser('/api/user/update/password', props)
|
|
|
|
|
}
|