11.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
  6. <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  7. <title></title>
  8. <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
  9. <link rel="stylesheet" href="../../css/apiToast.css">
  10. <link rel="stylesheet" href="../../css/projeck.css">
  11. <style>
  12. html,body{
  13. background: #fff;
  14. }
  15. .api_layout{
  16. width: 100%;
  17. position: relative;
  18. }
  19. .List_QRcode{
  20. width: 100%;
  21. padding: 10px;
  22. -webkit-box-sizing: border-box;
  23. -moz-box-sizing: border-box;
  24. box-sizing: border-box;
  25. }
  26. .List_QRcode li{
  27. -webkit-box-sizing: border-box;
  28. box-sizing: border-box;
  29. position: relative;
  30. margin-bottom: 25px;
  31. border-bottom: 1px solid #ecf0f1;
  32. }
  33. .List_QRcode li:first-child{
  34. padding: 20px 10px 15px 20px;
  35. -webkit-box-sizing: border-box;
  36. box-sizing: border-box;
  37. border-bottom: 0;
  38. background-color: #009fe8;
  39. -webkit-border-radius: 3px;
  40. -moz-border-radius: 3px;
  41. border-radius: 3px;
  42. }
  43. .List_QRcode li:first-child .time{
  44. font-size: 18px;
  45. color: #fff;
  46. margin-bottom: 30px;
  47. position: relative;
  48. }
  49. .btn{
  50. width: 80px;
  51. height: 32px;
  52. line-height: 32px;
  53. font-size: 12px;
  54. background: #fff;
  55. color: #41c1fc;
  56. -webkit-border-radius: 50px;
  57. -moz-border-radius: 50px;
  58. border-radius: 50px;
  59. }
  60. .texts{
  61. font-size: 16px;
  62. color: #fff;
  63. line-height: 18px;
  64. width: 65%;
  65. line-height: 1.5;
  66. }
  67. .start1{
  68. position: absolute;
  69. top: -10px;
  70. right: 127px;
  71. background: url("../../image/Star2.png") no-repeat;
  72. background-size: cover;
  73. width: 14px;
  74. height: 14px;
  75. }
  76. .bg_start{
  77. display: inline-block;
  78. width: 20px;
  79. height: 20px;
  80. background: url("../../image/star.png");
  81. background-size: cover;
  82. position: relative;
  83. top: 4px;
  84. }
  85. .bord{
  86. border: 1px solid #41c1fc;
  87. }
  88. .List_QRcode li:not(:first-child){
  89. padding: 0 10px 10px 13px;
  90. }
  91. .List_QRcode li:not(:first-child) .btn{
  92. position: absolute;
  93. top: 15px;
  94. right: 10px;
  95. }
  96. .List_QRcode li:not(:first-child) .list_title{
  97. font-size: 16px;
  98. color: #97a3b4;
  99. height: 23px;
  100. line-height: 23px;
  101. margin-bottom: 18px;
  102. }
  103. .List_QRcode li:not(:first-child) .texts01{
  104. color: #1d1e2c;
  105. }
  106. .List_QRcode li:not(:first-child) .list_title .start1{
  107. width:0;
  108. }
  109. .List_QRcode li:first-child .time .bg_start{
  110. display:inline;
  111. }
  112. .List_QRcode li:first-child .bord{
  113. display:none;
  114. }
  115. .List_QRcode li:not(:first-child) .bords{
  116. display: none;
  117. }
  118. </style>
  119. </head>
  120. <body>
  121. <div class="api_layout">
  122. <div class="List_QRcodes">
  123. <ul class="List_QRcode" id="List_QRcode">
  124. </ul>
  125. </div>
  126. </div>
  127. <div class="Nonews" id="nocode"></div>
  128. </body>
  129. </html>
  130. <script type="text/template" id="template">
  131. {{~it:value}}
  132. <li>
  133. <p class="time list_title">
  134. <i class="bg_start"></i>
  135. <span>{{=value.createDate}}</span>
  136. <i class="start1"></i>
  137. </p>
  138. <p class="texts texts01">{{=value.dataContent}}</p>
  139. <div style="text-align: right">
  140. <button class="btn bords" style="background:#009fe8;color: #ffffff;border: 1px solid #ffffff;" onclick="QRcodeDetaile('{{=value.pageId}},{{=value.id}},{{=value.departmentId}}','{{=value.pageName}}')">查看详情</button>
  141. <button class="btn bord" onclick="QRcodeDetaile('{{=value.pageId}},{{=value.id}},{{=value.departmentId}}','{{=value.pageName}}')">查看详情</button>
  142. </div>
  143. </li>
  144. {{~}}
  145. </script>
  146. <script type="text/javascript" src="../../script/api.js"></script>
  147. <script type="text/javascript" src="../../script/doT.min.js"></script>
  148. <!-- <script src="../../script/aui-toast.js" charset="utf-8"></script> -->
  149. <!-- <script src="../../script/fastclick.min.js"></script> -->
  150. <script src="../../script/config.js" charset="utf-8"></script>
  151. <script type="text/javascript">
  152. var depIDs = '',uuid='';
  153. var isLoadding = false;
  154. var skip = 1;
  155. var apiToast = new apiToast();
  156. apiready = function () {
  157. depIDs = api.pageParam.depIDs;
  158. var info = $api.getStorage('data'),
  159. user = JSON.parse(info).data.user;
  160. uuid = JSON.parse(info).data.user.staff_num;
  161. QRcodeListFun(uuid,depIDs,true);
  162. resetWidth();
  163. api.addEventListener({
  164. name : 'scrolltobottom',
  165. extra : {
  166. threshold : 0 //设置距离底部多少距离时触发,默认值为0,数字类型
  167. }
  168. }, function(ret, err) {
  169. if (!isLoadding) {
  170. isLoadding = true;
  171. QRcodeListFun(uuid,depIDs,true);
  172. }
  173. });
  174. }
  175. function QRcodeListFun(uuid,depID,isLoadMore){
  176. var filter = {
  177. "departmentId" : depID,
  178. 'userId':uuid,
  179. "pageNumber" : skip,
  180. "pageSize" : 10
  181. };
  182. $http.fnReuestDataNoW(UrlRouter.getPageDynamicApi,'','get',filter,function (ret, err) {
  183. apiToast.hide();
  184. if (ret.data.length == 0 && skip == 1) {
  185. document.getElementById("nocode").style.display = 'block';
  186. return false;
  187. }else {
  188. document.getElementById("nocode").style.display = 'none';
  189. }
  190. if (ret) {
  191. if (ret.data.length > 0) {
  192. skip += 1;
  193. $apis.append(List_QRcode,'#template',ret.data);
  194. } else {
  195. isLoadding = true;
  196. api.toast({
  197. msg: '没有更多数据',
  198. duration: 2000,
  199. location: 'bottom'
  200. });
  201. }
  202. } else {
  203. apiToast.hide();
  204. api.toast({
  205. msg: '加载超时,请检查网络',
  206. duration: 2000,
  207. location: 'bottom'
  208. });
  209. }
  210. });
  211. }
  212. function resetWidth() {
  213. var items = document.getElementsByClassName("texts");
  214. for (var i = 0; i < items.length; i++) {
  215. items[i].style.width = (api.frameWidth - 130) + "px";
  216. }
  217. }
  218. function QRcodeDetaile(pageid,title) {
  219. var pageidA = pageid.split(',');
  220. $event.openWin('browseQrcode_win','../browseQrcode/browseQrcode_win',{pageId:pageidA[0],id:pageidA[1],departmentId:pageidA[2],title:title},'');
  221. // $event.openWin('QrcodeDetaile','QrcodeDetaile',{pageId:pageidA[0],id:pageidA[1],departmentId:pageidA[2],flag:true},'');
  222. }
  223. </script>