layout.ejs 3.0 KB

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