using PageAdmin.BLL;
using PageAdmin.Utils;
using PageAdmin.Web.Filter;
using System.Web.Mvc;

namespace PageAdmin.Web.Areas.Member.Controllers
{
    public class DefaultController : BaseController
    {


        [HttpGet]
        [Default]
        public ActionResult Index()
        {
            return View();
        }


        /// <summary>
        ///会员中心首页
        /// </summary>
        /// <returns></returns>
        [CurrentUserInfo]
        [HttpGet]
        [Home]
        public ActionResult Home()
        {
            return View();
        }


        [AjaxOnly]
        [HttpGet]
        public JsonResult GetWebNotice()
        {
            int number = StringHelper.Format<int>(Request.QueryString["number"]);
            if (number == 0)
            {
                number = 8;
            }
            NoticeBLL noticeBLL = new NoticeBLL();
            return Json(noticeBLL.GetMemberNotice(number));
        }

        [HttpGet]
        public ActionResult Exit()
        {
            LoginingUseBLL loginUserBll = new LoginingUseBLL();
            loginUserBll.Exit();
            return RedirectToAction("Index","Login");
        }
    }
}
