Ejemplo n.º 1
0
 public static NavigationUrls Instance()
 {
     if (_instance == null)
     {
         lock (lockObject)
         {
             if (_instance == null)
             {
                 _instance = new NavigationUrls();
             }
         }
     }
     return(_instance);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 后台登录页
        /// </summary>
        /// <returns></returns>
        public string ManageLogin()
        {
            HttpContext httpContext = HttpContextCore.Current;
            string      rawUrl      = $"{httpContext.Request.Host}{httpContext.Request.Path}{httpContext.Request.QueryString}";
            string      returnUrl   = NavigationUrls.ExtractQueryParams(rawUrl)["ReturnUrl"];

            if (string.IsNullOrWhiteSpace(returnUrl))
            {
                returnUrl = WebUtility.UrlEncode(rawUrl);
            }
            return(CachedUrlHelper.Action("ManageLogin", "System", "System", new RouteValueDictionary()
            {
                { "ReturnUrl", returnUrl }
            }));
        }