コード例 #1
0
        public ActionResult Mobile()
        {
            var model = new CustomerMobleModel();

            model.CustomerId = this.CustomerId;
            return(View(model));
        }
コード例 #2
0
        public ActionResult Mobile(CustomerMobleModel model)
        {
            var customer = _customerService.GetCustomerId(model.CustomerId);

            if (model.Captcha != customer.VerificationCode)
            {
                model.Result = false;
                model.Error  = "验证码错误";
                return(View(model));
            }
            customer.Mobile = model.Mobile;
            _customerService.UpdateCustomer(customer);
            return(RedirectToAction("Info"));
        }