优化前端路由返回数据
This commit is contained in:
parent
bdfbee2614
commit
ece04bb3d3
@ -71,5 +71,9 @@ namespace ZR.Model.System
|
|||||||
/// https请求
|
/// https请求
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string HTTPS = "https://";
|
public static string HTTPS = "https://";
|
||||||
|
/// <summary>
|
||||||
|
/// www主域
|
||||||
|
/// </summary>
|
||||||
|
public static string WWW = "www.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,19 +52,16 @@ namespace ZR.Model.System.Vo
|
|||||||
Icon = icon;
|
Icon = icon;
|
||||||
Link = path;
|
Link = path;
|
||||||
}
|
}
|
||||||
public Meta(string title, string icon, bool noCache)
|
|
||||||
{
|
|
||||||
Title = title;
|
|
||||||
Icon = icon;
|
|
||||||
NoCache = noCache;
|
|
||||||
}
|
|
||||||
public Meta(string title, string icon, bool noCache, string titleKey, string path)
|
public Meta(string title, string icon, bool noCache, string titleKey, string path)
|
||||||
{
|
{
|
||||||
Title = title;
|
Title = title;
|
||||||
Icon = icon;
|
Icon = icon;
|
||||||
NoCache = noCache;
|
NoCache = noCache;
|
||||||
TitleKey = titleKey;
|
TitleKey = titleKey;
|
||||||
|
if (!string.IsNullOrEmpty(path) && (path.StartsWith(UserConstants.HTTP) || path.StartsWith(UserConstants.HTTPS)))
|
||||||
|
{
|
||||||
Link = path;
|
Link = path;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -549,7 +549,11 @@ namespace ZR.Service
|
|||||||
/// < returns ></ returns >
|
/// < returns ></ returns >
|
||||||
public string InnerLinkReplaceEach(string path)
|
public string InnerLinkReplaceEach(string path)
|
||||||
{
|
{
|
||||||
return path.IsNotEmpty() ? path.Replace(UserConstants.HTTP, "").Replace(UserConstants.HTTPS, "") : path;
|
return path.IsNotEmpty() ? path
|
||||||
|
.Replace(UserConstants.HTTP, "")
|
||||||
|
.Replace(UserConstants.HTTPS, "")
|
||||||
|
.Replace(UserConstants.WWW, "")
|
||||||
|
.Replace(".", "/") : path;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user