This commit is contained in:
DESKTOP-5RP3AKU\Jisol
2023-11-09 04:22:04 +08:00
parent 487219e6aa
commit ebf99de47a
34 changed files with 974 additions and 32 deletions

View File

@@ -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, //获取玩家信息
}