@using System.Text.Json
@using Dpz.Core.Auth.Models
@inject Dpz.Core.Auth.Service.AuthAssetService AuthAssetService
@inject Microsoft.AspNetCore.Antiforgery.IAntiforgery Antiforgery
@model AuthShellViewModel
@{
Layout = null;
IgnoreBody();
var tokens = Antiforgery.GetAndStoreTokens(Context);
var payloadJson = JsonSerializer.Serialize(
Model,
Model.GetType(),
new JsonSerializerOptions(JsonSerializerDefaults.Web)
);
}
<!DOCTYPE html>
<html lang="zh-Hans">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="request-verification-token" content="@tokens.RequestToken" />
<title>Dpz.Core 认证中心</title>
@foreach (var styleUrl in AuthAssetService.GetStyleUrls(Model.EntryName))
{
<link rel="stylesheet" href="@styleUrl" />
}
</head>
<body>
<div id="app"></div>
<script type="application/json" id="auth-page-model">@Html.Raw(payloadJson)</script>
@foreach (var scriptUrl in AuthAssetService.GetScriptUrls(Model.EntryName))
{
<script type="module" src="@scriptUrl"></script>
}
</body>
</html>
AI 正在分析代码…
评论加载中...