fix(kodbox_service): 修复 token 获取逻辑
This commit is contained in:
parent
34a46dc698
commit
d2605d4c26
@ -15,7 +15,7 @@ class KodBoxService {
|
|||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
final data = jsonDecode(response.body);
|
final data = jsonDecode(response.body);
|
||||||
if (data['code'] == true) {
|
if (data['code'] == true) {
|
||||||
return data['data']['accessToken'];
|
return data['info'];
|
||||||
} else {
|
} else {
|
||||||
throw Exception('获取token失败: ${data['info'] ?? '未知错误'}');
|
throw Exception('获取token失败: ${data['info'] ?? '未知错误'}');
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user