Error.cshtml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. @using Abp.Collections.Extensions
  2. @model Abp.Web.Mvc.Models.ErrorViewModel
  3. @{
  4. ViewBag.Title = L("ErrorPage");
  5. }
  6. <style>
  7. body {
  8. width: 100vw;
  9. height: 100vh;
  10. overflow: hidden;
  11. }
  12. </style>
  13. @*
  14. <div class="row">
  15. <section class="col-lg-12">
  16. <div class="panel panel-warning">
  17. <div class="panel-heading">
  18. <h3 class="panel-title">@Model.ErrorInfo.Message</h3>
  19. </div>
  20. <div class="panel-body">
  21. <p>
  22. @(!string.IsNullOrEmpty(Model.ErrorInfo.Details) ? Model.ErrorInfo.Details : Model.ErrorInfo.Message)
  23. </p>
  24. $1$ Show validation errors #1#
  25. @if (!Model.ErrorInfo.ValidationErrors.IsNullOrEmpty())
  26. {
  27. <ul>
  28. @foreach (var validationError in Model.ErrorInfo.ValidationErrors)
  29. {
  30. <li>
  31. @validationError.Message
  32. @if (validationError.Members != null && validationError.Members.Any())
  33. {
  34. <text>(@string.Join(", ", validationError.Members))</text>
  35. }
  36. </li>
  37. }
  38. </ul>
  39. }
  40. </div>
  41. </div>
  42. </section>
  43. </div>
  44. *@
  45. <section class="content" style="min-height: 300px;height: 100%;display: flex;justify-content: center;align-items: center;">
  46. <div class="error-page">
  47. @*<h2 class="headline text-danger">500</h2>*@
  48. <div class="error-content" style="height: 120px;display: flex;flex-direction: column;justify-content: center;">
  49. <h3 style="font-size: 2rem;"><i class="fa fa-exclamation-triangle text-danger mr-2"></i>系统错误</h3>
  50. <p class=" text-danger" style="font-size: 1.5rem;">
  51. @(!string.IsNullOrEmpty(Model.ErrorInfo.Details) ? Model.ErrorInfo.Details : Model.ErrorInfo.Message)
  52. </p>
  53. </div>
  54. </div>
  55. <!-- /.error-page -->
  56. </section>
  57. @section scripts{
  58. <script>
  59. console.log('@(Model.Exception.Message)');
  60. console.log('@(Model.Exception.ToString())');
  61. </script>
  62. }