Exemplo n.º 1
0
        public object AnalyseOrder([FromBody] AnalyseOrderModel am)
        {
            try
            {
                var addr = Server.GetUserIp(Request.HttpContext);
                if (Server.IpHandle(addr) == 0)
                {
                    return(new[] { "your ip can't using our api , please contact administrator" });
                }

                var account = HttpContext.Session.GetString("user_account");

//                if (account == null)
//                {
//                    return new
//                    {
//                        result = 401 ,
//                        msg = "not login"
//                    };
//                }
//
                var re = OrderServer.AnalyseOrder(am);

                return(re);
            }
            catch (Exception e)
            {
                return(new
                {
                    result = e.HResult,
                    msg = e.Message
                });
            }
        }