/// <summary> /// 获取公告,成功返回公告文本,返回-1出错 /// </summary> public string GetBulletin() { IDictionary <string, string> parameters = new Dictionary <string, string>(); try { parameters.Add("1", "1");//随便传个参进去 var ret = WebPost.ApiPost(Decrypt.DES(webApiUrl.GetBulletin, Decrypt.DES(webApiUrl.Key, "actingnb")), parameters); return(ret); } catch { return("-1"); } }
/// <summary> /// 检测版本更新,返回1为最新版,0不是最新版,-1出错 /// </summary> public string VersionCheck(string Version) { IDictionary <string, string> parameters = new Dictionary <string, string>(); try { // 添加待传递参数 parameters.Add("1", Version); var ret = WebPost.ApiPost(Decrypt.DES(webApiUrl.CheckAppVersion, Decrypt.DES(webApiUrl.Key, "actingnb")), parameters); return(ret); } catch { return("-1"); } }
/// <summary> /// 获取到期时间,失败返回-1 /// </summary> public string GetExpired(string Key) { IDictionary <string, string> parameters = new Dictionary <string, string>(); try { // 添加待传递参数 parameters.Add("1", Key); var ret = WebPost.ApiPost(Decrypt.DES(webApiUrl.GetExpired, Decrypt.DES(webApiUrl.Key, "actingnb")), parameters); return(ret); } catch { return("-1"); } }
/// <summary> /// 设置用户数据,成功返回1,失败返回错误码 /// </summary> public string SetUserData(string StatusCode, string Key, string Content) { IDictionary <string, string> parameters = new Dictionary <string, string>(); try { // 添加待传递参数 parameters.Add("1", StatusCode); parameters.Add("2", Key); parameters.Add("3", Content); var ret = WebPost.ApiPost(Decrypt.DES(webApiUrl.SetUserData, Decrypt.DES(webApiUrl.Key, "actingnb")), parameters); return(ret); } catch { return("-1"); } }
/// <summary> /// 登录,成功返回状态码,失败返回错误码 /// </summary> public string Login(string Key, string Version, string Mac) { IDictionary <string, string> parameters = new Dictionary <string, string>(); try { // 添加待传递参数 parameters.Add("1", Key); parameters.Add("2", Version); parameters.Add("3", Mac); var ret = WebPost.ApiPost(Decrypt.DES(webApiUrl.SingleLogin, Decrypt.DES(webApiUrl.Key, "actingnb")), parameters); return(ret); } catch { return("-1"); } }
/// <summary> /// 机器码解绑,成功返回1,失败返回错误码 /// </summary> public string HwidReset(string Key, string NewMac) { IDictionary <string, string> parameters = new Dictionary <string, string>(); try { // 添加待传递参数 parameters.Add("1", Key); parameters.Add("2", string.Empty); parameters.Add("3", NewMac); parameters.Add("4", "0"); var ret = WebPost.ApiPost(Decrypt.DES(webApiUrl.MacChangeBind, Decrypt.DES(webApiUrl.Key, "actingnb")), parameters); return(ret); } catch { return("-1"); } }