?? 7?? ????? ?? ???? ??? ?? ? ??? ???? ?? ?????? ?? ? ?? ??? ?? ? ???? ??? ?? WeChat? 9?? ?? ?????? ???? ?? ?? ??? ??? ???. .
9?? ?? WeChat ?????? ??? ????.
1. ?? ?? ?????
2.
3.OAuth2.0 ? ?? ?????4. ????? ???? QR ?? ????? ??
5. ?? ?? ?????
6. ?? ??? ?? ????? ????
7. ??? ?? ????? ????
>8. ??? ??? ?????
9. ????? ?? ??? ? ???? ?????
??? ??:
1. ?? ??
?? ??: ?? ?? ?????? ?? ???? ?? ??? ???? ??? ??? ???? ?????. ??? ??: ?3?? WeChat? ????? ??? ?? ?? ??? ??? ? ????. ?? WeChat? ?? ?? ??? ?3??? ????, ?? ?? ?????? ?? ????, ?? ?? ??? ?? ?????, ??? ???? ???? ???? ????? ?? ?????. 2. ?? ??? ????? ?? ??: ?? ??? ?????? ?? ?? ??? ???? ???? ?? ? 12?? ??? ??? ? ????. ???. ??? ???: ???? ?? ??? ???? ?????? ??? ? ?????. ?? ?? ???? ?? ??? ???? ??? ?? ??? ???? ??? ???? ??? ? ?????. ?? ???? ?? ??? ? ? ??? ??? ?? ??? 12?? ??? ?? ????? ???? ???? ?? ? ????. ?? ?? ?? ??? ??? ?? ??? ?????. 3. OAuth 2.0 ? ?? ?? ??: ? ?? ?????? ?? ?? ???? ??? ??? ??? ? ????. ??? ??: ???, QQ? ?? ?? ??? ????. ?? ?? ??? ????? ?? ???? ???? ?????. 4. ????? ???? QR ?? ?? ?? ??: ? ?????? ?? ?? ??? ???? ???? ? ??? QR ??? ?? ? ????. ?? ??? ?? ??? ???? ? QR ??? ??? ??? ? ????. ??? ??: ?? ?? ???? ????? ???? ???? QR ??? ???? ????? ???? ??? ? ? ??? ??? ??? ?????. ?? ???? ???? ??? ??? ? ????. ???? ??? ??? ??? ???? ? ?? ??? ??? ? ? ????. ? ??? ?? ????? ??? ? ????. 5. ???? ??? ?? ?? ?? ??: ? ?????? ?? ?? ??? ???? ???? ?? ? ????. ???? ?? ??? ??? ??. ??? ???: ???? ??? ??? ? ?? ???? ?? ? ????. ??? ?? ???? '?? ?'?? ?? ??? ?? ?????? '5???'???. ???? ??? ??? WeChat ?? ?? ???? ???? ??? ? ????. 6. ?? ??? ?? ?? ?? ??: ? ?????? ?? ?? ??? ???? ???? ???? ???, ??? ??? ?? ??? ??? ?? ? ????. OpenID, ??, ??. ??? ??: ???? ?? ?? ???????. ???? ?? ??? ?? ? ???? ???? ?? ??? ? ??? CRM ?? ???? ??? ? ????. 7. ??? ?? ???? ?? ??: ? ?????? ?? ???? ?? ???? OpenID? ??? ? ????. ??? ??: ???? ???????. ??? ?? ???? ??? ????? ???, ?? ??? ????? ??? ?????. ?? ?? ???? ??? ???? ??? ? ? ????. 8. ??? ??? ????? ?? ??: ??? ?????? ?? ?? ??? ??????? ??? ????? ???? ?? ??? ?? ?? ??? ? ????. ??? ??: ?? ?? LesXiang? "?? ?? ??"? ???? 1,000?? ???? ??? ???? ???? ? ??? ?? ??? ?????? ??? ?????. 1,000??? ?????. ?????? VIP ?????? CRM ?? ??????. 9. ????? ?? ??? ? ???? ?? ??: ? ?????? ?? ?? ??? ??? ? WeChat ??? ????? ??? ????? ????? ? ????. ??? ??: ??? ???? ?? ? ????. ?? ??, ???? ???? WeChat ?? ??? ???? ????? ???? ??? ? ????. ?? ??? ????? ????? ?????. ?? ??? 9?? ?? ?????? ?? ?????. ?? ??? 10??? ??? ??, ?? ??? ????. ?? ??? ?? ??? ?? ?????. ??? ?? ??? ? ?? ???? ?? ???? ? ?? ??? ??? ??? ? ? ?? ???? ???. ??:?? ? :
??? ?? ??? ? Create to WeChat? ?????. ???
public void SetMenu() { dbHome=Factory.FContext.WeiXinDbContext(); var listP = DAL.ListWhere<tb_PersonalMenu, int>(dbHome, a => a.ParentId == 0&& a.State==1, a => a.ID, 3); List<Dictionary<string, object>> list = new List<Dictionary<string, object>>(); foreach (var row in listP) { var listC = DAL.ListWhere<tb_PersonalMenu, int>(dbHome, a => a.ParentId == row.ID && a.State==1, a => a.ID, 5); List<Dictionary<string, object>> list2 = new List<Dictionary<string, object>>(); Dictionary<string, object> dic2m = new Dictionary<string, object>(); Dictionary<string, object> dic1 = new Dictionary<string, object>(); if (listC.Count > 0) { foreach(var row2 in listC) { //2級(jí)菜單內(nèi)容 Dictionary<string, object> dic2c = new Dictionary<string, object>(); dic2c.Add("type", row2.Type.ToString().Replace("1", "click").Replace("2","view")); dic2c.Add("name", row2.Name); if(row2.Type==1) dic2c.Add("key", row2.ID); if (row2.Type ==2) dic2c.Add("url", row2.LinkUrl); list2.Add(dic2c); } //-- //2級(jí)菜單組裝 dic2m.Add("name", row.Name); dic2m.Add("sub_button", JsonHelper.ListDicToJsonVals(list2)); //------ list.Add(dic2m); } else { //1級(jí)菜單 dic1.Add("type", row.Type.ToString().Replace("1", "click").Replace("2", "view")); dic1.Add("name", row.Name); if (row.Type == 1) dic1.Add("key", row.ID); if (row.Type == 2) dic1.Add("url", row.LinkUrl); //---------- list.Add(dic1); } //1級(jí)和2級(jí)裝成list //----------- } string m=JsonHelper.ListDicToJsonVals(list);//將list轉(zhuǎn)成json的值 下面賦值給button //賦值給button Dictionary<string, object> dicAll = new Dictionary<string, object>(); dicAll.Add("button", m); //--------- string jsonResult = JsonHelper.GetJsonStr(dicAll);//將dic轉(zhuǎn)成json //轉(zhuǎn)換出來的 [{},{}]也會(huì)被“”包圍,要去掉“” jsonResult = jsonResult.Replace("\"[", "[").Replace("]\"", "]"); string html = HttpHelper.HttpPost("https"+"://api.weixin.qq.com/cgi-bin/menu/create?access_token="+Common.Config.SystemConfig.access_token+"", jsonResult, Encoding.UTF8); dbHome.Dispose(); Response.Write(JsonHelper.JsonToVal(html, "errmsg")); Response.End(); }
?? ??? ??? ????. json ???? WeChat? ????.
{ "button":[ { "type":"click", "name":"今日歌曲", "key":"V1001_TODAY_MUSIC" }, { "type":"click", "name":"歌手簡(jiǎn)介", "key":"V1001_TODAY_SINGER" }, { "name":"菜單", "sub_button":[ { "type":"view", "name":"搜索", "url":"http://www.soso.com/" }, { "type":"view", "name":"視頻", "url":"http://v.qq.com/" }, { "type":"click", "name":"贊一下我們", "key":"V1001_GOOD" }] }] }
?? ?? WeChat?? ??? ? ? ????.
The ?? ????? ??? ?? ?????. ?? ? ?? ?? ??? ?? ? ?? ???? ?????.
public void DoMenuClick(DbContext dbHome, RMenuClick) mMenuClk)
{
}
?? ??? ???:
//自定義菜單點(diǎn)擊 public void DoMenuClick(DbContext dbHome, RMenuClick mMenuClk) { SText mStxtA = new SText(); mStxtA.ToUserName = mMenuClk.FromUserName; mStxtA.FromUserName = mMenuClk.ToUserName; mStxtA.CreateTime = mMenuClk.CreateTime; int id = 0; mStxtA.Content = "歡迎使用,輸入任意關(guān)鍵字開始體驗(yàn)"; if(int.TryParse(mMenuClk.EventKey,out id)) { var me = DALWei.InfoEntities<tb_PersonalMenu>(dbHome, a => a.ID == id); if(me!=null) mStxtA.Content = "歡迎使用【"+me.Name+"】,介紹、說明、鏈接等等; 也可以是圖文消息"; } Often.ResponseToEnd(DALWei.SendText(mStxtA)); }
??? ?? ?????. ??? ??? ??? ?? ?????. ?? 1 ??? ?? ???? ??? ?? ???? ?? ?? ?? ???? ?????.
????? ???? ?? ????? ?? ????????? ?? ????? ??? ? ????.
? ?? asp.net ?? WeChat ?? ???(8) WeChat 9 ?? ?????, ??? ?? ?? ?? ??? ??? 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)