This commit is contained in:
2025-04-03 01:30:39 +08:00
parent 43ce37b1ce
commit 7471e91fe6
4 changed files with 20 additions and 7 deletions

View File

@@ -73,7 +73,13 @@ const loginCommand = new Command('login')
program.addCommand(loginCommand);
const showMe = async (show = true) => {
let me = await queryLogin.getMe();
const token = process.env.KEVISUAL_TOKEN;
const localToken = storage.getItem('token');
if (!token && !localToken) {
console.log('请先登录');
return;
}
let me = await queryLogin.getMe(token);
if (me.code === 401) {
me = await queryLogin.getMe();
}