test
This commit is contained in:
@@ -27,6 +27,9 @@ class MyRepositoryImpl implements MyRepository {
|
|||||||
|
|
||||||
// 补充:从 UserStorage 获取 token(接口通常需要认证)
|
// 补充:从 UserStorage 获取 token(接口通常需要认证)
|
||||||
final token = await _getToken();
|
final token = await _getToken();
|
||||||
|
if(token!.isEmpty){
|
||||||
|
|
||||||
|
}
|
||||||
final headers = {
|
final headers = {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'Authorization': 'Bearer $token', // 按需添加认证头
|
'Authorization': 'Bearer $token', // 按需添加认证头
|
||||||
|
|||||||
Reference in New Issue
Block a user