company.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. <!DOCTYPE html>
  2. <html>
  3. <head lang="en">
  4. <meta http-equiv="content-Type" content="text/html;charset=UTF-8" />
  5. <meta http-equiv="Access-Control-Allow-Origin" content="*" />
  6. <meta name="keywords" content="<?php echo $keywords ?>">
  7. <meta name="description" content="<?php echo $describe ?>">
  8. <title><?php echo $title ?></title>
  9. <link rel="stylesheet" href="official/website/css/main.css" />
  10. </head>
  11. <body>
  12. <div id="app">
  13. <div class="nav">
  14. <div class="nav-a">
  15. <div class="nav-ul">
  16. <div class="nav-logo">
  17. <img src="<?php echo $top['logo']?>" alt="" />
  18. </div>
  19. <?php foreach($top['navigation'] as $kk=>$vv) {?>
  20. <div class="nav-li <?php if($vv[tool]==$name){?> nav-selected <?php }?>">
  21. <a href="<?php echo $vv['url']?>"><?php echo $vv['name']?></a>
  22. </div>
  23. <?php }?>
  24. <?php if ($top['is_sign'] == 1) {?>
  25. <a href="#" id="jump-url">
  26. <div class="nav-login">
  27. <div>立即登录</div>
  28. </div>
  29. </a>
  30. <?php }?>
  31. </div>
  32. </div>
  33. </div>
  34. <div style="height: 74px"></div>
  35. <?php echo $content;?>
  36. <div class="b_condition-title2"></div>
  37. <div class="b_condition-title3"><a onclick="changeList()">⟳换一批</a><input type="hidden" id="pager" value="<?php echo $pager;?>"></div>
  38. <div class="b_condition-ul">
  39. <div class="b_condition-ul-left">
  40. <?php foreach($web_rel as $kk=>$vv) {?>
  41. <?php if (($kk%2) != 0) {?>
  42. <div class="b_condition-li">
  43. <a href="<?php echo $vv['web_url']?>"><?php echo $vv['title']?></a>
  44. </div>
  45. <?php }?>
  46. <?php }?>
  47. </div>
  48. <div class="b_condition-ul-right">
  49. <?php foreach($web_rel as $kk=>$vv) {?>
  50. <?php if (($kk%2) == 0) {?>
  51. <div class="b_condition-li">
  52. <a href="<?php echo $vv['web_url']?>"><?php echo $vv['title']?></a>
  53. </div>
  54. <?php }?>
  55. <?php }?>
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. <?php echo $tail;?>
  61. <div class="all-relation">
  62. <div class="relation-btn" id="relation-btn">
  63. <div class="relation-btn-one" id="callus">
  64. <img src="official/website/images/lianxikefu.png" alt="" />
  65. <div>联系客服</div>
  66. </div>
  67. <div class="relation-btn-one" id="back-top">
  68. <img src="official/website/images/huidaodingbu.png" alt="" />
  69. <div>回到顶部</div>
  70. </div>
  71. </div>
  72. <div class="relation">
  73. <div class="relation-title">在线咨询</div>
  74. <a href="<?php echo $basic['cus_link']?>" title="点击咨询">
  75. <div class="relation-tel">
  76. <div class="relation-tel-img">
  77. <img src="official/website/images/suspension_qq.png" alt="" />
  78. </div>
  79. <div class="relation-tel-word">在线客服</div>
  80. </div>
  81. </a>
  82. <div class="relation-tel">
  83. <div class="relation-tel-img">
  84. <img src="official/website/images/suspension_tel.png" alt="" />
  85. </div>
  86. <div class="relation-tel-word"><?php echo $basic['cus_mobile']?></div>
  87. </div>
  88. <div class="relation-tel relation-tel1">
  89. <div class="relation-tel-img">
  90. <img src="official/website/images/suspension_wechat.png" alt="" />
  91. </div>
  92. <div class="relation-tel-word">微信二维码</div>
  93. </div>
  94. <div class="qr-img">
  95. <img src="<?php echo $basic['cus_url']?>" alt="" />
  96. </div>
  97. <img id="close-btn" style="position: absolute; top: -15px; right: -25px" src="official/website/images/adsystem_icon_cancle.png" alt=""/>
  98. </div>
  99. </div>
  100. </div>
  101. <script type="text/javascript">
  102. var url = "";
  103. window.onload = function () {
  104. url = window.location.protocol+"//"+window.location.host+"/admin.html";
  105. if(document.getElementById("jump-url")) {
  106. document.getElementById("jump-url").setAttribute("href", url);
  107. }
  108. let dom1 = document.querySelectorAll(".news-li");
  109. if (dom1 && dom1.length > 0) {
  110. for (let i = 0; i < dom1.length; i++) {
  111. dom1[i].onmouseover = function (e) {
  112. e.currentTarget.classList.add("news-li-selected");
  113. };
  114. dom1[i].onmouseout = function (e) {
  115. e.currentTarget.classList.remove("news-li-selected");
  116. };
  117. }
  118. }
  119. let dom2 = document.querySelectorAll(".news-right-content");
  120. if (dom2 && dom2.length > 0) {
  121. for (let i = 0; i < dom2.length; i++) {
  122. dom2[i].onmouseover = function (e) {
  123. var ev = e || window.event; // 事件
  124. var target = e.target || e.srcElement; // 获得事件源
  125. target.classList.add("news-li-selected");
  126. };
  127. dom2[i].onmouseout = function (e) {
  128. var ev = e || window.event; // 事件
  129. var target = e.target || e.srcElement; // 获得事件源
  130. target.classList.remove("news-li-selected");
  131. };
  132. }
  133. }
  134. document.getElementById("callus").onclick = function (e) {
  135. document.getElementById("relation-btn").style.display = "none";
  136. document
  137. .getElementsByClassName("all-relation")[0]
  138. .classList.add("all-relation-hover");
  139. };
  140. document.getElementById("close-btn").onclick = function (e) {
  141. document.getElementById("relation-btn").style.display =
  142. "inline-block";
  143. document
  144. .getElementsByClassName("all-relation")[0]
  145. .classList.remove("all-relation-hover");
  146. };
  147. var scrollTop =
  148. document.documentElement.scrollTop || document.body.scrollTop;
  149. if (scrollTop > 0) {
  150. document.getElementById("back-top").style.display = "block";
  151. } else {
  152. document.getElementById("back-top").style.display = "none";
  153. }
  154. document.getElementById("back-top").onclick = function (e) {
  155. if (document.documentElement.scrollTop) {
  156. document.documentElement.scrollTop = 0;
  157. } else {
  158. document.body.scrollTop = 0;
  159. }
  160. };
  161. window.onscroll = function () {
  162. var scrollTop =
  163. document.documentElement.scrollTop || document.body.scrollTop;
  164. if (scrollTop > 0) {
  165. document.getElementById("back-top").style.display = "block";
  166. } else {
  167. document.getElementById("back-top").style.display = "none";
  168. }
  169. };
  170. };
  171. </script>
  172. <script>
  173. function changeList() {
  174. var url = "<?php echo $follow_url;?>";
  175. var pager = document.getElementById("pager").value;
  176. ajax({
  177. url: url, //请求地址
  178. type: "POST", //请求方式
  179. data: {page:pager}, //请求参数
  180. dataType: "json",
  181. success: function (response, xml) {
  182. // 此处放成功后执行的代码
  183. // alert('提交成功!');
  184. // let list = [{},{},{},{},{}];//数据格式
  185. let data = JSON.parse(response);
  186. //console.log(response.data);
  187. let list = data.data.news;
  188. let list2 = data.data.read;
  189. setList(list);
  190. setList2(list2);
  191. document.getElementById("pager").value = parseInt(pager)+1;
  192. },
  193. fail: function (status) {
  194. // 此处放失败后执行的代码
  195. // alert('提交失败!');
  196. },
  197. });
  198. }
  199. function setList(list) {
  200. if (list.length && list != null && list.length > 0) {
  201. let html = "";
  202. list.forEach((item, index) => {
  203. html += `
  204. <div class="b_condition-li">
  205. <a href="`+item.detail_url+`">`+item.title+`</a>
  206. </div>
  207. `;
  208. });
  209. // 清空原来子节点
  210. var div = document.getElementsByClassName("b_condition-ul-left")[0];
  211. if (div) {
  212. while (div.hasChildNodes()) {
  213. //当div下还存在子节点时 循环继续
  214. div.removeChild(div.firstChild);
  215. }
  216. //console.log(html);
  217. div.innerHTML = html;
  218. }
  219. }
  220. }
  221. function setList2(list) {
  222. if (list.length && list != null && list.length > 0) {
  223. let html = "";
  224. list.forEach((item, index) => {
  225. html += `
  226. <div class="b_condition-li">
  227. <a href="`+item.detail_url+`">`+item.title+`</a>
  228. </div>
  229. `;
  230. });
  231. // 清空原来子节点
  232. var div = document.getElementsByClassName("b_condition-ul-right")[0];
  233. if (div) {
  234. while (div.hasChildNodes()) {
  235. //当div下还存在子节点时 循环继续
  236. div.removeChild(div.firstChild);
  237. }
  238. //console.log(html);
  239. div.innerHTML = html;
  240. }
  241. }
  242. }
  243. // ajax
  244. function ajax(options) {
  245. options = options || {};
  246. options.type = (options.type || "GET").toUpperCase();
  247. options.dataType = options.dataType || "json";
  248. var params = formatParams(options.data);
  249. //创建 - 非IE6 - 第一步
  250. if (window.XMLHttpRequest) {
  251. var xhr = new XMLHttpRequest();
  252. } else {
  253. //IE6及其以下版本浏览器
  254. var xhr = new ActiveXObject("Microsoft.XMLHTTP");
  255. }
  256. //接收 - 第三步
  257. xhr.onreadystatechange = function () {
  258. if (xhr.readyState == 4) {
  259. var status = xhr.status;
  260. if (status >= 200 && status < 300) {
  261. options.success &&
  262. options.success(xhr.responseText, xhr.responseXML);
  263. } else {
  264. options.fail && options.fail(status);
  265. }
  266. }
  267. };
  268. //连接 和 发送 - 第二步
  269. if (options.type == "GET") {
  270. xhr.open("GET", options.url + "?" + params, true);
  271. xhr.send(null);
  272. } else if (options.type == "POST") {
  273. xhr.open("POST", options.url, true);
  274. //设置表单提交时的内容类型
  275. xhr.setRequestHeader(
  276. "Content-Type",
  277. "application/x-www-form-urlencoded"
  278. );
  279. xhr.send(params);
  280. }
  281. }
  282. //格式化参数
  283. function formatParams(data) {
  284. var arr = [];
  285. for (var name in data) {
  286. arr.push(
  287. encodeURIComponent(name) + "=" + encodeURIComponent(data[name])
  288. );
  289. }
  290. arr.push(("v=" + Math.random()).replace(".", ""));
  291. return arr.join("&");
  292. }
  293. </script>
  294. </body>
  295. </html>