Ejemplo n.º 1
0
 public JsonResult SendCode(string phone)
 {
     return(ExceptionCatch.WechatInvoke(() =>
     {
         UserService.Instance.SendSmsCode(phone);
     }, "发送成功"));
 }
Ejemplo n.º 2
0
 public JsonResult Login(string userName, string password)
 {
     return(ExceptionCatch.WechatInvoke(() =>
     {
         UserService.Instance.CustomerLogin(userName, password);
     }));
 }
Ejemplo n.º 3
0
 public JsonResult UpdateUserPhone(int id, string phone, string code)
 {
     return(ExceptionCatch.WechatInvoke(() => UserService.Instance.UpdateUserByWechat(new UserDto()
     {
         Id = id, Phone = phone, Code = code
     })));
 }
Ejemplo n.º 4
0
 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);
     }));
 }
Ejemplo n.º 6
0
        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);
            }));
        }
Ejemplo n.º 8
0
        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));
        }
Ejemplo n.º 9
0
 public JsonResult Logout()
 {
     return(ExceptionCatch.WechatInvoke(() => UserService.Instance.CustomerLogout()));
 }