using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Nirvana.Common;

namespace Waste.Web.Entry.Pages.Login
{
    public class IndexModel : PageModel
    {
        private readonly IHttpContextAccessor _httpContextAccessor;
        public string Logo = Furion.App.Configuration["CustomSetting:Logo"];
        public string SoftName = Furion.App.Configuration["CustomSetting:SoftName"];
        public string SoftDesc = Furion.App.Configuration["CustomSetting:SoftDesc"];
        public string copyright = Furion.App.Configuration["CustomSetting:copyright"];
        public IndexModel(IHttpContextAccessor httpContextAccessor)
        {
            _httpContextAccessor = httpContextAccessor;
        }
        public void OnGet()
        {
            var host = _httpContextAccessor.HttpContext.Request.Host.Host;
            if(!host.IsEmpty() && host.ToLower() == "w.jt-sky.com")
            {
                Logo = "";
                SoftName = "物联网数字平台";
                SoftDesc = "";
                copyright = "物联网数字平台";
            }
        }
    }
}
