Index.cshtml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. @{
  2. ViewData["Title"] = "Home Page";
  3. }
  4. @using LotteryWebApp.Languages;
  5. @using LotteryWebApp.Controllers;
  6. @using LotteryWebApp.Common;
  7. @model HomeIndex_ViewModel
  8. @*@{
  9. if (Model.uuid != null)
  10. {
  11. // nhan dien thue bao
  12. <script>
  13. console.log("nhan dien thue bao");
  14. var formData = new FormData();
  15. formData.append('uuid', '@Model.uuid');
  16. let url = '@Constants.URL_GET_MSISDN';
  17. startLoading();
  18. $.ajax({
  19. type: "POST",
  20. url: url,
  21. processData: false,
  22. contentType: false,
  23. datatype: "jsonp",
  24. data: formData,
  25. success: function (data) {
  26. console.log("res: " + data);
  27. if (data.code == "200") {
  28. let errorCode = data.errorCode;
  29. if (errorCode == "200") {
  30. msisdnAuto = data.data.msisdn;
  31. console.log("msisdnAuto: " + msisdnAuto);
  32. window.location.href = '@Model.subDomain' + "/Home?phoneNumber=" + msisdnAuto;
  33. }
  34. }
  35. stopLoading();
  36. },
  37. failure: function (data) {
  38. console.log("failure: " + data.responseText);
  39. window.location.href = '@Model.subDomain' + "/Account/Login";
  40. stopLoading();
  41. },
  42. error: function (data) {
  43. console.log("error: " + data.responseText);
  44. window.location.href = '@Model.subDomain' + "/Account/Login";
  45. stopLoading();
  46. }
  47. });
  48. console.log("nhan dien thue bao done");
  49. </script>
  50. }
  51. else
  52. {*@
  53. <div class="app-content content">
  54. <div class="">
  55. <div class="content-body">
  56. <section class="flexbox-container">
  57. <div class="align-items-center justify-content-center">
  58. <div>
  59. @await Component.InvokeAsync("HeaderHome", new {profile=Model.profile, userStatus = Model.userStatus })
  60. </div>
  61. <div class="row tabs-style" style=" margin-top: 30px;">
  62. <div class="col-4 tab-style">
  63. <input type="radio" id="tab-1" name="tab-group-1" @(Model.termType == Constants.NEW_YORK_BOLET_CODE ? "checked" : "")>
  64. <label for="tab-1">
  65. <a style="font-size: 12px;" href="@ViewBag.MyConfig.MyValue/Home?termType=@Constants.NEW_YORK_BOLET_CODE"
  66. class="@(Model.termType == Constants.NEW_YORK_BOLET_CODE ? "active-tab" : "")">
  67. <img style="height: 30px;" src="~/img/logo-deebef36ed9bb3f8e07e8492eecbb7ae (1) 1.png" />
  68. NEW YORK
  69. </a>
  70. </label>
  71. </div>
  72. <div class="col-4 tab-style">
  73. <input type="radio" id="tab-2" name="tab-group-1" @(Model.termType == Constants.FLORIDA_BOLET_CODE ? "checked" : "")>
  74. <label for="tab-2">
  75. <a style="font-size: 12px;" href="@ViewBag.MyConfig.MyValue/Home?termType=@Constants.FLORIDA_BOLET_CODE"
  76. class="@(Model.termType == Constants.FLORIDA_BOLET_CODE ? "active-tab" : "")">
  77. <img style="height: 30px;" src="~/img/siteLogo 2.png" />
  78. FLORIDA
  79. </a>
  80. </label>
  81. </div>
  82. <div class="col-4 tab-style">
  83. <input type="radio" id="tab-2" name="tab-group-1" @(Model.termType == Constants.BOULCHANS_CODE ? "checked" : "")>
  84. <label for="tab-2">
  85. <a style="font-size: 12px;" href="@ViewBag.MyConfig.MyValue/Home?termType=@Constants.BOULCHANS_CODE"
  86. class="@(Model.termType == Constants.BOULCHANS_CODE ? "active-tab" : "")">
  87. @*<img style="height: 30px;" src="~/img/siteLogo 2.png" />*@
  88. BOULCHANS
  89. </a>
  90. </label>
  91. </div>
  92. </div>
  93. <hr class="line2" style="border-top: 15px solid rgba(0,0,0,.1);" />
  94. @*see more*@
  95. <div class="button-end">
  96. <a class="text-main-color" href="@ViewBag.MyConfig.MyValue/BuyTicket?termType=@Model.termType">@Lang.see_more</a> <i class="fas fa-solid fa-angle-right"></i>
  97. </div>
  98. <div id="term-result-data">
  99. </div>
  100. <script>
  101. getResultTermData(@Model.termType);
  102. </script>
  103. </div>
  104. </section>
  105. </div>
  106. </div>
  107. </div>
  108. @*}*@
  109. @*}*@
  110. <div>
  111. @await Component.InvokeAsync("AdvertiseArea", new { listTerm = Model.listTerm})
  112. </div>
  113. <script>
  114. stopLoading();
  115. </script>