增加
This commit is contained in:
29
Web/src/services/login/LoginService.ts
Normal file
29
Web/src/services/login/LoginService.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
export class LoginService {
|
||||
/**
|
||||
* 登录接口
|
||||
* POST /Login/Login
|
||||
* 请求体: 登录请求参数
|
||||
* @param name 登录名/手机号
|
||||
* @param pwd 密码
|
||||
* @param code 验证码
|
||||
*/
|
||||
static async Login(name: string, pwd: string, code: string) {
|
||||
return await ApiService.Request("post", "/Login/Login", { name, pwd, code });
|
||||
}
|
||||
|
||||
/**
|
||||
* 探玩自动登录
|
||||
* GET /Login/TwLogin
|
||||
*/
|
||||
static async TwLogin(code: string) {
|
||||
return await ApiService.Request("get", "/Login/TwLogin", { code });
|
||||
}
|
||||
|
||||
/**
|
||||
* 退出登录
|
||||
* GET /Login/LoginOut
|
||||
*/
|
||||
static async LoginOut(sid: string) {
|
||||
return await ApiService.Request("get", "/Login/LoginOut", { sid });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user