widget.html 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="referrer" content="no-referrer" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <meta http-equiv="X-UA-Compatible" content="ie=edge"><meta http-equiv="Pragma" content="no-cache">
  8. <meta http-equiv="Cache-Control" content="no-cache">
  9. <meta http-equiv="Expires" content="0">
  10. <title> Application </title>
  11. <link rel="stylesheet" href="../../../../lappreportrt/nc-report/index.css" />
  12. <link rel="stylesheet" href="../../../../platform/nc-lightapp-front/nc-lightapp-front.css" />
  13. <script type="text/javascript" src="../../../../platform/yonyou-yyy.js"></script>
  14. <!-- <%= configcss %> -->
  15. </head>
  16. <body>
  17. <div id="app"></div>
  18. <script type="text/javascript" src="../../../../platform/polyfill.min.js"></script>
  19. <script type="text/javascript" src="../../../../platform/ca/ca0.js"></script>
  20. <script type="text/javascript" src="../../../../platform/ca/ca1.js"></script>
  21. <script type="text/javascript" src="../../../../platform/ca/ca2.js"></script>
  22. <script type="text/javascript" src="../../../../platform/ca/nccsign.js"></script>
  23. <script type="text/javascript" src="../../../../platform/ca/sha256.js"></script>
  24. <script>
  25. (function () {
  26. loadScripts([
  27. { src: '../../../../platform/axios.min.js', root: 'axios' },
  28. { src: '../../../../platform/react.production.min.js', root: 'React' },
  29. { src: '../../../../platform/react-dom.production.min.js', root: 'ReactDOM' },
  30. { src: '../../../../platform/ReactRouter.min.js', root: 'ReactRouter' },
  31. { src: '../../../../platform/nc-lightapp-front/nc-lightapp-front.js', root: 'nc-lightapp-front' }
  32. ])
  33. function loadScripts(scripts) {
  34. // scripts = [{ src, root }]
  35. scripts.forEach(function (e) {
  36. var src = e.src, root = e.root
  37. if (window.top[root]) {
  38. window[root] = window.top[root];
  39. if (root === 'nc-lightapp-front') {
  40. if (window['platform-login']) {
  41. window[root].pageTo = window['platform-login'].pageTo;
  42. }
  43. }
  44. } else {
  45. // document.body.appendChild(script)是异步加载script
  46. // 直接创建sciprt标签是同步加载script
  47. // 分开script,防止html认为是闭合标签
  48. document.write('<scr' + 'ipt type="text/javascript" src="' + src + '"></scr' + 'ipt>');
  49. }
  50. })
  51. }
  52. })()
  53. </script>
  54. <!-- <%= configjs %> -->
  55. </body>