mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-05-23 22:37:41 +08:00
Merge branch 'Binaryify:master' into master
This commit is contained in:
commit
02c2a792e4
@ -15,13 +15,13 @@
|
||||
<script>
|
||||
async function checkStatus(key) {
|
||||
const res = await axios({
|
||||
url: `/login/qr/check?key=${key}&timerstamp=${Date.now()}`,
|
||||
url: `/login/qr/check?key=${key}×tamp=${Date.now()}`,
|
||||
})
|
||||
return res.data
|
||||
}
|
||||
async function getLoginStatus(cookie = '') {
|
||||
const res = await axios({
|
||||
url: `/login/status?timerstamp=${Date.now()}`,
|
||||
url: `/login/status?timestamp=${Date.now()}`,
|
||||
method: 'post',
|
||||
data: {
|
||||
cookie,
|
||||
@ -35,11 +35,11 @@
|
||||
const cookie = localStorage.getItem('cookie')
|
||||
this.getLoginStatus(cookie)
|
||||
const res = await axios({
|
||||
url: `/login/qr/key?timerstamp=${Date.now()}`,
|
||||
url: `/login/qr/key?timestamp=${Date.now()}`,
|
||||
})
|
||||
const key = res.data.data.unikey
|
||||
const res2 = await axios({
|
||||
url: `/login/qr/create?key=${key}&qrimg=true&timerstamp=${Date.now()}`,
|
||||
url: `/login/qr/create?key=${key}&qrimg=true×tamp=${Date.now()}`,
|
||||
})
|
||||
document.querySelector('#qrImg').src = res2.data.data.qrimg
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user