mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
fix: GetQuickList
This commit is contained in:
parent
0280dcd6a8
commit
cd1bd3461f
@ -12,7 +12,7 @@ const app = express();
|
|||||||
* @returns {Promise<void>} 无返回值。
|
* @returns {Promise<void>} 无返回值。
|
||||||
*/
|
*/
|
||||||
export async function InitWebUi() {
|
export async function InitWebUi() {
|
||||||
let config = WebUiConfig;
|
let config = await WebUiConfig.GetWebUIConfig();
|
||||||
app.use(express.json());
|
app.use(express.json());
|
||||||
// 初始服务
|
// 初始服务
|
||||||
app.all('/', (_req, res) => {
|
app.all('/', (_req, res) => {
|
||||||
|
@ -27,12 +27,12 @@ export const QQGetQRcodeHandler: RequestHandler = async (req, res) => {
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
export const QQCheckLoginStatusHandler: RequestHandler = (req, res) => {
|
export const QQCheckLoginStatusHandler: RequestHandler = async (req, res) => {
|
||||||
res.send({
|
res.send({
|
||||||
code: 0,
|
code: 0,
|
||||||
message: 'success',
|
message: 'success',
|
||||||
data: {
|
data: {
|
||||||
isLogin: DataRuntime.getQQLoginStatus()
|
isLogin: await DataRuntime.getQQLoginStatus()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -196,12 +196,13 @@
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
async function InitPages() {
|
async function InitPages() {
|
||||||
let QuickLists = GetQQQucickLoginList(localStorage.getItem('auth'));
|
let QuickLists = await GetQQQucickLoginList(localStorage.getItem('auth'));
|
||||||
let QuickListSelect = document.querySelector("#quick-login-select");
|
let QuickListSelect = document.querySelector("#quick-login-select");
|
||||||
QuickLists.forEach(QuickUin => {
|
QuickLists.forEach(QuickUin => {
|
||||||
let optionUinEle = document.createElement('option');
|
let optionUinEle = document.createElement('option');
|
||||||
optionUinEle.innerHTML = QuickUin;
|
optionUinEle.innerHTML = QuickUin;
|
||||||
optionUinEle.value = QuickUin;
|
optionUinEle.value = QuickUin;
|
||||||
|
QuickListSelect.appendChild(optionUinEle);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
document.getElementById('quick-login').addEventListener('click', function () {
|
document.getElementById('quick-login').addEventListener('click', function () {
|
||||||
@ -231,6 +232,7 @@
|
|||||||
console.log('QR Code generated!');
|
console.log('QR Code generated!');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
InitPages();
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
@ -109,6 +109,7 @@
|
|||||||
if (QQLoginResponse.status == 200) {
|
if (QQLoginResponse.status == 200) {
|
||||||
let QQLoginResponseJson = await QQLoginResponse.json();
|
let QQLoginResponseJson = await QQLoginResponse.json();
|
||||||
if (QQLoginResponseJson.code == 0) {
|
if (QQLoginResponseJson.code == 0) {
|
||||||
|
alert(QQLoginResponseJson.data.isLogin.toString());
|
||||||
if (QQLoginResponseJson.data.isLogin) {
|
if (QQLoginResponseJson.data.isLogin) {
|
||||||
window.location.href = './config.html';
|
window.location.href = './config.html';
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user