提交 e768f8a3 authored 作者: yueweilu's avatar yueweilu

减少网络请求次数

上级 67c93b6c
......@@ -68,9 +68,6 @@ class LibraryController extends GetxController with GetTickerProviderStateMixin{
@override
void onInit() {
// 获取分类数据
_getTabs();
_controller = AnimationController(
vsync: this,
duration: const Duration(milliseconds: 100),
......@@ -84,8 +81,10 @@ class LibraryController extends GetxController with GetTickerProviderStateMixin{
void onReady() async {
// 获取标签数据
_getLabels();
// 获取分类数据
_getTabs();
// 获取广告数据
_getAds();
onRefresh();
// Map<String, dynamic> data = {
// 'types': 1,
......@@ -207,7 +206,6 @@ class LibraryController extends GetxController with GetTickerProviderStateMixin{
filterCategories = categories.map((model) {
return FilterModel(id: model.categoryId.toString(), name: model.name??'',selected: model.selected);
}).toList();
print('===========$filterCategories');
update();
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论