Exemplo n.º 1
0
        protected override void OnInit(EventArgs e)
        {
            string PostType = Request["PostType"];

            if (string.IsNullOrEmpty(PostType))
            {
                base.OnInit(e);
                return;
            }

            Common.Helper.mJsonResult json = new Common.Helper.mJsonResult();
            switch (PostType)
            {
            case "getWechatImage":
                GetWechatImage();    //从微信服务器上获取图片
                break;

            default: break;
            }
            if (json != null)
            {
                string retStr = json.ToJson();
                Response.Write(retStr);
                Response.End();
            }
        }
Exemplo n.º 2
0
        public void ProcessRequest(HttpContext context)
        {
            conn = context;

            string PostType = conn.Request["PostType"];

            if (string.IsNullOrEmpty(PostType))
            {
                json.success = false;
                json.msg     = "无效参数";
                conn.Response.Write(json.ToJson());
                conn.Response.End();
            }

            ExecPostType(PostType);

            if (json != null)
            {
                conn.Response.Write(json.ToJson());
                conn.Response.End();
            }
        }
Exemplo n.º 3
0
        protected override void OnInit(EventArgs e)
        {
            string PostType = Request["PostType"];
            if (string.IsNullOrEmpty(PostType))
            {
                base.OnInit(e);
                return;
            }

            Common.Helper.mJsonResult json = new Common.Helper.mJsonResult();
            switch(PostType)
            {
                case "getWechatImage":
                    GetWechatImage();//从微信服务器上获取图片
                    break;
                default: break;
            }
            if(json!=null)
            {
                string retStr = json.ToJson();
                Response.Write(retStr);
                Response.End();
            }
        }