fix: fix bugs

This commit is contained in:
2025-02-28 11:09:41 +08:00
parent 3d99214656
commit e525833fc8
6 changed files with 77 additions and 48 deletions

View File

@@ -34,6 +34,13 @@ export const getTokenList = async () => {
}
return res;
};
export const setTokenList = async (data: any[]) => {
const res = await runApp({ path: 'config', key: 'setTokenList', payload: { data } });
if (res.code !== 200) {
console.log('set token list failed', res.message || '');
}
return res;
};
// 定义login命令支持 `-u` 和 `-p` 参数来输入用户名和密码
const loginCommand = new Command('login')
.description('Login to the application')
@@ -45,7 +52,7 @@ const loginCommand = new Command('login')
const config = getConfig();
let { username, password } = options;
if (options.web) {
await loginInCommand();
await loginInCommand(saveToken);
return;
}
// 如果没有传递参数,则通过交互式输入