Fix img加载
parent
b55551d4c7
commit
ad3a4afc14
|
@ -3,7 +3,6 @@ package controller
|
|||
import (
|
||||
"blog/config"
|
||||
"blog/models"
|
||||
"log"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
@ -13,7 +12,6 @@ func Memos(w http.ResponseWriter, r *http.Request) {
|
|||
http.Error(w, "参数解析错误", http.StatusInternalServerError)
|
||||
}
|
||||
fun := r.Form.Get("name")
|
||||
log.Printf("R:%v,name:%s\n", r.Form, fun)
|
||||
switch fun {
|
||||
case "talk":
|
||||
Template := models.Template.Talk
|
||||
|
|
|
@ -248,7 +248,7 @@
|
|||
for (const item of items) {
|
||||
html += `<div class="bilibili_item"><span>${item.text}</span>`
|
||||
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}">
|
||||
<div class="bilibili_cover">
|
||||
<img src="https://s1.hdslb.com/bfs/static/player/img/play.svg" class="play_icon no-lazyload">
|
||||
|
|
|
@ -206,8 +206,6 @@
|
|||
</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>
|
||||
function Format(item) {
|
||||
let date = getTime(new Date(item.createdTs * 1000).toString()),
|
||||
|
@ -278,5 +276,6 @@
|
|||
})
|
||||
})
|
||||
</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" .}}
|
||||
|
|
Loading…
Reference in New Issue