Skip to content

Commit

Permalink
位于LB背后的应用,不知道自己的真实访问地址,也就不可能拼接一个正确的Url地址
Browse files Browse the repository at this point in the history
  • Loading branch information
nnhy committed Oct 24, 2023
1 parent 5b527d1 commit dc7f827
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions NewLife.CubeNC/Views/Shared/_List_Data_Item.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -177,18 +177,7 @@ else
var name = item.MapProvider.EntityType.Name;
var key = item.MapProvider.Key;
val = entity[item.MapField];
//从菜单查找相关
var menu = Menu.FindForName(@name);
if (menu != null)
{
//获取控制器名称,拼接全路径
var fullPath = $"{this.Context.Request.Scheme}://{this.Context.Request.Host}/{menu.ParentNodeName}/{@name}?{@key}={@val}";
<td class="text-center"><a href="@fullPath">@value</a></td>
}
else
{
<td class="text-center"><a href="@name?@key=@val">@value</a></td>
}
<td class="text-center"><a href="@name?@key=@val">@value</a></td>
}
else
{
Expand All @@ -206,14 +195,7 @@ else
}
else
{
if (!item.ItemType.IsNullOrEmpty() && item.ItemType.EqualIgnoreCase("file-WebUploader"))
{
<td class="text-center">@await Html.PartialAsync("_View_ImgView",value)</td>
}
else
{
<td>@value</td>
}
<td>@value</td>
}
}
break;
Expand Down

0 comments on commit dc7f827

Please sign in to comment.