//微信解绑
public string CancleBind(string tel, string pwd)
{
string st = Picdata.CancleBand();
string Str = GetJson(st + tel + "&idno=" + pwd + "");
// string Str = GetJson("http://neimeng.market.rcznl.com.cn/app/index.php?i=1&c=entry&m=mingfei_market&do=InnerApiInfo&op=rebindwx&mobile=" + tel + "&idno=" + pwd + "");
string retmesg;
try
{
JObject jo = JObject.Parse(Str);
string[] values = jo.Properties().Select(item => item.Value.ToString()).ToArray();
retmesg = values[1];
}
catch (Exception ex){
retmesg = ex.Message;
}
return retmesg;
}
protected string GetJson(string url)
{
WebClient wc = new WebClient();
wc.Credentials = CredentialCache.DefaultCredentials;
wc.Encoding = Encoding.UTF8;
string returnText = wc.DownloadString(url);
if (returnText.Contains("errcode"))
{
//可能发生错误
}
//Response.Write(returnText);
return returnText;
}