浏览代码

后台菜单标题显示修复

lcl 1 年之前
父节点
当前提交
0902d4692f
共有 4 个文件被更改,包括 52 次插入8 次删除
  1. 7 7
      Areas/Admin/Views/Home/Index.cshtml
  2. 12 0
      BsModels/RefreshTokens.cs
  3. 2 1
      BsModels/RightDic.cs
  4. 31 0
      BsModels/WebCMSEntities.cs

+ 7 - 7
Areas/Admin/Views/Home/Index.cshtml

@@ -123,9 +123,9 @@
                                 <li data-name="component" class="layui-nav-item">
                                     @if (children1.Count > 0)
                                     {
-                                        <a href="javascript:;" lay-tips="@sub1.Name" title="@sub1.Name" lay-direction="2">
+                                        <a href="javascript:;" lay-tips="@sub1.Title" title="@sub1.Title" lay-direction="2">
                                             <i class="layui-icon @(string.IsNullOrEmpty(sub1.Icon) ? "layui-icon-component" : sub1.Icon)"></i>
-                                            <cite>@sub1.Name</cite>
+                                            <cite>@sub1.Title</cite>
                                         </a>
                                         <dl class="layui-nav-child">
                                             @foreach (RightDic sub2 in children1)
@@ -137,7 +137,7 @@
                                                     <dd data-name="grid">
                                                         @if (children2.Count > 0)
                                                         {
-                                                            <a href="javascript:;" title="@sub2.Name">@sub2.Name</a>
+                                                            <a href="javascript:;" title="@sub2.Title">@sub2.Title</a>
                                                             <dl class="layui-nav-child">
                                                                 @foreach (RightDic sub3 in children2)
                                                                 {
@@ -152,7 +152,7 @@
                                                                         {
                                                                             url += "?right=" + sub3.Id;
                                                                         }
-                                                                        <dd data-name="list"><a lay-href="@url" title="@sub3.Name">@sub3.Name</a></dd>
+                                                                        <dd data-name="list"><a lay-href="@url" title="@sub3.Title">@sub3.Title</a></dd>
                                                                     }
                                                                 }
                                                             </dl>
@@ -168,7 +168,7 @@
                                                             {
                                                                 url += "?right=" + sub2.Id;
                                                             }
-                                                            <a lay-href="@url" title="@sub2.Name">@sub2.Name</a>
+                                                            <a lay-href="@url" title="@sub2.Title">@sub2.Title</a>
                                                             
                                                         }
                                                     </dd>
@@ -187,9 +187,9 @@
                                         {
                                             url += "?right=" + sub1.Id;
                                         }
-                                        <a href="javascript:;" lay-href="@url" title="@sub1.Name" lay-tips="@sub1.Name" lay-direction="2">
+                                        <a href="javascript:;" lay-href="@url" title="@sub1.Title" lay-tips="@sub1.Title" lay-direction="2">
                                             <i class="layui-icon layui-icon-component"></i>
-                                            <cite>@sub1.Name</cite>
+                                            <cite>@sub1.Title</cite>
                                         </a>
                                     }
                                 </li>

+ 12 - 0
BsModels/RefreshTokens.cs

@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+
+namespace MySystem.BsModels
+{
+    public partial class RefreshTokens
+    {
+        public int UserId { get; set; }
+        public DateTime? ExpiredDate { get; set; }
+        public string RefreshToken { get; set; }
+    }
+}

+ 2 - 1
BsModels/RightDic.cs

@@ -15,6 +15,7 @@ namespace MySystem.BsModels
         public ulong MainStat { get; set; }
         public ulong MainDataList { get; set; }
         public string OtherRight { get; set; }
-        
+        public string Path { get; set; }
+        public string Title { get; set; }
     }
 }

+ 31 - 0
BsModels/WebCMSEntities.cs

@@ -30,6 +30,7 @@ namespace MySystem.BsModels
         public virtual DbSet<OperateRightList> OperateRightList { get; set; }
         public virtual DbSet<PageInfo> PageInfo { get; set; }
         public virtual DbSet<PublicAccountSet> PublicAccountSet { get; set; }
+        public virtual DbSet<RefreshTokens> RefreshTokens { get; set; }
         public virtual DbSet<RightDic> RightDic { get; set; }
         public virtual DbSet<SysAdmin> SysAdmin { get; set; }
         public virtual DbSet<SysAdminRole> SysAdminRole { get; set; }
@@ -1228,6 +1229,21 @@ namespace MySystem.BsModels
                     .HasCollation("utf8_general_ci");
             });
 
+            modelBuilder.Entity<RefreshTokens>(entity =>
+            {
+                entity.HasKey(e => e.UserId)
+                    .HasName("PRIMARY");
+
+                entity.Property(e => e.UserId).HasColumnType("int(11)");
+
+                entity.Property(e => e.ExpiredDate).HasColumnType("datetime");
+
+                entity.Property(e => e.RefreshToken)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+            });
+
             modelBuilder.Entity<RightDic>(entity =>
             {
                 entity.Property(e => e.Id)
@@ -1258,10 +1274,25 @@ namespace MySystem.BsModels
                     .HasCharSet("utf8")
                     .HasCollation("utf8_general_ci");
 
+                entity.Property(e => e.OtherRight)
+                    .HasColumnType("varchar(500)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
+                entity.Property(e => e.Path)
+                    .HasColumnType("varchar(200)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
                 entity.Property(e => e.RightLevel).HasColumnType("int(11)");
 
                 entity.Property(e => e.Sort).HasColumnType("int(11)");
 
+                entity.Property(e => e.Title)
+                    .HasColumnType("varchar(50)")
+                    .HasCharSet("utf8")
+                    .HasCollation("utf8_general_ci");
+
                 entity.Property(e => e.Url)
                     .HasColumnType("varchar(200)")
                     .HasCharSet("utf8")