Search.cshtml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. @using MySystem.BsModels;
  2. @{
  3. List<RightDic> menus = ViewBag.menus as List<RightDic>;
  4. string RightInfo = ViewBag.RightInfo as string;
  5. }
  6. <!DOCTYPE html>
  7. <html>
  8. <head>
  9. <meta charset="utf-8">
  10. <title>搜索菜单</title>
  11. <meta name="renderer" content="webkit">
  12. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  13. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  14. <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
  15. <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
  16. <style>
  17. .layadmin-carousel{
  18. height: 650px !important;
  19. }
  20. </style>
  21. </head>
  22. <body>
  23. <div class="layui-fluid">
  24. <div class="layui-row layui-col-space15">
  25. <div class="layui-col-sm12">
  26. <div class="layui-card">
  27. <div class="layui-card-header">快捷方式</div>
  28. <div class="layui-card-body">
  29. <div class="layui-carousel layadmin-carousel layadmin-shortcut">
  30. <div carousel-item>
  31. <ul class="layui-row layui-col-space10">
  32. @foreach(RightDic sub in menus)
  33. {
  34. if (RightInfo.Contains("," + sub.Id + ","))
  35. {
  36. string url = sub.Url;
  37. if (url.Contains("?"))
  38. {
  39. url += "&right=" + sub.Id;
  40. }
  41. else
  42. {
  43. url += "?right=" + sub.Id;
  44. }
  45. <li class="layui-col-xs2">
  46. <a lay-href="@url">
  47. <i class="layui-icon @(string.IsNullOrEmpty(sub.Icon) ? "layui-icon-component" : sub.Icon)"></i>
  48. <cite>@sub.Name</cite>
  49. </a>
  50. </li>
  51. }
  52. }
  53. </ul>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. <script src="/layuiadmin/modules/Main_Admin.js"></script>
  62. <script src="../../layuiadmin/layui/layui.js?t=1"></script>
  63. <script>
  64. layui.config({
  65. base: '../../layuiadmin/'
  66. }).extend({
  67. index: 'lib/index'
  68. }).use(['index', 'console', 'table'], function(){
  69. var $ = layui.$
  70. ,table = layui.table;
  71. });
  72. </script>
  73. </body>
  74. </html>