using CommonTools; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WeChatCore.Common; namespace WeChatCore.DefineClass { /// /// Url定义 /// public static class UrlDefine { /// /// Loginurl /// public static string LoginUrls { get; set; } /// /// 唯一对应UUID /// public static string Tickets { get; set; } /// /// 网站主目录 /// public static string RootUrl = "https://wx.qq.com"; /// /// 登录url 返回值:window.QRLogin.code = 200; window.QRLogin.uuid = "Yc4SuTCdqw=="; /// public static string LoginUrl = "https://login.weixin.qq.com/jslogin?appid=wx782c26e4c19acffb&redirect_uri=https%3A%2F%2Flogin.weixin.qq.com%2Fcgi-bin%2Fmmwebwx-bin%2Fwebwxnewloginpage&fun=new&lang=zh_CN&_=1455781223306"; /// /// 获得Token的url(验证码图片) /// public static string LoginUrlWithToken = "https://login.weixin.qq.com/qrcode/"; /// /// 等待Url /// public static string HoldOnUrl = "https://login.wx.qq.com/cgi-bin/mmwebwx-bin/login?loginicon=true&uuid=";// + Tickets + "&tip=0&r=1499867820&_=1497443441656"; /// /// 获取登录地址 /// /// /// public static string WaitingUrl(string uuid) { return HoldOnUrl + uuid + "&tip=0&r=" + DateTimeToosHelper.GetUnixTimeSpan().ToString() + "& _=" + DateTimeToosHelper.GetUnixTimeSpan().ToString() + MethodsHelper.GetThreeNumber(); } /// /// 获取个人信息 /// public static string GetLoginId = "https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxinit?r=" + DateTimeToosHelper.GetUnixTimeSpan().ToString() + "&lang=zh_CN&pass_ticket="; /// /// 获取联系人 /// public static string ContactUrl = "https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgetcontact?pass_ticket="; /// /// 聊天url /// public static string ChatUrl = "https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxsendmsg?pass_ticket="; /// /// 获取联系人信息 /// /// /// /// public static string GetContactUrl(string tickets, string skey) { return ContactUrl + tickets + "&r=" + DateTimeToosHelper.GetUnixTimeSpan().ToString() + "& seq=0&skey=" + skey; } /// /// 获取SyncKey后加参数Pass_ticket /// public static string GetSyncKey = "https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxinit?r=-" + DateTimeToosHelper.GetUnixTimeSpan().ToString() + "&pass_ticket="; /// /// 心跳url /// public static string HeartUrl = "https://webpush.wx.qq.com/cgi-bin/mmwebwx-bin/synccheck?"; /// /// 获取信息url /// public static string GetChatUrl = "https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxsync?"; /// /// 获取语音消息 /// public static string VoiceUrl = "https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgetvoice?msgid={0}&skey={1}"; /// /// 获取图片信息 /// public static string ImgUrl = "https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgetmsgimg?&MsgID={0}&skey={1}&type=slave"; /// /// 大图 /// public static string ImgUrlBig = "https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgetmsgimg?&MsgID={0}&skey={1}"; /// /// 视频地址 /// public static string VideoUrl = "https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgetvideo?msgid={0}&skey={1}"; /// /// 获取地图图片 /// public static string MapUrl = "https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgetpubliclinkimg?url=xxx&msgid={0}&pictype=location"; /// /// 获取群成员信息 /// public static string GetQunContactUrl = "https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxbatchgetcontact?type=ex&r=" + DateTimeToosHelper.GetUnixTimeSpan().ToString() + MethodsHelper.GetThreeNumber() + "&pass_ticket={0}"; /// /// 与手机的心跳keep /// public static string WexNotifyUrl = "https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxstatusnotify?pass_ticket="; /// /// 发送文件 /// public static string SendFileUrl = "https://file.wx.qq.com/cgi-bin/mmwebwx-bin/webwxuploadmedia?f=json"; } }