mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交
This commit is contained in:
@@ -13,6 +13,11 @@ const RData = (data:any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export interface NewsContext{
|
||||
state:number,
|
||||
msg:string,
|
||||
data:any,
|
||||
}
|
||||
export interface UserVO{
|
||||
userId:number, //玩家Id
|
||||
userName:string, //玩家名称
|
||||
@@ -25,8 +30,9 @@ export interface UserLoginVO{
|
||||
|
||||
export const API = {
|
||||
|
||||
UserRegister : async () => RData(await http.post(`/user/register`)) as UserVO,
|
||||
UserLogin : async (account:string,password:string) => RData(await http.post(`/user/login`,{userId:account,userPass:password})) as UserLoginVO,
|
||||
UserRegister : async () => RData(await http.post(`/user/register`)) as UserVO, //玩家注册
|
||||
UserLogin : async (account:string,password:string) => RData(await http.post(`/user/login`,{userId:account,userPass:password})) as UserLoginVO, //玩家登录
|
||||
GetPlayerInfo : async () => (await http.get(`/game/player/info`)).data as NewsContext, //获取玩家信息
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user