forked from piaocbn2j/MTMusic
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
622 B
24 lines
622 B
import 'package:dio/dio.dart';
|
|
|
|
import '../models/getRank_bean.dart';
|
|
|
|
const String _getRank = 'http://flyingpig.fun:10010/musics/rank-list';
|
|
///排行榜
|
|
class GetRank {
|
|
final Dio dio = Dio();
|
|
|
|
Future<RankBean> getRank({required String Authorization,}) async {
|
|
Response response = await dio.get(
|
|
_getRank,
|
|
data: {
|
|
'Authorization': Authorization,
|
|
},
|
|
options: Options(headers: {
|
|
'Authorization': Authorization,
|
|
'Content-Type': 'application/json;charset=UTF-8'
|
|
})
|
|
);
|
|
print(response.data);
|
|
return RankBean.formMap(response.data);
|
|
}
|
|
} |