You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.4 KiB
59 lines
1.4 KiB
<!DOCTYPE html>
|
|
<html lang="zh">
|
|
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>home</title>
|
|
</head>
|
|
|
|
<body>
|
|
<script src="https://cdn.jsdelivr.net/npm/axios@0.26.1/dist/axios.min.js"></script>
|
|
<script>
|
|
const phone = '' // 这里填手机号
|
|
const password = '' // 这里填密码
|
|
const fileUpdateTime = {}
|
|
let cookieToken = ''
|
|
if (!phone || !password) {
|
|
const msg = '请设置你的手机号码和密码'
|
|
alert(msg)
|
|
throw new Error(msg)
|
|
}
|
|
|
|
async function login() {
|
|
const res = await axios({
|
|
url: `/login/cellphone?phone=${phone}&password=${encodeURIComponent(
|
|
password,
|
|
)}`,
|
|
})
|
|
cookieToken = res.data.cookie
|
|
}
|
|
async function main() {
|
|
await login()
|
|
const res = await axios({
|
|
url: `/homepage/block/page`,
|
|
data: {
|
|
cookie: cookieToken,
|
|
},
|
|
method: 'post',
|
|
})
|
|
let cursor = ''
|
|
console.log(res.data.data)
|
|
if (res.data.data.hasMore) {
|
|
cursor = res.data.data.cursor
|
|
const res2 = await axios({
|
|
url: `/homepage/block/page?time=${Date.now()}`,
|
|
data: {
|
|
cookie: cookieToken,
|
|
cursor: cursor,
|
|
},
|
|
method: 'post',
|
|
})
|
|
}
|
|
}
|
|
main()
|
|
</script>
|
|
</body>
|
|
|
|
</html>
|