index.html 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <!-- <script charset="utf-8" src="https://map.qq.com/api/gljs?v=1.exp&key=UPWBZ-LYEK2-FFUUS-CVJFM-X26WO-DFBWF"></script> -->
  6. <script src="https://3gimg.qq.com/lightmap/components/geolocation/geolocation.min.js"></script>
  7. <script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
  8. <!-- <meta name="viewport" content="width=device-width,initial-scale=1.0"> -->
  9. <!-- <meta name="viewport" content="width=device-width,initial-scale=1.0,viewport-fit=cover"> -->
  10. <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=0">
  11. <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
  12. <title>TOKTOK</title>
  13. <link rel="icon" type="image/x-icon" href="static/favicon.ico">
  14. </head>
  15. <body>
  16. <div id="app"></div>
  17. <!-- built files will be auto injected -->
  18. </body>
  19. <script>
  20. (function() {
  21. if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
  22. handleFontSize();
  23. } else {
  24. if (document.addEventListener) {
  25. document.addEventListener("WeixinJSBridgeReady", handleFontSize, false);
  26. } else if (document.attachEvent) {
  27. document.attachEvent("WeixinJSBridgeReady", handleFontSize);
  28. document.attachEvent("onWeixinJSBridgeReady", handleFontSize);
  29. }
  30. }
  31. function handleFontSize() {
  32. // 设置网页字体为默认大小
  33. WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize' : 0 });
  34. // 重写设置网页字体大小的事件
  35. WeixinJSBridge.on('menu:setfont', function() {
  36. WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize' : 0 });
  37. });
  38. }
  39. })();
  40. </script>
  41. </html>