Fix img加载
parent
b55551d4c7
commit
ad3a4afc14
|
@ -3,7 +3,6 @@ package controller
|
||||||
import (
|
import (
|
||||||
"blog/config"
|
"blog/config"
|
||||||
"blog/models"
|
"blog/models"
|
||||||
"log"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
@ -13,7 +12,6 @@ func Memos(w http.ResponseWriter, r *http.Request) {
|
||||||
http.Error(w, "参数解析错误", http.StatusInternalServerError)
|
http.Error(w, "参数解析错误", http.StatusInternalServerError)
|
||||||
}
|
}
|
||||||
fun := r.Form.Get("name")
|
fun := r.Form.Get("name")
|
||||||
log.Printf("R:%v,name:%s\n", r.Form, fun)
|
|
||||||
switch fun {
|
switch fun {
|
||||||
case "talk":
|
case "talk":
|
||||||
Template := models.Template.Talk
|
Template := models.Template.Talk
|
||||||
|
|
|
@ -248,7 +248,7 @@
|
||||||
for (const item of items) {
|
for (const item of items) {
|
||||||
html += `<div class="bilibili_item"><span>${item.text}</span>`
|
html += `<div class="bilibili_item"><span>${item.text}</span>`
|
||||||
for (const id of item.ids) {
|
for (const id of item.ids) {
|
||||||
await fetch(`/api/bilibili?bvid=${id}`).then(res => res.json()).then(data => {
|
await fetch(window.location.href+`/api/bilibili?bvid=${id}`).then(res => res.json()).then(data => {
|
||||||
html += `<a href="https://www.bilibili.com/video/${id}/" class="bilibili_box" id="${id}">
|
html += `<a href="https://www.bilibili.com/video/${id}/" class="bilibili_box" id="${id}">
|
||||||
<div class="bilibili_cover">
|
<div class="bilibili_cover">
|
||||||
<img src="https://s1.hdslb.com/bfs/static/player/img/play.svg" class="play_icon no-lazyload">
|
<img src="https://s1.hdslb.com/bfs/static/player/img/play.svg" class="play_icon no-lazyload">
|
||||||
|
|
|
@ -206,8 +206,6 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="limit">- 只展示最近30条说说 -</div>
|
<div class="limit">- 只展示最近30条说说 -</div>
|
||||||
<script defer src="https://cdn.jsdelivr.net/gh/jkjoy/14e/js/waterfall.min.js"></script>
|
|
||||||
<script defer src="https://cdn.jsdelivr.net/gh/jkjoy/14e/js/imgStatus.min.js"></script>
|
|
||||||
<script>
|
<script>
|
||||||
function Format(item) {
|
function Format(item) {
|
||||||
let date = getTime(new Date(item.createdTs * 1000).toString()),
|
let date = getTime(new Date(item.createdTs * 1000).toString()),
|
||||||
|
@ -278,5 +276,6 @@
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
<script defer src="https://cdn.jsdelivr.net/gh/jkjoy/14e/js/waterfall.min.js"></script>
|
||||||
|
<script defer src="https://cdn.jsdelivr.net/gh/jkjoy/14e/js/imgStatus.min.js"></script>
|
||||||
{{template "footer" .}}
|
{{template "footer" .}}
|
||||||
|
|
Loading…
Reference in New Issue