index.html 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <!-- <meta name="viewport" content="width=device-width,initial-scale=1.0"> -->
  6. <!-- <meta name="viewport" content="width=device-width,initial-scale=1.0,viewport-fit=cover"> -->
  7. <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=0">
  8. <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
  9. <title>TOKTOK门店菜单管理</title>
  10. <link rel="icon" type="image/x-icon" href="static/favicon.ico">
  11. </head>
  12. <body>
  13. <div id="app"></div>
  14. <!-- built files will be auto injected -->
  15. </body>
  16. <script>
  17. (function() {
  18. if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
  19. handleFontSize();
  20. } else {
  21. if (document.addEventListener) {
  22. document.addEventListener("WeixinJSBridgeReady", handleFontSize, false);
  23. } else if (document.attachEvent) {
  24. document.attachEvent("WeixinJSBridgeReady", handleFontSize);
  25. document.attachEvent("onWeixinJSBridgeReady", handleFontSize);
  26. }
  27. }
  28. function handleFontSize() {
  29. // 设置网页字体为默认大小
  30. WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize' : 0 });
  31. // 重写设置网页字体大小的事件
  32. WeixinJSBridge.on('menu:setfont', function() {
  33. WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize' : 0 });
  34. });
  35. }
  36. })();
  37. </script>
  38. </html>