public JsonResult SendCode(string phone) { return(ExceptionCatch.WechatInvoke(() => { UserService.Instance.SendSmsCode(phone); }, "发送成功")); }
public JsonResult Login(string userName, string password) { return(ExceptionCatch.WechatInvoke(() => { UserService.Instance.CustomerLogin(userName, password); })); }
public JsonResult UpdateUserPhone(int id, string phone, string code) { return(ExceptionCatch.WechatInvoke(() => UserService.Instance.UpdateUserByWechat(new UserDto() { Id = id, Phone = phone, Code = code }))); }
public JsonResult UpdateUser(int id, string nickName, string phone, string iconUrl) { return(ExceptionCatch.WechatInvoke(() => UserService.Instance.UpdateUserByWechat(new UserDto() { Id = id, NickName = nickName, Phone = phone, IconUrl = iconUrl }))); }
public JsonResult BuyPromote(int promoteId) { return(ExceptionCatch.WechatInvoke(() => { PromoteService.Instance.BuyPromote(promoteId); })); }
public JsonResult Register(string phone, string password, string code) { var user = new UserDto() { Phone = phone, Password = password, Code = code, IsAdmin = false }; return(ExceptionCatch.WechatInvoke(() => { UserService.Instance.AddUser(user); }, "注册成功")); }
public JsonResult AddGame(int matchId, string content, string raceType, string result, int level, int price) { var dto = new PromoteDto() { MatchId = matchId, Content = content, State = PromoteStateEnum.未开始.ToString(), SendType = SendTypeEnum.短信.ToString(), RaceType = raceType, Result = result, Level = level, Integral = price, PromoteType = 2 }; return(ExceptionCatch.WechatInvoke(() => { PromoteService.Instance.AddPromote(dto); })); }
public JsonResult AddOrder(string qty, string contactor, string mobile, string doorplate, string postCode, long goodsId, string size) { var order = new OrderDto() { ContactPhone = mobile, Quantity = qty, Address = doorplate, Receiver = contactor, PostCode = postCode, GoodsId = goodsId, Size = size }; return(ExceptionCatch.WechatInvoke(() => { OrderService.Instance.AddOrder(order); }, "兑换成功")); return(Json(new WechatResponse() { data = "兑换成功" }, JsonRequestBehavior.AllowGet)); }
public JsonResult Logout() { return(ExceptionCatch.WechatInvoke(() => UserService.Instance.CustomerLogout())); }