add_change.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>朔源码预览</title>
  6. <meta name="renderer" content="webkit">
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  8. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  9. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  10. <meta name="apple-mobile-web-app-capable" content="yes">
  11. <meta name="format-detection" content="telephone=no">
  12. <link rel="stylesheet" type="text/css" href="../../layui/css/layui.css" />
  13. <link rel="stylesheet" type="text/css" href="../../css/common.css" />
  14. <style type="text/css">
  15. .ui-required:before {
  16. content: "*";
  17. color: red;
  18. vertical-align: middle;
  19. }
  20. #roleSelectViwe .layui-form-item {
  21. margin-bottom: 0
  22. }
  23. #roleSelectViwe .layui-input-inline {
  24. width: calc(100% - 110px);
  25. margin-right: 0;
  26. }
  27. .region {
  28. padding-left: 10px;
  29. height: 38px;
  30. line-height: 38px;
  31. background-color: #fff;
  32. border-radius: 2px;
  33. border: 1px solid #e6e6e6;
  34. width: calc(100% - 132px) !important;
  35. }
  36. .userTip {
  37. color: #666;
  38. font-size: 12px;
  39. }
  40. .userTip b {
  41. color: #333;
  42. }
  43. .my-card {
  44. position: relative;
  45. display: inline-block;
  46. width: 280px;
  47. height: 135px;
  48. border-radius: 5px;
  49. box-shadow: 3px 3px 10px #cccccc;
  50. margin: 5px;
  51. }
  52. img {
  53. vertical-align: top;
  54. width: 105px;
  55. height: 105px;
  56. }
  57. .my-text {
  58. position: relative;
  59. display: inline-block;
  60. width: 170px;
  61. height: 30px;
  62. text-align: left;
  63. font-size: 14px;
  64. margin-top: 5px;
  65. }
  66. .my-gray {
  67. color: #8d8d8d;
  68. font-size: 12px;
  69. }
  70. .my-button-div {
  71. width: 100%;
  72. height: 30px;
  73. line-height: 30px;
  74. border-top: 1px solid #e7e7e7;
  75. background-color: #f7f9fa;
  76. position: relative;
  77. text-align: center;
  78. cursor: pointer;
  79. }
  80. #codeListDiv {
  81. height: 440px;
  82. overflow: auto;
  83. }
  84. </style>
  85. </head>
  86. <body>
  87. <div class="layui-form" id="codeListDiv">
  88. </div>
  89. <div class="layui-form-item layui-layer-btn">
  90. <div style="text-align: center">
  91. <button type="reset" class="layui-btn layui-btn-primary" id="closeWin">关闭</button>
  92. </div>
  93. </div>
  94. <script type="text/html" id="auxHtmlTpl">
  95. {{# if(!d){d.list = []}; layui.each(d.list, function(index, item){ }}
  96. <div class="my-card">
  97. <img src="{{window.hywa.config.href}}/{{'images/'+item.qrcodeParentCode+'/'+item.qrcodeImg}}">
  98. <div style="position:relative;display: inline-block;width:170px;">
  99. <div class="my-text">溯源码:{{item.qrcode}}</div>
  100. <div class="my-text my-gray">扫码数:{{item.scanCount}} 评论数:{{item.scanCount}}</div>
  101. </div>
  102. <div class="my-button-div" data-bind="{{item.guid}}">
  103. 废弃
  104. </div>
  105. </div>
  106. {{# }); }}
  107. </script>
  108. <script type="text/javascript">
  109. function loadJS(url) {
  110. document.write("<script src='" + url + "?ver=" + new Date().getTime() + "'><\/script>")
  111. }
  112. loadJS("../../layui/layui.js");
  113. loadJS("../../js/ajaxhook.min.js");
  114. loadJS("../../js/config.js");
  115. </script>
  116. <script type="text/javascript">
  117. layui.config({
  118. base: "../../js/layuiPlugins/"
  119. }).use(['layer', 'laytpl', 'jquery', 'flow'], function () {
  120. var layer = layui.layer,
  121. laytpl = layui.laytpl,
  122. $ = layui.jquery,
  123. flow = layui.flow;
  124. var funcName = "qrcode";
  125. var formData = {
  126. guid: (JSON.stringify(location.searchObj()) != "{}") ? location.searchObj().guid || null : null, //带参传入ID
  127. current: {
  128. auxList: [],
  129. imagesList: []
  130. }, //当前表单数据
  131. select_data: "view_qrcode", //查询
  132. closeModal: function () { //关闭当前窗口
  133. parent.layer.close(parent.layer.getFrameIndex(window.name));
  134. }
  135. };
  136. //关闭窗口
  137. $("#closeWin").on("click", function () {
  138. formData.closeModal();
  139. });
  140. //获取当前信息
  141. function onload(page, next) {
  142. $.ajax({
  143. url: formData.select_data,
  144. method: 'post',
  145. data: JSON.stringify({
  146. guid: formData.guid, //当前ID
  147. pageNum: page,
  148. pageSize: 18
  149. }),
  150. contentType: 'application/json',
  151. success: function (res) {
  152. formData.current.dataList = res.data;
  153. laytpl(auxHtmlTpl.innerHTML).render({
  154. list: res.data
  155. }, function (html) {
  156. next(html, page < res.count / 18);
  157. $(".button-delAux").on("click", function (e) {
  158. var sortno = e.target.getAttribute("data-bind");
  159. });
  160. });
  161. $(".my-button-div").on("click", function (e) {
  162. var guid = e.target.getAttribute("data-bind");
  163. var _this = this;
  164. layer.confirm('确定废弃吗?', function (index) {
  165. layer.close(index);
  166. var index1 = layer.msg('处理中,请稍候', {
  167. icon: 16,
  168. time: false,
  169. shade: 0.8
  170. });
  171. $.ajax({
  172. url: "drop_single",
  173. method: 'get',
  174. data: {
  175. guid: guid //当前ID
  176. },
  177. success: function (res) {
  178. layer.close(index1);
  179. //ggggg();
  180. $(_this).parents('.my-card')[0].remove();
  181. }
  182. });
  183. });
  184. });
  185. }
  186. });
  187. }
  188. function ggggg() {
  189. codeListDiv.innerHTML = '';
  190. flow.load({
  191. elem: "#codeListDiv",
  192. isAuto: true,
  193. scrollElem: "#codeListDiv",
  194. done: function (page, next) {
  195. onload(page, next);
  196. }
  197. });
  198. }
  199. ggggg();
  200. });
  201. </script>
  202. </body>
  203. </html>