'use server' import {callByUser, callPublic} from '@/actions/base' export async function RechargePrepare(props: { amount: string platform: number method: number }) { return callByUser<{ trade_no: string pay_url: string }>('/api/user/recharge/prepare', props) } export async function RechargeComplete(props: { trade_no: string }) { return callByUser('/api/user/recharge/complete', props) } 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) } 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) }