layout.ejs 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  6. <title><%= ctx.menu.name === undefined ? '主页' : ctx.menu.name %>-计量支付</title>
  7. <link rel="stylesheet" href="/public/css/bootstrap/bootstrap.min.css">
  8. <link rel="stylesheet" href="/public/css/main.css">
  9. <% if (ctx.request.host.indexOf('jlqa') !== -1 || ctx.request.host.indexOf('jluat') !== -1 || ctx.request.host === '127.0.0.1:7002') { %>
  10. <link rel="stylesheet" href="/public/css/qa_side.css">
  11. <% } %>
  12. <link rel="stylesheet" href="/public/css/toast.css">
  13. <link rel="stylesheet" href="/public/css/font-awesome/font-awesome.min.css">
  14. <link rel="stylesheet" type="text/css" href="/public/css/jquery-ui/jquery-ui.min.css">
  15. <link rel="stylesheet" href="/public/css/spreadjs/sheets/gc.spread.sheets.excelsmartcost.css">
  16. <link rel="stylesheet" href="/public/css/jquery-contextmenu/jquery.contextMenu.min.css">
  17. <link rel="stylesheet" href="/public/css/ztree/zTreeStyle.css" type="text/css">
  18. <link rel="stylesheet" href="/public/css/datepicker/datepicker.min.css" type="text/css">
  19. <link rel="stylesheet" href="/public/css/toastr.css">
  20. <link rel="shortcut icon" href="/public/images/favicon.ico">
  21. <link rel="stylesheet" href="/public/css/radar-animation.css">
  22. <!-- JS. -->
  23. <% for (const file of jsFiles) { %>
  24. <script type="text/javascript" src="<%- file %>"></script>
  25. <% } %>
  26. </head>
  27. <body oncontextmenu="return false;"> <!--屏蔽input鼠标右键-->
  28. <div>
  29. </div>
  30. <div class="main">
  31. <% include ./menu.ejs %>
  32. <div class="main-panel">
  33. <%- content %>
  34. </div>
  35. </div>
  36. <div class="toast" style="text-align: center">
  37. <i class="icon fa"></i>
  38. <span class="message"></span>
  39. </div>
  40. <!-- 遮罩层 -->
  41. <div id="hide-all" style="display:none;position: absolute;width: 100%;height: 100%;top:0;left: 0;z-index:10000000">
  42. </div>
  43. <%- modal %>
  44. <script type="text/javascript">
  45. toastr.options = {
  46. "closeButton": false,
  47. "debug": false,
  48. "newestOnTop": false,
  49. "progressBar": false,
  50. "positionClass": "toast-top-center",
  51. "preventDuplicates": false,
  52. "onclick": null,
  53. "showDuration": "300",
  54. "hideDuration": "1000",
  55. "timeOut": "5000",
  56. "extendedTimeOut": "1000",
  57. "showEasing": "swing",
  58. "hideEasing": "linear",
  59. "showMethod": "fadeIn",
  60. "hideMethod": "fadeOut"
  61. };
  62. let toastInfo = '<%- message %>';
  63. try {
  64. toastInfo = toastInfo !== '' && toastInfo !== 'null' ? JSON.parse(toastInfo) : '';
  65. } catch (error) {
  66. toastInfo = '';
  67. }
  68. if (toastInfo !== '') {
  69. toastr[toastInfo.type](toastInfo.message);
  70. }
  71. const userID = <%- ctx.session.sessionUser.accountId %>;
  72. let user = '<%= ctx.session.sessionUser.name %>';
  73. <% if (ctx.app.config.is_debug) { %>
  74. const is_debug = true;
  75. <% } %>
  76. </script>
  77. </body>
  78. </html>