加入房间,踢人,准备等tcp命令
This commit is contained in:
1 parent
de8dd933e8
commit
06582201fa
101 files changed
+246552
-565
No files matched your search
@@ -11,11 +11,16 @@ namespace Assets.Scripts.Apis
|
||||
{
|
||||
public class GameRoomApi : ApiBase
|
||||
{
|
||||
public JsonResult<object> Add(GameRoomModel record, List<string> fileNames)
|
||||
public async Task<JsonResult<object>> Add(string name,int routeId,string pwd,DateTime startTime,int closeTime,int maxMembers)
|
||||
{
|
||||
var result = Upload("GameRoom/Add", record, fileNames);
|
||||
var jsonResult = JsonConvert.DeserializeObject<JsonResult<object>>(result);
|
||||
return jsonResult;
|
||||
return await PostAsync<JsonResult<object>>($"GameRoom/Add", new {
|
||||
name,
|
||||
routeId,
|
||||
pwd,
|
||||
startTime,
|
||||
closeTime,
|
||||
maxMembers
|
||||
});
|
||||
}
|
||||
|
||||
public async Task<JsonResult<List<GameRoomModel>>> GetList(int pageIndex, int pageSize,int? id = null)
|
||||
@@ -23,9 +28,14 @@ namespace Assets.Scripts.Apis
|
||||
return await GetAsync<JsonResult<List<GameRoomModel>>>($"GameRoom/GetList?pageIndex={pageIndex}&pageSize={pageSize}&id={id}");
|
||||
}
|
||||
|
||||
public async Task<JsonResult<JObject>> GetDetail(int id)
|
||||
public JsonResult<GameRoomModel> GetDetail(int id)
|
||||
{
|
||||
return await GetAsync<JsonResult<JObject>>($"GameRoom/GetDetail?Id={id}");
|
||||
return Get<JsonResult<GameRoomModel>>($"GameRoom/GetDetail?Id={id}");
|
||||
}
|
||||
|
||||
public async Task<JsonResult<JObject>> ConfirmRoomPwd(int id,string pwd)
|
||||
{
|
||||
return await GetAsync<JsonResult<JObject>>($"GameRoom/ConfirmRoomPwd?id={id}&pwd={pwd}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ namespace Assets.Scripts.Apis.Models
|
||||
public int MaxMembers { get; set; }
|
||||
public int UserId { get; set; }
|
||||
public string NickName { get; set; }
|
||||
public string Phone { get; set; }
|
||||
public int Status { get; set; }
|
||||
public string WxHeadImg { get; set; }
|
||||
public string MapRouteName { get; set; }
|
||||
@@ -25,5 +26,13 @@ namespace Assets.Scripts.Apis.Models
|
||||
public double AverageGrade { get; set; }
|
||||
public double Distance { get; set; }
|
||||
public double TotalClimb { get; set; }
|
||||
//视频文件名
|
||||
public string FileName { get; set; }
|
||||
public int MapRouteId { get; set; }
|
||||
//详情
|
||||
public string BestNickName { get; set; }
|
||||
public string BestWxHeadImg { get; set; }
|
||||
public string BestTotalTime { get; set; }
|
||||
public string FileUrl { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user