WebHost/Controllers/UsersController.cs

(开头部分) 6KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Domain;
using ViewModel;
using IService;
using Common;

namespace WebUI.Controllers
{
    public class UsersController : Controller
    {
        #region 属性对象定义
        public IUsersService usersService { get; set; }
        public IUserRoleService userRoleService { get; set; }
        public IShopServer shopServer { get; set; }
        Newtonsoft.Json.Converters.IsoDateTimeConverter timeConverter = new Newtonsoft.Json.Converters.IsoDateTimeConverter();
        public List<SelectListItem> CategoryList = typeof(EnumCE.ShelfStatusEM).GetItems();


        public UsersController(IUsersService usersService, IUserRoleService userRoleService, IShopServer shopServer)
        {
            this.usersService = usersService;
            this.userRoleService = userRoleService;
            this.shopServer = shopServer;
        }
        #endregion

        #region 登录/退出
        public ActionResult Login()
        {
            return View();
        }

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult CheckLogin(string userid, string password, string shopid)
        {
            string result = "success";
            var shopUserMdl = usersService.login(userid.Trim(' '), password.Trim(' ').EncryptMd5(), null);
            if (shopUserMdl != null)
            {
                if (shopUserMdl.Status == 1)
                {
                    shopUserMdl.ShopID = shopUserMdl.ShopID;
                    shopUserMdl.ShopName = shopUserMdl.ShopName;
                    shopUserMdl.logo = shopUserMdl.logo;

                    Session[SC.CommonKey.DIANCAN_LOGIN_USER] = shopUserMdl;
                }
                else
                    result = "当前用户已被禁用!";
            }
            else
            {
                result = "用户密码错误,请重新输入!";

            }
            return Content(result);
后面还有 137 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。