Browse Source

fix:添加favicon,自动添加http

master
Naccl 4 years ago
parent
commit
474f83a517
  1. 3
      src/main/java/top/naccl/dwz/controller/IndexController.java
  2. BIN
      src/main/resources/static/img/favicon.ico
  3. 1
      src/main/resources/templates/index.html

3
src/main/java/top/naccl/dwz/controller/IndexController.java

@ -38,6 +38,9 @@ public class IndexController {
@ResponseBody
public R generateShortURL(@RequestParam String longURL) {
if (UrlUtils.checkURL(longURL)) {
if (!longURL.startsWith("http")) {
longURL = "http://" + longURL;
}
String shortURL = urlService.saveUrlMap(HashUtils.hashToBase62(longURL), longURL, longURL);
return R.ok("请求成功", host + shortURL);
}

BIN
src/main/resources/static/img/favicon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

1
src/main/resources/templates/index.html

@ -3,6 +3,7 @@
<head>
<meta charset="UTF-8">
<title>短链接生成</title>
<link rel="icon" href="/img/favicon.ico">
<link rel="stylesheet" href="/css/base.css">
</head>
<body>

Loading…
Cancel
Save