clear code
This commit is contained in:
@@ -119,3 +119,15 @@ const command = new Command('me')
|
||||
});
|
||||
|
||||
program.addCommand(command);
|
||||
|
||||
const logoutCommand = new Command('logout').description('退出登陆').action(async () => {
|
||||
try {
|
||||
await queryLogin.logout();
|
||||
storage.removeItem('token');
|
||||
console.log('退出成功');
|
||||
} catch (error) {
|
||||
console.log('退出失败', error);
|
||||
}
|
||||
});
|
||||
|
||||
program.addCommand(logoutCommand);
|
||||
|
||||
Reference in New Issue
Block a user