diff --git a/AxibugEmuOnline.Web/Controllers/ApiController.cs b/AxibugEmuOnline.Web/Controllers/ApiController.cs index b35c20f..a9c3b7c 100644 --- a/AxibugEmuOnline.Web/Controllers/ApiController.cs +++ b/AxibugEmuOnline.Web/Controllers/ApiController.cs @@ -66,10 +66,12 @@ namespace AxibugEmuOnline.Web.Controllers // 执行查询并处理结果 using (var reader = command.ExecuteReader()) { + int orderIndex = Page * PageSize; while (reader.Read()) { resp.gameList.Add(new Resp_RomInfo() { + orderid = orderIndex++, id = reader.GetInt32(0), romName = !reader.IsDBNull(1) ? reader.GetString(1) : string.Empty, gType = !reader.IsDBNull(2) ? reader.GetString(2) : string.Empty, @@ -125,6 +127,7 @@ namespace AxibugEmuOnline.Web.Controllers public class Resp_RomInfo { + public int orderid { get; set; } public int id { get; set; } public string romName { get; set;} public string gType { get; set; } diff --git a/README_WEBAPI.md b/README_WEBAPI.md index a0c9842..793c50a 100644 --- a/README_WEBAPI.md +++ b/README_WEBAPI.md @@ -24,6 +24,7 @@ Response: "resultAllCount": 6, "gameList": [ { + "orderid": 0, "id": 190, "romName": "鐑鐗╄", "gType": "ACT", @@ -34,6 +35,7 @@ Response: "stars": 0 }, { + "orderid": 1, "id": 460, "romName": "鐑鏃朵唬鍓(鐑閬撲腑璁)", "gType": "ACT", @@ -44,6 +46,7 @@ Response: "stars": 0 }, { + "orderid": 2, "id": 585, "romName": "鐑纭淳", "gType": "ACT", @@ -54,6 +57,7 @@ Response: "stars": 0 }, { + "orderid": 3, "id": 674, "romName": "鐑鐗╄(缇庣増)", "gType": "ACT", @@ -64,6 +68,7 @@ Response: "stars": 0 }, { + "orderid": 4, "id": 826, "romName": "鐑鏃朵唬鍓х編鐗(鐑閬撲腑璁扮編鐗)", "gType": "ACT", @@ -118,6 +123,7 @@ Response: public class Resp_RomInfo { + public int orderid { get; set; } public int id { get; set; } public string romName { get; set;} public string gType { get; set; }