/** * 用户API */ import { get, post } from './request.uts' /** * 用户登录 */ export func login (username: string, password: string): Promise { return post('/api/user/login', { username, password } as UTSJSONObject) } /** * 用户注册 */ export func register (username: string, password: string): Promise { return post('/api/user/register', { username, password } as UTSJSONObject) } /** * 获取用户信息 */ export func getUserInfo (): Promise { return get('/api/user/info', null) } /** * 上传KYC资料 */ export func uploadKyc (idCardFront: string, idCardBack: string): Promise { return post('/api/user/kyc', { idCardFront, idCardBack } as UTSJSONObject) } /** * 退出登录 */ export func logout (): Promise { return post('/api/user/logout', null) }