using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using CB.Framework; using CB.Entity; using CB.Common; using System.Text; using CB.Web.Kjh.AppCode; using Newtonsoft.Json; using HttpCodeLib; namespace CB.Web.Kjh.kaijihao { public partial class p3 : WebPage { protected int term; protected DateTime date = DateTime.Now; protected StringBuilder sp = new StringBuilder(); protected StringBuilder others = new StringBuilder(); protected StringBuilder number = new StringBuilder(); protected void Page_Load(object sender, EventArgs e) { InitData(); } protected override void InitData() { term = WRequest.GetQueryInt("term"); if (0 < term) { pageTitle = term.ToString() + "期排列三开机号_" + term.ToString() + "期排列3|P3开机号查询_开奖助手"; pageKeyWords = term.ToString() + "期排列三开机号"; pageDescription = "开奖助手提供排列三" + term.ToString() + "期开机号,包括" + term.ToString() + "期排列3|P3开机号查询、" + term.ToString() + "期排列3开机号与开奖号的关系、" + term.ToString() + "期排列三开机号关注号|对应码|金码,查询体彩排列三开机号就上开奖助手。"; } else { pageTitle = "排列三开机号_最新排列三开机号_排列三开机号近10期_开奖助手"; pageKeyWords = "排列三开机号,体彩排列3开机号,P3开机号查询,排列三开机号近10期"; pageDescription = "排列三又名排列3和P3,排列三开机号专区为彩民提供排列三开机号码、排列3开机号、排列三开机号查询等,想最快获取今天排列三开机号请关注开奖助手"; } var info = CB.Data.Caches.GetTCP3Info(term, OpenCodeType.KaiJiHao); IList d; if (null == info || string.IsNullOrEmpty(info.KaiJiHao) || -1 != info.KaiJiHao.IndexOf("-1")) { number.AppendLine("
  • "); number.AppendLine(" ???"); number.AppendLine("
  • "); number.AppendLine("
  • 和值:-- | 跨度:-- | 奇偶比:-- | 大小比:--
  • "); } else { term = (int)info.Term; date = info.OpenTime; d = info.KaiJiHao.ToIntArray(','); number.AppendLine("
  • "); number.AppendLine(" " + d[0].ToString() + "" + d[1].ToString() + "" + d[2].ToString() + ""); number.AppendLine("
  • "); number.AppendLine("
  • 和值:" + CB.Common.LotteryUtils.GetSum(d).ToString() + " | 跨度:" + CB.Common.LotteryUtils.GetSpan(d).ToString() + " | 奇偶比:" + CB.Common.LotteryUtils.GetProportionOfJO(d) + " | 大小比:" + CB.Common.LotteryUtils.GetProportionOfDX(d, 5) + "
  • "); } //开机号历史显示 var list = CB.Data.Caches.GetTCP3List(10, OpenCodeType.KaiJiHao); if (null != list && 0 < list.Count) { int i = 1; foreach (var item in list) { d = item.KaiJiHao.ToIntArray(','); if (null == d) break; if (0 == i % 2) { sp.AppendLine(" "); } else { sp.AppendLine(" "); } sp.AppendLine(" " + item.Term.ToString() + ""); sp.AppendLine(" " + item.OpenTime.ToString("yyyy.MM.dd") + ""); sp.AppendLine(" " + item.KaiJiHao.Replace(",", ",") + ""); sp.AppendLine(" " + CB.Common.LotteryUtils.GetProportionOfJO(d) + ""); sp.AppendLine(" " + CB.Common.LotteryUtils.GetProportionOfDX(d, 5) + ""); sp.AppendLine(" " + CB.Common.LotteryUtils.GetSpan(d).ToString() + ""); if (item.OpenCode.Contains(-1)) { sp.AppendLine(" ---"); sp.AppendLine(" ---"); sp.AppendLine(" ---"); sp.AppendLine(" ---"); } else { sp.AppendLine(" " + item.OpenCode1 + "," + item.OpenCode2 + "," + item.OpenCode3 + ""); sp.AppendLine(" " + CB.Common.LotteryUtils.GetProportionOfJO(item.OpenCode,3) + ""); sp.AppendLine(" " + CB.Common.LotteryUtils.GetProportionOfDX(item.OpenCode, 5,3) + ""); sp.AppendLine(" " + CB.Common.LotteryUtils.GetSpan(item.OpenCode,3).ToString() + ""); } sp.AppendLine(" "); i++; } } //彩种相关开机号 string[] data; var ssq = CB.Data.Caches.GetFCSSQInfo(0, OpenCodeType.KaiJiHao); if (null != ssq && ssq.KaiJiHao.IndexOf("-1") == -1) { data = ssq.KaiJiHao.Split(','); others.AppendLine("
  • "); others.AppendLine(" 双色球" + data[0] + "" + data[1] + ""); others.AppendLine(" " + data[2] + "" + data[3] + "" + data[4] + "" + data[5] + "" + data[6] + ""); others.AppendLine("
  • "); } var fc3d = CB.Data.Caches.GetFC3DInfo(0, OpenCodeType.KaiJiHao); if (null != fc3d && fc3d.KaiJiHao.IndexOf("-1") == -1) { data = fc3d.KaiJiHao.Split(','); others.AppendLine("
  • "); others.AppendLine(" 福彩3D" + data[0] + "" + data[1] + ""); others.AppendLine(" " + data[2] + ""); others.AppendLine("
  • "); } var dlt = CB.Data.Caches.GetTCDLTInfo(0, OpenCodeType.KaiJiHao); if (null != dlt && dlt.KaiJiHao.IndexOf("-1") == -1) { data = dlt.KaiJiHao.Split(','); others.AppendLine("
  • "); others.AppendLine(" 大乐透" + data[0] + "" + data[1] + ""); others.AppendLine(" " + data[2] + "" + data[3] + "" + data[4] + "" + data[5] + "" + data[6] + ""); others.AppendLine("
  • "); } base.InitData(); } /// /// 右侧栏 /// /// 当前类型 /// 标题最大 /// /// /// protected string GetSynArticleZx(string indexTypes, int maxLength, bool wap, bool showDate = false) { //jsonList.Data //var list = CB.Data.Synchronize.Article.GetArticleList(topSize, pageSize, cid, wap); dynamic jsonList; var jsonListKJH = CacheUtils.GetCache("jsonListKJH"); if (null == jsonListKJH) { Session.Timeout = 50; //开始调用 HttpHelpers hhs = new HttpHelpers(); HttpItems hi = new HttpItems(); string getZX = System.Configuration.ConfigurationManager.AppSettings["getZX"]; hi.URL = getZX + "/zx/TopicInterface/GetNewList128"; hi.Method = "get"; hi.Accept = "/"; hi.ContentType = ""; hi.Timeout = 300000; HttpResults hr = hhs.GetHtml(hi); try { jsonList = JsonConvert.DeserializeObject(hr.Html.ToString()); CacheUtils.SetCache("jsonListKJH", jsonList, new TimeSpan(0, 0, 30, 0)); } catch (Exception) { return ""; } } else { jsonList = JsonConvert.DeserializeObject(jsonListKJH.ToString()); } if (null == jsonList) { return ""; } var sp = new StringBuilder(400 * 6); var fortstr = "
  • {1}
  • "; if (showDate) fortstr = "
  • {1}{2}
  • "; switch (indexTypes) { case "ssq": foreach (var item in jsonList.ssq) { var lst = new List() { "http://zx.55128.cn" + item.SourceUrl, CB.Common.Utils.GetSubString(item.title.ToString(), maxLength, "") }; if (showDate) lst.Add(item.createTime.ToString("MM-dd")); sp.AppendFormat(fortstr, lst.ToArray()); } break; case "fc3d": foreach (var item in jsonList.fc3d) { var lst = new List() { "http://zx.55128.cn" + item.SourceUrl, CB.Common.Utils.GetSubString(item.title.ToString(), maxLength, "") }; if (showDate) lst.Add(item.createTime.ToString("MM-dd")); sp.AppendFormat(fortstr, lst.ToArray()); } break; case "dlt": foreach (var item in jsonList.dlt) { var lst = new List() { "http://zx.55128.cn" + item.SourceUrl, CB.Common.Utils.GetSubString(item.title.ToString(), maxLength, "") }; if (showDate) lst.Add(item.createTime.ToString("MM-dd")); sp.AppendFormat(fortstr, lst.ToArray()); } break; case "p3": //3D试机号 foreach (var item in jsonList.p3) { var lst = new List() { "http://zx.55128.cn" + item.SourceUrl, CB.Common.Utils.GetSubString(item.title.ToString(), maxLength, "") }; if (showDate) lst.Add(item.createTime.ToString("MM-dd")); sp.AppendFormat(fortstr, lst.ToArray()); } break; case "sjh": foreach (var item in jsonList.p3) { var lst = new List() { "http://zx.55128.cn" + item.SourceUrl, CB.Common.Utils.GetSubString(item.title.ToString(), maxLength, "") }; if (showDate) lst.Add(item.createTime.ToString("MM-dd")); sp.AppendFormat(fortstr, lst.ToArray()); } break; default: break; } return sp.ToString(); } } }