/// <summary> /// 领取竞猜工资 /// </summary> public static void get_jingcai_gongzi(Dictionary <String, String> cookies, Action <Dictionary <String, Object> > success, Action <String> error) { Thread thread = new Thread(delegate() { Thread.Sleep(1000); BaseHttpRequest baseRequest = new BaseHttpRequest(); baseRequest.Post("http://www.ji7.com/vip/get_jingcai_gongzi") .SetHeader("http://www.ji7.com/pc", "http://www.ji7.com", "application/json, text/javascript, */*; q=0.01", "application/x-www-form-urlencoded; charset=UTF-8") .setCookies(cookies) .Form(new { action = "getgetgetgetgetgetgetgetgetget" }) .OnSuccess(result => { var zipStream = new System.IO.Compression.GZipStream(result, System.IO.Compression.CompressionMode.Decompress); StreamReader streamReader = new StreamReader(zipStream, Encoding.UTF8); string html = streamReader.ReadToEnd(); Dictionary <String, Object> dic = JsonToObject.jsonToDictionary(html); success(dic); baseRequest.close(); }) .OnFail(errorText => { error(errorText); }).Go(); }); thread.Start(); }
public static void cjdr(Dictionary <String, String> cookies, string cjid, string joinid, string selectNum, string currentNum, Action <Dictionary <String, Object> > success, Action <String> error) { string url = "http://m.ji7.com/cltx/guess?id=" + cjid; Thread thread = new Thread(delegate() { Thread.Sleep(2000); BaseHttpRequest baseRequest = new BaseHttpRequest(); baseRequest.Post(url) .SetHeader( url, "http://m.ji7.com", "application/json, text/javascript, */*; q=0.01", "application/x-www-form-urlencoded; charset=UTF-8") .setCookies(cookies) .Form(new { joinid = joinid, pknum = selectNum, round = currentNum // goods_id:goods_id, //cat_id:cat_id, //re_num:re_num, //pay_passwd:pay_passwd // action = "post" }) .OnSuccess(result => { var zipStream = new System.IO.Compression.GZipStream(result, System.IO.Compression.CompressionMode.Decompress); StreamReader streamReader = new StreamReader(zipStream, Encoding.UTF8); string html = streamReader.ReadToEnd(); Dictionary <String, Object> dic = JsonToObject.jsonToDictionary(html); success(dic); baseRequest.close(); }) .OnFail(errorText => { error(errorText); }).Go(); }); thread.Start(); }
public static void loginchiji(Dictionary <String, String> cookies, String userName, String userPwd, Action <Dictionary <String, Object> > success, Action <String> error) { Thread thread = new Thread(delegate() { Thread.Sleep(1000); BaseHttpRequest baseRequest = new BaseHttpRequest(); baseRequest.Post("http://m.ji7.com/member/login") .SetHeader("http://m.ji7.com/", "http://m.ji7.com", "application/json, text/javascript, */*; q=0.01", "application/x-www-form-urlencoded; charset=UTF-8") .setCookies(cookies) .Form(new { username = userName, password = userPwd, vcode = "" }) .OnSuccess(result => { var zipStream = new System.IO.Compression.GZipStream(result, System.IO.Compression.CompressionMode.Decompress); StreamReader streamReader = new StreamReader(zipStream, Encoding.UTF8); string html = streamReader.ReadToEnd(); Dictionary <String, Object> dic = JsonToObject.jsonToDictionary(html); success(dic); baseRequest.close(); }) .OnFail(errorText => { error(errorText); }).Go(); }); thread.Start(); }