完成网络音乐、工具页面与安装器体验升级

This commit is contained in:
2026-08-18 13:54:33 +08:00
parent 337390f53e
commit 149c28082d
1082 changed files with 26442 additions and 162838 deletions
+22
View File
@@ -0,0 +1,22 @@
const { srcappid, appid } = require('../util');
// 酷狗二维码状态检测
// 0 为二维码过期,1 为等待扫码,2 为待确认,4 为授权登录成功(4 状态码下会返回 token)
module.exports = (params, useAxios) => {
return new Promise((resolve, reject) => {
useAxios({
baseURL: 'https://login-user.kugou.com',
url: '/v2/get_userinfo_qrcode',
method: 'GET',
params: { plat: 4, appid, srcappid, qrcode: params?.key },
encryptType: 'web',
cookie: params?.cookie || {},
}).then(resp => {
if (resp.body?.data?.status == 4) {
resp.cookie.push(`token=${resp.body?.data?.token}`);
resp.cookie.push(`userid=${resp.body?.data?.userid}`);
}
resolve(resp);
}).catch(e => reject(e));
});
};