1
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
|
||||
import '../../providers/app_store.dart';
|
||||
import '../dto/base_dto.dart';
|
||||
|
||||
///请求拦截器
|
||||
@@ -8,8 +9,8 @@ void onRequest(
|
||||
RequestOptions options,
|
||||
RequestInterceptorHandler handler,
|
||||
) async {
|
||||
// String token = await AppStore.getToken();
|
||||
// options.headers['Authorization'] = 'Bearer $token';
|
||||
String token = await AppStore.getToken();
|
||||
options.headers['Authorization'] = 'Bearer $token';
|
||||
return handler.next(options);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user