health-headline.html 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>健康教育</title>
  6. <meta name="author" content="yihu.com" />
  7. <meta name="format-detection" content="telephone=no" />
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" />
  9. <meta name="apple-mobile-web-app-capable" content="yes" />
  10. <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  11. <link rel="stylesheet" href="../../../css/cross.css" type="text/css" />
  12. <link rel="stylesheet" href="../../../css/cross.ui.css" type="text/css" />
  13. <link rel="stylesheet" type="text/css" href="../iconfont/2/iconfont.css">
  14. <link rel="stylesheet" type="text/css" href="../css/ss-style.css">
  15. <link rel="stylesheet" type="text/css" href="../../grzx/css/zx-style.css">
  16. <script type="text/javascript" src="../../../js/jquery/2.1.3/jquery.js"></script>
  17. <script type="text/javascript" src="../../../js/mui.min.js"></script>
  18. <script src="../../../js/app.js" type="text/javascript" charset="utf-8"></script>
  19. <script src="../../../js/common_http.js" type="text/javascript" charset="utf-8"></script>
  20. <link rel="stylesheet" type="text/css" href="../../../widget/artDialog/6.0.5/css/ui-dialog.min.css">
  21. <script src="../../../widget/artDialog/6.0.5/js/dialog-plus.min.js"></script>
  22. <script type="text/javascript" src="../../../js/weixin_common.js" ></script>
  23. </head>
  24. <body>
  25. <div class="main">
  26. <style>
  27. .news-box {
  28. height: 180px;
  29. background: url("../images/news2.jpg") no-repeat 50% 50%;
  30. background-size: 100% auto;
  31. position: relative;
  32. }
  33. .news-title {
  34. position: absolute;
  35. bottom: 0;
  36. background: rgba(0, 0, 0, .5);
  37. }
  38. </style>
  39. <!--<div class="h45">
  40. <div class="demo-comtop">
  41. <a class="mui-action-back"></a>
  42. <h1>健康教育</h1>
  43. </div>
  44. </div>-->
  45. <!--<div class="news-box" onClick="openWebview('news-detail.html')">
  46. <div class="news-title plr15 ptb5 c-boxs width-100">
  47. <h2 class="c-f14 c-fff">皮肤过敏症 远离皮肤过敏10招全解决</h2>
  48. <p class="c-f11" style="color:rgba(255,255,255,.65)">军门社区 2016-04-05 星期二</p>
  49. </div>
  50. </div>-->
  51. <!--<div class="ptb10 plr15" style="color:#888;">脸部过敏会带来不便,如果一系列的感染会影响面容,还是需要及早治疗,那么你知道脸部皮肤过敏症的原因吗?脸部皮肤过敏该如何预防呢?</div>-->
  52. <div class="bgc-fff c-border-tb">
  53. <ul class="n-list news-list" id="list_ul">
  54. </ul>
  55. </div>
  56. <div class="labhold-con">
  57. <div class="doc-recoder" id="divRecoder"></div>
  58. <a href="javascript:;" class="view-more c-37a6ed" id="view_more">点击查看更多</a>
  59. </div>
  60. </div>
  61. </body>
  62. <script type="text/javascript">
  63. var d = dialog({contentType:'load', skin:'bk-popup'});
  64. var fy_id = 0;
  65. var pageSize = 10;
  66. var pagetype = 10;
  67. $(function() {
  68. $("#list_ul").html("");
  69. checkUserAgent();
  70. //点击加载更多
  71. document.getElementById('view_more').addEventListener("tap", function() {
  72. queryInit();
  73. });
  74. });
  75. function queryInit() {
  76. d.show();
  77. var data = {};
  78. data.id = fy_id;
  79. data.pagesize = pageSize;
  80. sendPost("patient/health/edu/list", data, "json", "post", queryListFailed, queryAppoListSuccesss);
  81. }
  82. function queryListFailed(res) {
  83. d.close().remove();
  84. if (res && res.msg) {
  85. dialog({contentType:'tipsbox', skin:'bk-popup' , content:res.msg}).show();
  86. } else {
  87. dialog({contentType:'tipsbox', skin:'bk-popup' , content:'加载失败'}).show();
  88. }
  89. }
  90. function queryAppoListSuccesss(res) {
  91. if (res.status == 200) {
  92. if (res.list.length > 0) {
  93. var list = res.list;
  94. var $list = document.querySelector("#list_ul");
  95. for (var i = 0; i < list.length; i++) {
  96. var $li = document.createElement("li");
  97. var title = list[i].title;
  98. var url = list[i].url;
  99. var czrq = list[i].czrq;
  100. $li.className = "n-list-cover n-list-link";
  101. $li.setAttribute("attr_url", url);
  102. var content ="<div class='n-list-info'>";
  103. content += "<h4 class='c-nowrap c-f15 c-333 pb5'>"+title+"</h4>";
  104. content += "<p class='c-nowrap-multi c-f13 c-909090'>";
  105. content += "<i class='iconfont icon-xinwenmulu'></i>";
  106. content += "<span>"+czrq+"</span>" ;
  107. content += "</p>";
  108. content +="</div>";
  109. $li.innerHTML = content;
  110. $list.appendChild($li);
  111. fy_id=list[i].id;
  112. }
  113. } else {
  114. document.querySelector("#view_more").innerText = "已无更多数据";
  115. }
  116. d.close().remove();
  117. } else {
  118. //非200则为失败
  119. queryListFailed(res);
  120. }
  121. }
  122. $(".news-list").on("tap", "li", function() {
  123. var title = this.querySelector("h4").innerText;
  124. var cont = this.querySelector("p").innerText;
  125. var attr_url = this.getAttribute("attr_url");
  126. var N_url="news-detail.html?title=" + title + "&news_url=" + attr_url;
  127. window.location.href=attr_url;
  128. })
  129. </script>
  130. </html>