WeChat ??????? ????? ??? ?? ???? Information Express? ????? ???? ????. ?? ???? ???? ???? ????? ??? ?? ? WeChat ?? ??? ?? ???? ??? ?? ??? ??? ?????. ??? ??. ? ??? ????? WeChat? ?? ?? ????? ?? ?? ??? ??? ???? ????? ???? ?? ??? ?? ?? ????? ??? ? ??? ????. ? ???? ?? ?? ?? "C# WeChat ?? ? ?????? ??(1) - WeChat ????? ?? ??"? ???? ???? ??? ???? WeChat ??? ?? ? ?? ????? ?????.
1. WeChat? ??? ?? ????
WeChat? ??? ??? ???? ???? ?? ??? ???? ????, ???? ??? ??? ?? ????? ??????? ????? ?? ?? ????. ??? ??? ??????.
WeChat? ??? ???? ???? ????? ?? ??? ??? ?????? ?? ??? ??, ??? ??? ??, ?? ??? ??, ??? ?? ?? ?? ??? ???. ???? ?? ?? ??? ?? ?? ??? ?? ?? ??? ?? ???????, ??? ??? ??? ??? ??? ??? ?????.
??? ??? ??? ?? ???? ??? ? ?? ??? ?? ?? ??? ??? ? WeChat ?? ???? ???? ???? ???.
?? ????? WeChat ??? ??? ?? ??? ???? ?? ??? ??????.
????????public?void?ProcessRequest(HttpContext?context) ????????{????????????//WHC.Framework.Commons.LogTextHelper.Info("測試記錄"); ????????????string?postString?=?string.Empty;???????????? ????????????if?(HttpContext.Current.Request.HttpMethod.ToUpper()?==?"POST") ????????????{????????????????using?(Stream?stream?=?HttpContext.Current.Request.InputStream) ????????????????{ ????????????????????Byte[]?postBytes?=?new?Byte[stream.Length]; ????????????????????stream.Read(postBytes,?0,?(Int32)stream.Length); ????????????????????postString?=?Encoding.UTF8.GetString(postBytes); ????????????????}????????????????if?(!string.IsNullOrEmpty(postString)) ????????????????{????????????????????Execute(postString); ????????????????} ????????????}????????????else ????????????{ ????????????????Auth(); ????????????} ????????}
Execute(postString);? ??? ???? ?? ? ??? ???? ??? ?? ?????.
????????///?<summary> ????????///?處理各種請求信息并應答(通過POST的請求)????????///?</summary> ????????///?<param name="postStr">POST方式提交的數(shù)據(jù)</param> ????????private?void?Execute(string?postStr) ????????{????????????WeixinApiDispatch?dispatch?=?new?WeixinApiDispatch(); ????????????string?responseContent?=?dispatch.Execute(postStr); ????????????HttpContext.Current.Response.ContentEncoding?=?Encoding.UTF8; ????????????HttpContext.Current.Response.Write(responseContent); ????????}
inside WeixinApiDispatch? ?? ???? ??? ???? ??? ??? ??? ????? ???? ?? ?? ??????. ??? ?? ?? ?? ??? ??? ?? ???? XML ???? ???? ?????.
???? ?? ?? ??? ?? ??? ????.
? ??? ?? ?????? ??? ?? ???? ?? ??? ?? ??? ?????. ?? ?? ??? ??? ????. ?? ?????? ???????. ??? ??? ? ??? ?????.
????///?<summary> ????///?客戶端請求的數(shù)據(jù)接口????///?</summary> ????public?interface?IWeixinAction ????{????????///?<summary> ????????///?對文本請求信息進行處理????????///?</summary> ????????///?<param name="info">文本信息實體</param> ????????///?<returns></returns> ????????string?HandleText(RequestText?info);????????///?<summary> ????????///?對圖片請求信息進行處理????????///?</summary> ????????///?<param name="info">圖片信息實體</param> ????????///?<returns></returns> ????????string?HandleImage(RequestImage?info); ...........................????????///?<summary> ????????///?對訂閱請求事件進行處理????????///?</summary> ????????///?<param name="info">訂閱請求事件信息實體</param> ????????///?<returns></returns> ????????string?HandleEventSubscribe(RequestEventSubscribe?info);????????///?<summary> ????????///?對菜單單擊請求事件進行處理????????///?</summary> ????????///?<param name="info">菜單單擊請求事件信息實體</param> ????????///?<returns></returns> ????????string?HandleEventClick(RequestEventClick?info); .............................. ????}
? ???? ? ? ??? ??? ???? ??? ??? ??? ???? ??? ?? ??? ?????(??: ??? ???? ???? ??? ??? ?? ?????. ?? WeChat ??? ??? ???? ????). ??? ??? ??? ???? ? ?? ?????. ?? ?? ??? ??? ?? ???? ??? ???? ????. ??? ??? ??? ???? WeChat ?????? ??? ???? ???? ??????. ?? ??? ???? ???? ??? ?? ??? ?? ???, ? ?? ??? ??? ????.
2. WeChat? ?? ?????
? ??? ??? WeChat ???? ??? ??? ??? ??? ?? ????? ???. ?? ?? ??? ??? WeChat ??? ??? ??? ?? ?? ??? ????? WeChat ?? ??????? ???, ?? ??? ?????? ?? ?? ??? ?? ?? ??? ?? ??? ??? ? ??? ?????. ? ???? ??? ????.
WeChat? ?? ??? ??? ? ??? ??? ???? BaseMessage ??? ?????? ?????(????? ?? ??? ????? ???? ??? ???? ?? ?? ????? ???), ? ??? ??? ????
????? ?? ????? ???? ?? ???? ?? ???? ??? ??????.
?? ???? ??? ??? ????.
??? ???? ??? ? ??, ?? ?? ???? ??? ? ?? ?? ???? ??? ?? ??? ????. , ????? ???? ??? ??? ????.
WeChat ?? ? ??????? ? ?? C# ??? ?? (2)--WeChat ??? ?? ? ?? ?? ??? PHP ??? ????? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)