getAttentionList static method

dynamic getAttentionList(
  1. dynamic obj,
  2. dynamic callBack
)

@Author: yuer pageNo:1 pageSize:10 @description: 关注列表 @return {*}

Implementation

static getAttentionList(obj, callBack) {
  // var obj = {'pageNo': 1, 'pageSize': 10};
  DioManager().request<dynamic>(RequestType.POST, RequestApi.apiAttentionList, params: obj, onSuccess: (data) {
    // AttentionMo attentionModel = AttentionMo.fromJson(obj);
    List<attentionModel> itemList = [];
    for (var item in data) {
      itemList.add(attentionModel.fromJson(item));
    }
    callBack(itemList);
    // onSuccess
  }, onError: (error) {
    // when called , already show toast, then do another things
  }, onStart: () {
    // onStart
  }, onFinish: () {
    // onFinish
  });
}