index.html 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1.0">
  6. <!-- 外部链接图片加载 -->
  7. <meta name="referrer" content="no-referrer"/>
  8. <title>pc-chat</title>
  9. </head>
  10. <body>
  11. <div id="app"></div>
  12. <!-- built files will be auto injected -->
  13. </body>
  14. <script>
  15. let name = getQueryString('pid');
  16. // console.log(name)
  17. if(name == "~!@#¥%……&*()——+,./;'[]"){
  18. // console.log(name)
  19. }else {
  20. document.getElementById("app").remove();
  21. var parent = document.body;
  22. var div = document.createElement("div");
  23. parent.appendChild(div)
  24. div.innerHTML = "无效访问地址";
  25. }
  26. function getQueryString(name) {
  27. var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
  28. var r = window.location.search.substr(1).match(reg);
  29. if (r != null) {
  30. return unescape(r[2]);
  31. }
  32. return null;
  33. }
  34. // !function (window) {
  35. // /* 设计图文档宽度 */
  36. // var docWidth = 100/1920;
  37. // var doc = window.document,
  38. // docEl = doc.documentElement,
  39. // resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize';
  40. // var recalc = (function refreshRem () {
  41. // let client_width = document.body.clientWidth
  42. // console.log(client_width)
  43. // /* 8.55:小于320px不再缩小,11.73:大于440px不再放大 */
  44. // if(client_width <500){
  45. // docWidth = 10/750
  46. // //var clientWidth = docEl.getBoundingClientRect().width;
  47. // ///docEl.style.fontSize = Math.max(Math.min(20 * (clientWidth / docWidth), 11.73), 8.55) * 5 + 'px';
  48. // docEl.style.fontSize =parseInt(414/750*100) +'px';
  49. // }else{
  50. // docEl.style.fontSize =docWidth*1920 + 'px';//pcduan
  51. // }
  52. // console.log('11',docEl.style.fontSize)
  53. // return refreshRem;
  54. // })();
  55. // /* 添加倍屏标识,安卓为1 */
  56. // docEl.setAttribute('data-dpr', window.navigator.appVersion.match(/iphone/gi) ? window.devicePixelRatio : 1);
  57. // if (/iP(hone|od|ad)/.test(window.navigator.userAgent)) {
  58. // /* 添加IOS标识 */
  59. // doc.documentElement.classList.add('ios');
  60. // /* IOS8以上给html添加hairline样式,以便特殊处理 */
  61. // if (parseInt(window.navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/)[1], 10) >= 8)
  62. // doc.documentElement.classList.add('hairline');
  63. // }
  64. // if (!doc.addEventListener) return;
  65. // window.addEventListener(resizeEvt, recalc, false);
  66. // doc.addEventListener('DOMContentLoaded', recalc, false);
  67. // }(window);
  68. </script>
  69. </html>