Index.cshtml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. @{
  2. ViewData["Title"] = "Index";
  3. Layout = "~/Views/Shared/_Layout.cshtml";
  4. }
  5. @using LotteryWebApp.Languages;
  6. @using LotteryWebApp.Controllers;
  7. @using LotteryWebApp.Common;
  8. @model History_ViewModel
  9. <div class="app-content content" style="position:relative">
  10. <div class="card-title text-center ">
  11. <div class="news-button-header-container" style="text-align: start; margin: 0 10px;">
  12. @await Component.InvokeAsync("SmallHeader", new { title = Lang.history.ToUpper() })
  13. </div>
  14. </div>
  15. <div class="content-wrapper buy-ticket-container">
  16. <div class="content-body">
  17. <section class="flexbox-container">
  18. <div class="wrapper-style-3">
  19. <div class="row tabs-style-3">
  20. <div class="col-4 tab-style-3" style="padding:0px; text-align: center;">
  21. <input type="radio" name="css-tabs" id="tab-style-3-1" class="tab-switch-style-3" @(Model.winType == Constants.NOT_DRAW_CODE ? "checked" : "")>
  22. <label for="tab-style-3-1" class="tab-label-style-3" onclick="actionButton_Click('/History?gameId=@Model.gameId&winType=@Constants.NOT_DRAW_CODE')">
  23. <a class="@(Model.gameId == Constants.GameId.Direct4D ? "active-tab" : "")">
  24. @Lang.not_draw
  25. </a>
  26. </label>
  27. </div>
  28. <div class="col-4 tab-style-3" style="padding:0px; text-align: center;">
  29. <input type="radio" name="css-tabs" id="tab-style-3-2" class="tab-switch-style-3" @(Model.winType == Constants.WIN_CODE ? "checked" : "")>
  30. <label for="tab-style-3-2" class="tab-label-style-3" onclick="actionButton_Click('/History?gameId=@Model.gameId&winType=@Constants.WIN_CODE')">
  31. <a class="@(Model.gameId == Constants.GameId.Direct3D ? "active-tab" : "")">@Lang.win</a>
  32. </label>
  33. </div>
  34. <div class="col-4 tab-style-3" style="padding:0px; text-align: center;">
  35. <input type="radio" name="css-tabs" id="tab-style-3-3" class="tab-switch-style-3" @(Model.winType == Constants.DRAWN_CODE ? "checked" : "")>
  36. <label for="tab-style-3-3" class="tab-label-style-3" onclick="actionButton_Click('/History?gameId=@Model.gameId&winType=@Constants.DRAWN_CODE')">
  37. <a class="@(Model.gameId == Constants.GameId.Direct2D ? "active-tab" : "")">@Lang.not_win</a>
  38. </label>
  39. </div>
  40. </div>
  41. </div>
  42. <div class="row tabs-style-2" style=" ">
  43. <a class="col-4 tab-style-2" href="@ViewBag.MyConfig.MyValue/History?gameId=@Constants.GameId.Direct4D&winType=@Model.winType">
  44. @* <input type="radio" id="tab-1" name="tab-group-1" @(Model.gameId == Constants.GameId.Direct4D ? "checked" : "")> *@
  45. <label for="tab-1" class="@(Model.gameId == Constants.GameId.Direct4D ? "tab-label-style-2 active-tab" : "tab-label-style-2")">
  46. <span>
  47. 4D
  48. </span>
  49. </label>
  50. </a>
  51. <a class="col-4 tab-style-2" href="@ViewBag.MyConfig.MyValue/History?gameId=@Constants.GameId.Direct3D&winType=@Model.winType">
  52. @* <input type="radio" id="tab-2" name="tab-group-1" @(Model.gameId == Constants.GameId.Direct3D ? "checked" : "")> *@
  53. <label for="tab-2" class="@(Model.gameId == Constants.GameId.Direct3D ? "tab-label-style-2 active-tab" : "tab-label-style-2")">
  54. <span>
  55. 3D
  56. </span>
  57. </label>
  58. </a>
  59. <a class="col-4 tab-style-2" href="@ViewBag.MyConfig.MyValue/History?gameId=@Constants.GameId.Direct2D&winType=@Model.winType">
  60. @* <input type="radio" id="tab-3" name="tab-group-1" @(Model.gameId == Constants.GameId.Direct2D ? "checked" : "")> *@
  61. <label for="tab-2" class="@(Model.gameId == Constants.GameId.Direct2D ? "tab-label-style-2 active-tab" : "tab-label-style-2")">
  62. <span>
  63. 2D
  64. </span>
  65. </label>
  66. </a>
  67. </div>
  68. <div id="user-ticket-data">
  69. </div>
  70. <script>
  71. var countPage = 1;
  72. getUserTicketData('@Model.winType', '@Model.gameId', countPage);
  73. $(window).scroll(function() {
  74. if ($(window).scrollTop() == $(document).height() - $(window).height()) {
  75. // ajax call get data from server and append to the div
  76. console.log("next " + countPage);
  77. getUserTicketData('@Model.winType', '@Model.gameId', ++countPage);
  78. }
  79. });
  80. </script>
  81. </section>
  82. </div>
  83. </div>
  84. </div>
  85. <script>
  86. stopLoading();
  87. </script>