index.html 977 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. <title>蔡氏PK公式</title>
  7. <link rel="stylesheet" type="text/css" href="./src/styles/layout.css">
  8. </head>
  9. <body>
  10. <div id="app"></div>
  11. <!-- built files will be auto injected -->
  12. </body>
  13. <style>
  14. html {
  15. font-size: 16px;
  16. }
  17. body {
  18. margin: 0px;
  19. padding: 0px;
  20. font-size: 16px;
  21. }
  22. </style>
  23. <script>
  24. (function() {
  25. if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
  26. handleFontSize();
  27. } else {
  28. document.addEventListener("WeixinJSBridgeReady", handleFontSize, false);
  29. }
  30. function handleFontSize() {
  31. // 设置网页字体为默认大小
  32. WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize' : 0 });
  33. // 重写设置网页字体大小的事件
  34. WeixinJSBridge.on('menu:setfont', function() {
  35. WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize' : 0 });
  36. });
  37. }
  38. })();
  39. </script>
  40. </html>