layout.ejs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. <meta http-equiv="x-ua-compatible" content="ie=edge">
  7. <title><%= ctx.menu.name === undefined ? '主页' : ctx.menu.name %>-计量支付</title>
  8. <link rel="stylesheet" href="/public/css/bootstrap/bootstrap.min.css">
  9. <link rel="stylesheet" href="/public/css/main.css">
  10. <link rel="stylesheet" href="/public/css/toast.css">
  11. <link rel="stylesheet" href="/public/css/font-awesome/font-awesome.min.css">
  12. <link rel="stylesheet" href="/public/css/spreadjs/sheets/gc.spread.sheets.excelsmartcost.css">
  13. <link rel="stylesheet" href="/public/css/jquery-contextmenu/jquery.contextMenu.min.css">
  14. <link rel="stylesheet" href="/public/css/ztree/zTreeStyle.css" type="text/css">
  15. <link rel="stylesheet" href="/public/css/datepicker/datepicker.min.css" rel="stylesheet" type="text/css">
  16. <!-- JS. -->
  17. <% for (const file of jsFiles) { %>
  18. <script type="text/javascript" src="<%- file %>"></script>
  19. <% } %>
  20. </head>
  21. <body>
  22. <div>
  23. </div>
  24. <div class="main">
  25. <% include ./menu.ejs %>
  26. <div class="main-panel">
  27. <%- content %>
  28. </div>
  29. </div>
  30. <div class="toast" style="position: absolute; z-index: 9;">
  31. <i class="icon fa"></i>
  32. <span class="message"></span>
  33. </div>
  34. <%- modal %>
  35. <script type="text/javascript">
  36. let toastInfo = '<%- message %>';
  37. try {
  38. toastInfo = toastInfo !== '' && toastInfo !== 'null' ? JSON.parse(toastInfo) : '';
  39. } catch (error) {
  40. toastInfo = '';
  41. }
  42. if (toastInfo !== '') {
  43. toast(toastInfo.message, toastInfo.type, toastInfo.icon);
  44. }
  45. let user = '<%= ctx.session.sessionUser.name %>';
  46. </script>
  47. </body>
  48. </html>