forked from powerfun/udpservice
对战
This commit is contained in:
1 parent
81409dca9e
commit
d77ed1bad1
13 files changed
+817
-47
No files matched your search
+34
-1
@@ -1,7 +1,7 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
using OnlineUserPool.Model;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
@@ -34,5 +34,38 @@ namespace OnlineUserPool.Api
|
||||
}
|
||||
return GetAsync<JsonResult<List<MapRouteAndUserQueryVM>>>($"MapRecord/GetRandomRankingUserRecord?top={ top }&routeIds={ routeIdsStr }").ConfigureAwait(false).GetAwaiter().GetResult().data;
|
||||
}
|
||||
|
||||
public static List<RoomModel> GetGameRoomList(int pageIndex,int pageSize)
|
||||
{
|
||||
return GetAsync<JsonResult<List<RoomModel>>>($"GameRoom/GetList?pageIndex={ pageIndex }&pageSize={ pageSize }").ConfigureAwait(false).GetAwaiter().GetResult().data;
|
||||
}
|
||||
|
||||
public static void DeleteGameRoom(int id)
|
||||
{
|
||||
var result = PostAsync<JsonResult>($"GameRoom/Delete", new {id}).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public static void AddGameRoom(int roomId, int status,int userId,string name, int routeId, string pwd, DateTime startTime, int closeTime, int maxMembers)
|
||||
{
|
||||
var result = PostAsync<JsonResult>($"Admin/GameRoom/Add", new {
|
||||
status,
|
||||
userId,
|
||||
name,
|
||||
routeId,
|
||||
pwd,
|
||||
startTime,
|
||||
closeTime,
|
||||
maxMembers
|
||||
}).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public static void UpdateGameRoom(int roomId, int status)
|
||||
{
|
||||
var result = PostAsync<JsonResult>($"Admin/GameRoom/Update", new
|
||||
{
|
||||
roomId,
|
||||
status
|
||||
}).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user