This commit is contained in:
Putoo
2026-06-16 18:30:53 +08:00
parent 5d4b5c989a
commit 5cd6151b96
14 changed files with 413 additions and 57 deletions

View File

@@ -24,7 +24,7 @@ public class BagController : ControllerBase
_equService = equService;
_accService = accService;
}
/// <summary>
/// 获取背包信息
/// </summary>
@@ -33,7 +33,6 @@ public class BagController : ControllerBase
public async Task<IPoAction> GetUserBagData()
{
string userId = StateHelper.userId;
var accInfo = await _accService.GetUserAccInfo(userId);
long gold = (long)accInfo.gold;
long cowry = (long)accInfo.cowry;
@@ -76,13 +75,13 @@ public class BagController : ControllerBase
}
var data = await _equService.GetUserEquData(userId, _t, query, page, 10, total);
return PoAction.Ok(new { data, total.Value });
return PoAction.Ok(new { data, total = total.Value});
}
else if (type == 1)
{
List<string> code = new List<string>() { nameof(GoodsEnum.Code.Drug) };
var data = await _goodsService.GetUserGoodsData(userId, code, new List<string>(), query, page, 10, total);
return PoAction.Ok(new { data, total.Value });
return PoAction.Ok(new { data, total = total.Value });
}
else if (type == 2)
{
@@ -120,11 +119,11 @@ public class BagController : ControllerBase
}
var data = await _goodsService.GetUserGoodsData(userId, code, noCode, query, page, 10, total);
return PoAction.Ok(new { data, total.Value });
return PoAction.Ok(new { data, total = total.Value });
}
else
{
return PoAction.Ok(new { data = new List<string>(), total.Value });
return PoAction.Ok(new { data = new List<string>(), total = total.Value });
}
}
}