Ejemplo n.º 1
0
        public ActionResult Register(SHTS.Model.User user)
        {
            var userRegisterViewModel = new UserRegisterViewModel();
            try
            {
                userRegisterViewModel.User = user;
                var errorMsg = string.Empty;
                bool result = false;
                bool vcodeVail = false;
                //取消手机验证逻辑
                //if (Session["vcode"] == null)
                //{
                //    errorMsg = "请先输入手机验证码!";
                //}
                //else if (!string.Equals(Session["vcode"].ToString(),
                //    Request.Form["code"], StringComparison.InvariantCultureIgnoreCase))
                //{
                //    errorMsg = "手机验证码输入错误!";
                //}
                //else
                {
                    vcodeVail = true;
                }
                if (vcodeVail)
                {
                    user.LoginIdentiy = user.UserName;
                    user.Photo = ConfigurationManager.AppSettings["DefaultPhoto"];
                    result = userService.UserRegister(user, out errorMsg);

                    if (result)
                    {
                        //return Redirect("/mobile/account/login");
                        errorMsg = "SUCCESS";
                        CurrentUser = user;
                    }
                }

                userRegisterViewModel.ErrorMsg = errorMsg;

                if (!result)
                {
                    SinglePageService singlePageService = new SinglePageService();
                    userRegisterViewModel.RegNotice = singlePageService.GetSingPageById("94");
                }
            }
            catch (Exception ex)
            {
                LogService.Log("注册用户", ex.ToString());
            }
            return View(userRegisterViewModel);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 会员须知
        /// </summary>
        /// <returns></returns>
        public ActionResult ToVip()
        {
            UserViewModel model = new UserViewModel { UserEntity = UserInfo };
            try
            {
                UserService service = new UserService();
                UserVip vipInfo = service.GetUserVipInfoByUserId(UserInfo.UserId);
                if (vipInfo != null && vipInfo.State.HasValue && vipInfo.State.Value == (int)VipState.VIP)
                {
                    return Redirect(GetUrl("/Wechat/user/VipInfo"));
                }

                SinglePageService singlePageService = new SinglePageService();
                model.ToVipNotice = singlePageService.GetSingPageById("95");
            }
            catch (Exception e)
            {
                LogService.Log("ToVip 出错了!", e.ToString());
            }
            return View(model);
        }
Ejemplo n.º 3
0
 public ActionResult Register()
 {
     var model = new UserRegisterViewModel { User = new User() };
     try
     {
         SinglePageService singlePageService = new SinglePageService();
         model.RegNotice = singlePageService.GetSingPageById("94");
     }
     catch (Exception ex)
     {
         LogService.LogWexin("会员注册", ex.ToString());
     }
     return View(model);
 }
Ejemplo n.º 4
0
        public ActionResult SensitiveWords(string id, string contentStyle)
        {
            string result = "更新失败";

            if (!string.IsNullOrEmpty(id) &&
                !string.IsNullOrEmpty(contentStyle))
            {
                SinglePageService singlePageService = new SinglePageService();
                SinglePage singlePage = singlePageService.GetSingPageById(id);
                if (singlePage != null)
                {
                    singlePage.ContentStyle = contentStyle;
                    if (singlePageService.EditSinglePage(singlePage))
                    {
                        result = "success";
                    }
                }
            }
            else
            {
                result = "必填项不能为空";
            }

            return Content(result);
        }
Ejemplo n.º 5
0
 public ActionResult SensitiveWords(string id)
 {
     SinglePageModel model = new SinglePageModel();
     SinglePageService singlePageService = new SinglePageService();
     model.SinglePage = singlePageService.GetSingPageById(id);
     return View(model);
 }
Ejemplo n.º 6
0
 public ActionResult Register()
 {
     var model = new UserRegisterViewModel { User = new User() };
     try
     {
         SinglePageService singlePageService = new SinglePageService();
         model.RegNotice = singlePageService.GetSingPageById("94");
         if (CurrentWeChatUser.UserId.HasValue && CurrentUser != null)
         {
             model.ErrorMsg = "UserLoggedIn";
         }
     }
     catch (Exception ex)
     {
         LogService.LogWexin("微信会员注册页面访问异常", ex.ToString());
     }
     return View(model);
 }
Ejemplo n.º 7
0
 public ActionResult Register()
 {
     var model = new UserRegisterViewModel { User = new User() };
     try
     {
         SinglePageService singlePageService = new SinglePageService();
         model.RegNotice = singlePageService.GetSingPageById("94");
     }
     catch (Exception)
     {
     }
     return View(model);
 }