import 'package:dio/dio.dart';
import '../utils/Request.dart';
import 'package:fluttertoast/fluttertoast.dart';

/**
 * banner轮播图列表
 * @param {*} data
 * @returns
 */
Future getBannerList(String position) async {
  return request('/banner',
      options: Options(method: 'GET'), data: {'position': position})
      .catchError((error) => {
    Fluttertoast.showToast(msg: error.error.toString()),
  });
}

