

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


/**
 * 农机资讯
 * @param {*} data
 * @returns
 */
Future getNewsList()async{
  return request('/news',options: Options(method: 'GET')).catchError((error) =>
  { Fluttertoast.showToast(
      msg: error.error['message']
  ),});

}

/**
 * 农机资讯详情
 * @param {*} data
 * @returns
 */
Future getNewsInfo(String id)async{
  return request('/news/$id',options: Options(method: 'GET'),).catchError((error) =>
  { Fluttertoast.showToast(
      msg: error.error['message']
  ),});

}




