bugfix:跳转链接

This commit is contained in:
2021-02-24 16:53:27 +08:00
parent f31385d58d
commit bcddd98738
2 changed files with 16 additions and 15 deletions

View File

@@ -21,7 +21,7 @@ namespace QRCodeService.Controllers
public async Task<IActionResult> Index(string shortCode)
{
var link = await queries.GetLinkAsync(shortCode);
return View(new {link.FullUrl });
return View(link);
}
}
}

View File

@@ -2,18 +2,19 @@
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div>
loading...
</div>
<script>
location.href="@ViewData["FullUrl"]"
</script>
</body>
</html>
}
@model QRCodeService.Application.Queries.Link
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div>
loading...
</div>
<script>
location.href = "@Model.FullUrl"
</script>
</body>
</html>