You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
/**
* 用户接口
*
* 因为 Mini-12306 不存在查看其他用户详情的交互
* 故不需要区分 auth 和 user
*/
const apiAuth = {
/**
* 用户新增(注册)
*/
add : ( params ) => {
return uni . $u . http . post ( "/register" , {
account : params . account , // 用户名
password : params . password , // 密码
name : params . name , // 姓名
idCardNo : params . idCardNo ,
mobileNo : params . mobileNo ,
mobileCode : params . mobileCode ,
bankCard : params . bankCardNo ,
} ) ;
} ,
/**
* 用户更新
*/
update : ( ) => { } ,
/**
* 用户删除
*/
delete : ( ) => { } ,
/**
* 用户详情
* 正常是通过用户id获取用户信息, 这里没有其他用户,
* 故改为通过 auth-token 获取 auth 信息
*/
detail : ( ) => {
return uni . $u . http . get ( "/auth" ) ;
} ,
/**
* 用户列表
*/
get : ( ) => { } ,
/**
* 用户登录
*/
login : ( params ) => {
return uni . $u . http . post ( "/login" , {
account : params . account , // 用户名
password : params . password , // 密码
} ) ;
} ,
} ;
export default apiAuth ;