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.
16 lines
575 B
16 lines
575 B
4 years ago
|
import 'package:akuCommunity/constants/api.dart';
|
||
|
import 'package:akuCommunity/model/community/activity_item_model.dart';
|
||
|
import 'package:akuCommunity/utils/network/base_list_model.dart';
|
||
|
import 'package:akuCommunity/utils/network/net_util.dart';
|
||
|
|
||
|
class CommunityFunc {
|
||
|
static Future<ActivityItemModel> activity() async {
|
||
|
BaseListModel model = await NetUtil().getList(
|
||
|
API.community.activityList,
|
||
|
params: {'pageNum': 1, 'size': 1},
|
||
|
);
|
||
|
if (model.tableList.length == 0) return null;
|
||
|
return ActivityItemModel.fromJson(model.tableList.first);
|
||
|
}
|
||
|
}
|