hpMain.htm 1.3 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,user-scalable=no">
  6. <meta name="apple-mobile-web-app-capable" content="yes">
  7. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  8. <title></title>
  9. <script type="text/javascript">
  10. $(function(){
  11. haifmp.loadMobilePage("haifmp", "hpSjlrIndex.htm?mcid=" + $("#mcid").val());
  12. });
  13. </script>
  14. </head>
  15. <body>
  16. <input type="hidden" id="mcid" value="$!mcid" />
  17. <input type="hidden" id="devType" value="$!devType" />
  18. <input type="hidden" id="oldDwebIndex" value="" />
  19. <div id="haifmp" style="height:100% !important;display: flex;flex: 1;-webkit-flex: 1;flex-direction: column;"></div>
  20. </body>
  21. <script type="text/javascript">
  22. (function (doc,win) {
  23. var docEl = doc.documentElement;
  24. var resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize';
  25. var recalc = function () {
  26. var clientWidth = docEl.clientWidth;
  27. if (!clientWidth) return;
  28. if(clientWidth>=640){
  29. docEl.style.fontSize = '100px';
  30. }else{
  31. docEl.style.fontSize = 100 * (clientWidth / 640) + 'px';
  32. }
  33. };
  34. if (!doc.addEventListener) return;
  35. win.addEventListener(resizeEvt, recalc, false);
  36. doc.addEventListener('DOMContentLoaded', recalc, false);
  37. })(document, window);
  38. </script>
  39. </html>