index.html 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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, viewport-fit=cover 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. <script src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
  12. </head>
  13. <body>
  14. <div id="app"></div>
  15. <!-- built files will be auto injected -->
  16. </body>
  17. <script>
  18. (function() {
  19. if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
  20. handleFontSize();
  21. } else {
  22. if (document.addEventListener) {
  23. document.addEventListener("WeixinJSBridgeReady", handleFontSize, false);
  24. } else if (document.attachEvent) {
  25. document.attachEvent("WeixinJSBridgeReady", handleFontSize);
  26. document.attachEvent("onWeixinJSBridgeReady", handleFontSize);
  27. }
  28. }
  29. function handleFontSize() {
  30. // 设置网页字体为默认大小
  31. WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize' : 0 });
  32. // 重写设置网页字体大小的事件
  33. WeixinJSBridge.on('menu:setfont', function() {
  34. WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize' : 0 });
  35. });
  36. }
  37. })();
  38. </script>
  39. </html>