index.html 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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('type');
  16. // console.log(name)
  17. function getQueryString(name) {
  18. var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
  19. var r = window.location.search.substr(1).match(reg);
  20. if (r != null) {
  21. return unescape(r[2]);
  22. }
  23. return null;
  24. }
  25. // !function (window) {
  26. // /* 设计图文档宽度 */
  27. // var docWidth = 100/1920;
  28. // var doc = window.document,
  29. // docEl = doc.documentElement,
  30. // resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize';
  31. // var recalc = (function refreshRem () {
  32. // let client_width = document.body.clientWidth
  33. // console.log(client_width)
  34. // /* 8.55:小于320px不再缩小,11.73:大于440px不再放大 */
  35. // if(client_width <500){
  36. // docWidth = 10/750
  37. // //var clientWidth = docEl.getBoundingClientRect().width;
  38. // ///docEl.style.fontSize = Math.max(Math.min(20 * (clientWidth / docWidth), 11.73), 8.55) * 5 + 'px';
  39. // docEl.style.fontSize =parseInt(414/750*100) +'px';
  40. // }else{
  41. // docEl.style.fontSize =docWidth*1920 + 'px';//pcduan
  42. // }
  43. // console.log('11',docEl.style.fontSize)
  44. // return refreshRem;
  45. // })();
  46. // /* 添加倍屏标识,安卓为1 */
  47. // docEl.setAttribute('data-dpr', window.navigator.appVersion.match(/iphone/gi) ? window.devicePixelRatio : 1);
  48. // if (/iP(hone|od|ad)/.test(window.navigator.userAgent)) {
  49. // /* 添加IOS标识 */
  50. // doc.documentElement.classList.add('ios');
  51. // /* IOS8以上给html添加hairline样式,以便特殊处理 */
  52. // if (parseInt(window.navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/)[1], 10) >= 8)
  53. // doc.documentElement.classList.add('hairline');
  54. // }
  55. // if (!doc.addEventListener) return;
  56. // window.addEventListener(resizeEvt, recalc, false);
  57. // doc.addEventListener('DOMContentLoaded', recalc, false);
  58. // }(window);
  59. </script>
  60. </html>