大量修改

This commit is contained in:
编码猿
2024-11-13 00:35:04 +08:00
parent 89004b22d2
commit 27ad436c61
15 changed files with 938 additions and 13 deletions

61
downKsVideo/index.html Normal file
View File

@@ -0,0 +1,61 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
list-style: none;
font-size: 0;
line-height: 0;
}
ul {
display: flex;
flex-wrap: wrap;
}
ul li {
width: 20%;
background: #000;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
ul li img {
width: 100%;
}
</style>
</head>
<body>
<ul></ul>
</body>
<script>
fetch("http://127.0.0.1:3000/")
.then((response) => response.json())
.then((data) => {
console.log(data);
let { feeds, pcursor } = data;
let html = feeds
.map((e) => {
return `
<li>
<img src="${e.photo.coverUrl}" alt="">
</li>
`;
})
.toString()
.replaceAll(",", "");
document.querySelector("ul").innerHTML += html;
document.querySelectorAll("ul li").forEach((e) => {
e.onmouseover = () => {
console.log("e: ", e);
};
});
});
</script>
</html>