Blame view

public/js/vcCore/vc-lang.js 1 KB
809d9ffa   wuxw   流程设计页面组件没法和vue兼容只...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
  (function() {
      window.loadJS = function(url, callback) {
          let script = document.createElement('script'),
              fn = callback || function() {};
          script.type = 'text/javascript';
          //IE
          if (script.readyState) {
              script.onreadystatechange = function() {
                  if (script.readyState == 'loaded' || script.readyState == 'complete') {
                      script.onreadystatechange = null;
                      fn();
                  }
              };
          } else {
              //其他浏览器
              script.onload = function() {
                  fn();
              };
          }
          script.src = url;
          document.getElementsByTagName('head')[0].appendChild(script);
      }
  
      //let _langObj = vc.getData('JAVA110-LANG')
      let _langObj = JSON.parse(window.localStorage.getItem('JAVA110-LANG'));
      let _lang = 'zh-cn';
      if (_langObj) {
          _lang = _langObj.lang;
      }
      console.log(123)
      loadJS('/vcCore/vc-' + _lang + ".js")
  })(window.vcFramework)