index.html 1.6 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <!DOCTYPE html>
  2. <html style="scroll-behavior: smooth;">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,viewport-fit=cover" name="viewport" >
  6. <title>TOKTOK精酿啤酒屋</title>
  7. <link rel="shortcut icon" href=./static/favicon.ico />
  8. <script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
  9. <script>
  10. (function() {
  11. if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
  12. handleFontSize();
  13. } else {
  14. if (document.addEventListener) {
  15. document.addEventListener("WeixinJSBridgeReady", handleFontSize, false);
  16. } else if (document.attachEvent) {
  17. document.attachEvent("WeixinJSBridgeReady", handleFontSize);
  18. document.attachEvent("onWeixinJSBridgeReady", handleFontSize);
  19. }
  20. }
  21. function handleFontSize() {
  22. // 设置网页字体为默认大小
  23. WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize' : 0 });
  24. // 重写设置网页字体大小的事件
  25. WeixinJSBridge.on('menu:setfont', function() {
  26. WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize' : 0 });
  27. });
  28. }
  29. })();
  30. </script>
  31. <body>
  32. <div id="app"></div>
  33. <!-- built files will be auto injected -->
  34. </body>
  35. </html>