WF.cshtml 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. @using CP.Model
  2. @using CP.Kjh.Models
  3. @model WFModel
  4. @{
  5. Layout = "~/Views/Shared/_Layout.cshtml";
  6. var routeList = RouteHelper.GetRouteList(null);
  7. var czTypeEnumList = OtherHelper.CzTypeEnumList.Where(p => p.Key != CzTypeEnum.高频彩.ToString());
  8. var data = GetWf(Model.NewTypeName);
  9. Page.ViewEnum = ViewEnum.WF;
  10. Page.NewTypeName = Model.NewTypeName;
  11. Page.Cid = OtherHelper.CzList.SingleOrDefault(p => p.ename == Model.NewTypeName).cid;
  12. }
  13. <link rel="stylesheet" type="text/css" href="~/Content/css/wfgz.css">
  14. @functions
  15. {
  16. public WF GetWf(string newName)
  17. {
  18. var czdata = OtherHelper.CzList.FirstOrDefault(p => p.ename == newName);
  19. var data = OtherHelper.WfList.FirstOrDefault(p => p.cid == (czdata != null ? czdata.cid : 0));
  20. return data == null ? new WF() : data;
  21. }
  22. }
  23. @helper WFHtml(List<RouteModel> list)
  24. {
  25. <ul class="lot-list-wrapper @(list.Where(p=>p.NewName==Model.NewTypeName).Count()>0?"active":"")">
  26. @foreach (var item in list)
  27. {
  28. var data = GetWf(item.NewName);
  29. var name = data.cid > 0 ? data.itemname : item.Name;
  30. <li class="lot-list @(data.cid>0 && Model.NewTypeName == item.NewName?"active":"")">
  31. <a href="/@(item.OldName)-zjgz/" title="@(name)规则">@name</a>
  32. </li>
  33. }
  34. </ul>
  35. }
  36. <div class="main" style="margin-top: 130px;">
  37. <section class="bread-nav">
  38. <span class="lable">当前位置:玩法规则</span>
  39. <span class="iconfont icon-right"></span>
  40. <span class="lable">玩法规则</span>
  41. </section>
  42. @Html.Partial("ads")
  43. <section class="mainContent row">
  44. <section class="main-nav">
  45. @foreach (var item in czTypeEnumList)
  46. {
  47. var list = routeList.Where(p => p.CzTypeEnum == item.Value).ToList();
  48. <section class="lot-wrapper">
  49. <div class="lot-title @(list.Where(p => p.NewName == Model.NewTypeName).Count() > 0 ? "active" : "")">
  50. @item.Name <span class="trangle"></span>
  51. </div>
  52. @WFHtml(list)
  53. </section>
  54. }
  55. </section>
  56. <section class="wfgz-wrapper" style="margin-left:160px;">
  57. <section class="wfgz-title">
  58. <span class="wfgz-lable active">玩法介绍</span>
  59. @if (data.cid > 0 && !string.IsNullOrWhiteSpace(data.lotterytime))
  60. {
  61. <span class="wfgz-lable">开奖时间</span>
  62. }
  63. @Html.Action("RecomUrl", "Shared", new { ename = Model.NewTypeName, typeCode = RecomUrlTypeEnum.WF })
  64. </section>
  65. <section class="wfgz-content-box">
  66. <section class="wfgz-content active">
  67. @( !string.IsNullOrWhiteSpace(data.gameplay) ? Html.Raw(data.gameplay) : Html.Raw("暂无此彩种玩法介绍"))
  68. </section>
  69. @if (!string.IsNullOrWhiteSpace(data.lotterytime))
  70. {
  71. <section class="wfgz-content">
  72. @Html.Raw(data.lotterytime)
  73. </section>
  74. }
  75. <section class="wfgz-content">
  76. @(!string.IsNullOrWhiteSpace(data.winning) ? Html.Raw(data.winning) : Html.Raw("暂无此彩种中奖规则"))
  77. </section>
  78. </section>
  79. </section>
  80. </section>
  81. </div>