update: 文档和示例更新

This commit is contained in:
binaryify
2024-03-12 14:29:31 +08:00
parent 571c35da55
commit dfcdc04fbb
12 changed files with 506 additions and 584 deletions
+18 -16
View File
@@ -13,22 +13,7 @@
<script src="https://cdn.jsdelivr.net/npm/axios@0.26.1/dist/axios.min.js
"></script>
<script>
async function checkStatus(key) {
const res = await axios({
url: `/login/qr/check?key=${key}&timestamp=${Date.now()}&noCookie=true`,
})
return res.data
}
async function getLoginStatus(cookie = '') {
const res = await axios({
url: `/login/status?timestamp=${Date.now()}`,
method: 'post',
data: {
cookie,
},
})
document.querySelector('#info').innerText = JSON.stringify(res.data, null, 2)
}
async function login() {
let timer
let timestamp = Date.now()
@@ -59,6 +44,23 @@
}, 3000)
}
login()
async function checkStatus(key) {
const res = await axios({
url: `/login/qr/check?key=${key}&timestamp=${Date.now()}&noCookie=true`,
})
return res.data
}
async function getLoginStatus(cookie = '') {
const res = await axios({
url: `/login/status?timestamp=${Date.now()}`,
method: 'post',
data: {
cookie,
},
})
document.querySelector('#info').innerText = JSON.stringify(res.data, null, 2)
}
</script>
<style>
.info {