商丘12345 前端

Setting-wenti.html 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Hello MUI</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
  7. <meta name="apple-mobile-web-app-capable" content="yes">
  8. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  9. <!--标准mui.css-->
  10. <link rel="stylesheet" href="../css/mui.min.css">
  11. <!--App自定义的css-->
  12. <!--<link rel="stylesheet" type="text/css" href="css/app.css" />-->
  13. <style>
  14. .mui-table h4,
  15. .mui-table h5,
  16. .mui-table .mui-h5,
  17. .mui-table .mui-h6,
  18. .mui-table p {
  19. margin-top: 0;
  20. }
  21. .mui-table h4 {
  22. line-height: 21px;
  23. font-weight: 500;
  24. font-size: 20px;
  25. }
  26. .mui-table .oa-icon {
  27. position: absolute;
  28. right: 0;
  29. bottom: 0;
  30. }
  31. .mui-table .oa-icon-star-filled {
  32. color: #f14e41;
  33. }
  34. .mui-bar-nav {
  35. background-color: #00a1cb;
  36. }
  37. #title{
  38. color: #fff;
  39. }
  40. .mui-table-view-cell{
  41. padding: 5px 15px;
  42. }
  43. h4{
  44. color: inherit;
  45. font-weight: 500;
  46. }
  47. </style>
  48. </head>
  49. <body>
  50. <header class="mui-bar mui-bar-nav">
  51. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color: #fff;"></a>
  52. <h1 id="title" class="mui-title">常见问题</h1>
  53. </header>
  54. <div class="mui-content" id="pullrefresh">
  55. <ul class="mui-table-view mui-table-view-striped mui-table-view-condensed" id="order_list">
  56. </ul>
  57. <span></span>
  58. </div>
  59. </body>
  60. <script src="../js/mui.min.js"></script>
  61. <script src="../js/zepto.js"></script>
  62. <script src="../js/huayi.config.js"></script>
  63. <script>
  64. mui.plusReady(function() {
  65. var page = 1; //页数
  66. var pageSize = 10; //每页显示条目
  67. var total; //数据总条数
  68. var token =localStorage.getItem("token"); //获取本地存储
  69. Ajax();
  70. mui.init({
  71. swipeBack: false,
  72. pullRefresh: {
  73. container: '#pullrefresh',
  74. up: {
  75. contentrefresh: "正在加载...", //可选,正在加载状态时,上拉加载控件上显示的标题内容
  76. contentnomore: '没有更多数据了', //可选,请求完毕若没有更多数据时显示的提醒内容;
  77. callback: pullupRefresh
  78. }
  79. }
  80. });
  81. //下拉刷新
  82. function pullupRefresh() {
  83. setTimeout(function() {
  84. mui('#pullrefresh').pullRefresh().endPullupToRefresh((page++ >= Math.ceil(total / 10)));
  85. mui.ajax(huayi.config.callcenter_url + 'FAQ/GetAllList', {
  86. data: {
  87. token: token,
  88. page: page,
  89. pagesize: pageSize
  90. },
  91. dataType: 'json', //服务器返回json格式数据
  92. type: 'get', //HTTP请求类型
  93. timeout: 10000, //超时时间设置为10秒;
  94. headers: {
  95. 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
  96. },
  97. success: function(data) {
  98. total = data.total;
  99. console.log(total);
  100. var a = "";
  101. console.log(data.rows.length)
  102. for(var i=0;i<data.rows.length;i++){
  103. console.log(data.rows[0].F_Id);
  104. a = '<li class="mui-table-view-cell" index-i="'+data.rows[i].F_Id+'">'+
  105. '<h4 class="mui-navigate-right">'+data.rows[i].F_QuestionTitle+' <i class="mui-pull-right "></i></h4>'+
  106. '<h5 class="mui-ellipsis">' + data.rows[i].F_QuestionContent + '</h5>' +
  107. '</li>'
  108. $(a).appendTo($("#order_list"));
  109. }
  110. De();
  111. },
  112. error: function(xhr, type, errorThrown) {
  113. //异常处理;
  114. }
  115. })
  116. }, 1000);
  117. }
  118. //初次加载
  119. function Ajax() {
  120. mui.ajax(huayi.config.callcenter_url + 'FAQ/GetAllList', {
  121. data: {
  122. token: token,
  123. page: 1,
  124. pagesize: 10
  125. },
  126. dataType: 'json', //服务器返回json格式数据
  127. type: 'get', //HTTP请求类型
  128. timeout: 10000, //超时时间设置为10秒;
  129. headers: {
  130. 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
  131. },
  132. success: function(data) {
  133. total = data.total;
  134. console.log(total);
  135. var a = "";
  136. console.log(data.rows.length)
  137. for(var i=0;i<data.rows.length;i++){
  138. console.log(data.rows[0].F_Id);
  139. a = '<li class="mui-table-view-cell" index-i="'+data.rows[i].F_Id+'">'+
  140. '<h4 class="mui-navigate-right" style="font-size:16px;">'+data.rows[i].F_QuestionTitle+' <i class="mui-pull-right "></i></h4>'+
  141. '<h5 class="mui-ellipsis"style="font-size:14px;">' + data.rows[i].F_QuestionContent + '</h5>' +
  142. '</li>'
  143. $(a).appendTo($("#order_list"));
  144. }
  145. De();
  146. },
  147. error: function(xhr, type, errorThrown) {
  148. //异常处理;
  149. }
  150. })
  151. }
  152. ////详情
  153. function De(){
  154. $(".mui-table-view-cell").on("tap",function(){
  155. var index=$(this).attr("index-i");
  156. mui.openWindow({
  157. id: 'WTlist',
  158. url: 'WTlist.html',
  159. show: {
  160. aniShow: 'pop-in'
  161. },
  162. styles: {
  163. popGesture: 'hide'
  164. },
  165. waiting: {
  166. autoShow: false
  167. },extras: {
  168. name: index,
  169. token: token
  170. }
  171. });
  172. })
  173. }
  174. });
  175. </script>
  176. </html>