| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- @{
- ViewData["Title"] = "Home Page";
- }
- @using LotteryWebApp.Languages;
- @using LotteryWebApp.Controllers;
- @using LotteryWebApp.Common;
- @model HomeIndex_ViewModel
- @*@{
- if (Model.uuid != null)
- {
- // nhan dien thue bao
- <script>
- console.log("nhan dien thue bao");
- var formData = new FormData();
- formData.append('uuid', '@Model.uuid');
- let url = '@Constants.URL_GET_MSISDN';
- startLoading();
- $.ajax({
- type: "POST",
- url: url,
- processData: false,
- contentType: false,
- datatype: "jsonp",
- data: formData,
- success: function (data) {
- console.log("res: " + data);
- if (data.code == "200") {
- let errorCode = data.errorCode;
- if (errorCode == "200") {
- msisdnAuto = data.data.msisdn;
- console.log("msisdnAuto: " + msisdnAuto);
- window.location.href = '@Model.subDomain' + "/Home?phoneNumber=" + msisdnAuto;
- }
- }
- stopLoading();
- },
- failure: function (data) {
- console.log("failure: " + data.responseText);
- window.location.href = '@Model.subDomain' + "/Account/Login";
- stopLoading();
- },
- error: function (data) {
- console.log("error: " + data.responseText);
- window.location.href = '@Model.subDomain' + "/Account/Login";
- stopLoading();
- }
- });
- console.log("nhan dien thue bao done");
- </script>
- }
- else
- {*@
- <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
- <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
- <div class="app-content content">
- <div class="">
- <div class="content-body">
- <section class="flexbox-container">
- <div class="align-items-center justify-content-center">
- <div>
- @await Component.InvokeAsync("HeaderHome", new { profile = Model.profile, userStatus = Model.userStatus })
- </div>
- <div class="row tabs-style" style="">
- <div col-12>
- <select id="gameTypeSelect" style="width:200px" asp-for="termType" onchange="changeGame()">
- <option value="@Constants.NEW_YORK_BOLET_CODE" data-img="../img/logo-deebef36ed9bb3f8e07e8492eecbb7ae (1) 1.png" >
- NEW YORK
- </option>
- <option value="@Constants.FLORIDA_BOLET_CODE" data-img="../img/siteLogo 2.png">FLORIDA</option>
- <option value="@Constants.BOULCHANS_CODE" data-img="">BOULCHANS</option>
- <option value="@Constants.GEORGIA_BOLET_CODE" data-img="../img/logo/Georgia_Lottery.jpg">GEORGIA</option>
- <option value="@Constants.TEXAS_BOLET_CODE" data-img="../img/logo/logo_tx.png">TEXAS</option>
- <option value="@Constants.TENNESSEE_BOLET_CODE" data-img="../img/logo/TN_Lottery.png">TENNESSEE</option>
- </select>
- </div>
- @* <div class="col-4 tab-style">
- <input type="radio" id="tab-1" name="tab-group-1" @(Model.termType == Constants.NEW_YORK_BOLET_CODE ? "checked" : "")>
- <label for="tab-1">
- <a style="font-size: 12px;" href="@ViewBag.MyConfig.MyValue/Home?termType=@Constants.NEW_YORK_BOLET_CODE"
- class="@(Model.termType == Constants.NEW_YORK_BOLET_CODE ? "active-tab" : "")">
- <img style="height: 30px;" src="~/img/logo-deebef36ed9bb3f8e07e8492eecbb7ae (1) 1.png" />
- NEW YORK
- </a>
- </label>
- </div>
- <div class="col-4 tab-style">
- <input type="radio" id="tab-2" name="tab-group-1" @(Model.termType == Constants.FLORIDA_BOLET_CODE ? "checked" : "")>
- <label for="tab-2">
- <a style="font-size: 12px;" href="@ViewBag.MyConfig.MyValue/Home?termType=@Constants.FLORIDA_BOLET_CODE"
- class="@(Model.termType == Constants.FLORIDA_BOLET_CODE ? "active-tab" : "")">
- <img style="height: 30px;" src="~/img/siteLogo 2.png" />
- FLORIDA
- </a>
- </label>
- </div>
- <div class="col-4 tab-style">
- <input type="radio" id="tab-2" name="tab-group-1" @(Model.termType == Constants.BOULCHANS_CODE ? "checked" : "")>
- <label for="tab-2">
- <a style="font-size: 12px;" href="@ViewBag.MyConfig.MyValue/Home?termType=@Constants.BOULCHANS_CODE"
- class="@(Model.termType == Constants.BOULCHANS_CODE ? "active-tab" : "")">
- BOULCHANS
- </a>
- </label>
- </div> *@
- </div>
- <hr class="line2" style="border-top: 15px solid rgba(0,0,0,.1); margin-top: 0.2rem" />
- @*see more*@
- <div class="button-end">
- <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>
- </div>
- <div id="term-result-data">
- </div>
- <script>
- getResultTermData(@Model.termType);
- </script>
- </div>
- </section>
- </div>
- </div>
- </div>
- @*}*@
- @*}*@
- <div>
- @await Component.InvokeAsync("AdvertiseArea", new { listTerm = Model.listTerm })
- </div>
- <script>
- stopLoading();
- </script>
- <script>
- $('#gameTypeSelect').select2({
- templateResult: formatOption,
- templateSelection: formatOption,
- minimumResultsForSearch: Infinity
- });
- function formatOption (state) {
- if (!state.id) return state.text;
- var img = $(state.element).data('img');
- return $('<span><img src="'+img+'" style="width:30px;height:30px;margin-right:5px"/> '+state.text+'</span>');
- }
- function changeGame() {
- var termType = $("#gameTypeSelect").val();
- location.href = "@ViewBag.MyConfig.MyValue/Home?termType=" + termType;
- }
- </script>
|