예제 #1
0
        public JsonResultObject Post()
        {
            var         result     = new JsonResultObject();
            string      jsonStr    = string.Empty;
            string      method     = HttpContext.Current.Request["method"];
            PushService pushServer = new PushService();

            if (string.IsNullOrEmpty(method))
            {
                result.msg = "推送请求失败,缺少必填项:method!";
            }
            else
            {
                switch (method)
                {
                case "jxdyf.push.pushmessage.post":
                    result = pushServer.PushMessage();
                    break;
                }
            }
            HttpContext.Current.Response.Headers.Add("Access-Control-Allow-Origin", "*");
            return(result);
        }