initialize.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. (function initFs (globle) {
  2. initFs()
  3. IsPC()
  4. globle.externalStore = {
  5. dictionaryHeight: 0
  6. }
  7. globle.watchNetwork = { //学林定时器开关
  8. watchTime: 30000,
  9. switchTime: false
  10. }
  11. // 河南 - 在线协作跳转 ==> 流程配置页面
  12. globle.henan_iframe_page = {
  13. url: "",
  14. prcessFilter: ['gzpd-gfh', 'gzpd-gztf', 'gzpd-sdfg', 'jzwh_jhcl', 'CentralizationanalysisIDS', 'Centralizationanalysisprocess', 'jzwh_yhgzzz', 'xqcjgxlc', 'xhzwlc', 'scene_test_compete', 'road_test_problem', 'cellplan', 'cellplan_5gAndSoft', 'cellplan_yy_flow']
  15. }
  16. function initFs () {
  17. //设置html标签的font-size的大小
  18. var w = document.documentElement.offsetWidth;
  19. var fs = w / 1450 * 100 + 'px';
  20. var html = document.getElementsByTagName('html')[0];
  21. html.style.fontSize = fs;
  22. window.onresize = function () {
  23. initFs();
  24. };
  25. }
  26. function IsPC () {
  27. var userAgentInfo = navigator.userAgent;
  28. var Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod");
  29. var flag = true;
  30. for (var v = 0; v < Agents.length; v++) {
  31. if (userAgentInfo.indexOf(Agents[v]) > 0) { flag = false; break; }
  32. }
  33. this.isH5Milieu = !flag
  34. }
  35. })(window);