广告数据调整
This commit is contained in:
@@ -7,8 +7,10 @@ import 'package:hgdj/hj_model/home/plate_model.dart';
|
||||
import 'package:hgdj/hj_page/pre_sale/pre_sale_provider.dart';
|
||||
import 'package:hgdj/hj_utils/const.dart';
|
||||
import 'package:hgdj/hj_utils/free_play_manager.dart';
|
||||
import 'package:hgdj/tools_base/ad_manager.dart';
|
||||
import 'package:hgdj/tools_base/global_store/store.dart';
|
||||
|
||||
import '../../alert/splash/app_center_dialog.dart';
|
||||
import '../../tools_base/event_bus/event_bus_util.dart';
|
||||
import '../../tools_base/event_bus/events.dart';
|
||||
import '../../tools_base/toast.dart';
|
||||
@@ -143,6 +145,23 @@ class MainPageLogic extends GetxController {
|
||||
});
|
||||
}
|
||||
|
||||
/// 九宫格应用广告弹窗:每次启动只弹一次;首页弹窗链会 await 它,保证不叠弹
|
||||
static Future<void>? appDialogFuture;
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
super.onReady();
|
||||
//跟着启动落地页弹(不管默认落在哪个 tab),不再依赖首页被构建
|
||||
appDialogFuture ??= _showAppDialog();
|
||||
}
|
||||
|
||||
Future<void> _showAppDialog() async {
|
||||
if (!AdManager().showAbTestAd) return;
|
||||
final appList = AdManager().adsByType(3);
|
||||
if (appList.isEmpty) return;
|
||||
await Get.dialog(AppCenterDialog(appList: appList));
|
||||
}
|
||||
|
||||
void _onReLogin(ReLoginEvent event) {
|
||||
_backToRoot();
|
||||
jumpToPage(0);
|
||||
|
||||
Reference in New Issue
Block a user