/// <summary> /// 创建自定义菜单 /// </summary> /// <param name="body">创建内容</param> /// <returns>接口返回值</returns> public void CreateCustomerMenu(string body) { HttpContent content = new StringContent(body); string Url = "https://api.weixin.qq.com/cgi-bin/menu/create?"; string GetResult = ToolKit.PostData(Url + "access_token=" + this.Accesstoken(), content); }
/// <summary> /// 获取二维码Ticket /// </summary> /// <param name="scene_id">场景标识</param> /// <returns>接口返回值</returns> public wx_backdata <wx_ticket> GetQRcodeTicket(int scene_id) { string jsonString = "{\"action_name\": \"QR_LIMIT_SCENE\", \"action_info\": {\"scene\": {\"scene_id\": " + scene_id + "}}}"; HttpContent content = new StringContent(jsonString); string Url = "https://api.weixin.qq.com/cgi-bin/qrcode/create?"; string GetResult = ToolKit.PostData(Url + "access_token=" + this.Accesstoken(), content); return(GetJson <wx_ticket>(GetResult)); }