功能模块: - 用户注册/登录/KYC - 资金账户/交易账户 - 实时行情/币种管理 - 即时交易/充提审核 - 管理后台 技术栈: - 后端: SpringBoot 2.2.4 + MyBatis Plus - 前端: uni-app x (Vue3 + UTS) - 数据库: MySQL Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
40 lines
818 B
Plaintext
40 lines
818 B
Plaintext
/**
|
|
* 用户API
|
|
*/
|
|
import { get, post } from './request.uts'
|
|
|
|
/**
|
|
* 用户登录
|
|
*/
|
|
export func login (username: string, password: string): Promise<any> {
|
|
return post('/api/user/login', { username, password } as UTSJSONObject)
|
|
}
|
|
|
|
/**
|
|
* 用户注册
|
|
*/
|
|
export func register (username: string, password: string): Promise<any> {
|
|
return post('/api/user/register', { username, password } as UTSJSONObject)
|
|
}
|
|
|
|
/**
|
|
* 获取用户信息
|
|
*/
|
|
export func getUserInfo (): Promise<any> {
|
|
return get('/api/user/info', null)
|
|
}
|
|
|
|
/**
|
|
* 上传KYC资料
|
|
*/
|
|
export func uploadKyc (idCardFront: string, idCardBack: string): Promise<any> {
|
|
return post('/api/user/kyc', { idCardFront, idCardBack } as UTSJSONObject)
|
|
}
|
|
|
|
/**
|
|
* 退出登录
|
|
*/
|
|
export func logout (): Promise<any> {
|
|
return post('/api/user/logout', null)
|
|
}
|