91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 7KB
    文件類型: .cs
    金幣: 1
    下載: 0 次
    發布日期: 2021-05-06
  • 語言: C#
  • 標簽: 微信海報??

資源簡介

C#微信開發,生成待參二維碼合成海報

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.Drawing;
using?System.Drawing.Drawing2D;
using?System.Linq;
using?System.Web;
using?System.xml;
using?Ailend.Distribution.Www.BIZ;
using?Ailend.Distribution.Www.Utils;
using?Newtonsoft.Json;

///?
///?PtxmlToCode?的摘要說明
///?

public?class?PtxmlToCode
{
public?PtxmlToCode()
{
//
//?TODO:?在此處添加構造函數邏輯
//
}
???Ailend_PubNumject>?keywork?=?new?Ailend_PubNumject>();
????????public?string?repsponContent(string?Tid?xmlDocument?xmldoc)
????????{
????????????string?respontext?=?““;
????????????xmlNode?ToUserName?=?xmldoc.SelectSingleNode(“/xml/ToUserName“);
????????????xmlNode?FromUserName?=?xmldoc.SelectSingleNode(“/xml/FromUserName“);
????????????string?accesstoken?=?keywork.GetAccessTokenByTid(Tid?““?““);

????????????string?postdata?=?“{????\“touser\“:\““?+?FromUserName.InnerText?+?“\“????\“msgtype\“:\“text\“????\“text\“:????{?????????\“content\“:\“正在為您生成個性海報!\“????}}“;
????????????string?sws?=?PtxmlToRequest.GetPage(“https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=“?+?accesstoken?+?““?postdata);?//吊起客服?發送等待消息
????????????var?swsresult?=?JsonConvert.DeserializeobjectlGetTicet>(sws);
????????????if?(swsresult.errcode?==?42001?||?swsresult.errcode?==?40014?||?swsresult.errcode?==?40001)
????????????{
????????????????accesstoken?=?PtxmlToGetback.regetAccess_token(Tid);//從新獲取Access_Token
????????????????sws?=?PtxmlToRequest.GetPage(“https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=“?+?accesstoken?+?““?postdata);
????????????}
????????????string?userid?=?keywork.GetMyOwnId(FromUserName.InnerText?Tid);
????????????string?postData?=?“{\“expire_seconds\“:?2591000?\“action_name\“:?\“QR_SCENE\“?\“action_info\“:?{\“scene\“:?{\“scene_id\“:\““?+?userid?+?“\“}}}“;
????????????string?content?=?PtxmlToRequest.GetPage(“https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=“?+?accesstoken?+?““?postData);
????????????var?ss?=?JsonConvert.DeserializeobjectlGetTicet>(content);
????????????if?(ss.errcode?==?42001?||?ss.errcode?==?40014?||?ss.errcode?==?40001)
????????????{
????????????????accesstoken?=?PtxmlToGetback.regetAccess_token(Tid);//從新獲取Access_Token
????????????????content?=?PtxmlToRequest.GetPage(“https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=“?+?accesstoken?+?““?postData);
????????????????ss?=?JsonConvert.DeserializeobjectlGetTicet>(content);
????????????}
????????????string?ticket?=?HttpUtility.UrlEncode(ss.ticket);?//獲取到帶參二維碼Ticket?openId
????????????string?imagename?=?DateTime.Now.ToString(“yyMMddhhmmss“);
????????????PtxmlToRequest.GetAndCreatePic(“https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=“?+?ticket?+?““?HttpContext.Current.Server.MapPath(“.“)?+?“\\piccode\\“?+?imagename?+?“.jpg“);??//獲取二維碼圖片??????

????????????EnxmlToFans?codeclass?=?GetFansUserData(accesstoken?FromUserName.InnerText?Tid);??//獲取粉絲基本信息???

???????????

評論

共有 條評論

相關資源