|
|
@@ -38,6 +38,8 @@ class MainController extends BaseController {
|
|
|
|
|
|
bool get isLogin => accountRepository.isLogin.value;
|
|
|
|
|
|
+ RxBool get isRequest => accountRepository.isRequest;
|
|
|
+
|
|
|
MemberInfo? get memberStatusInfo => accountRepository.memberStatusInfo.value;
|
|
|
|
|
|
MainController(
|
|
|
@@ -99,7 +101,6 @@ class MainController extends BaseController {
|
|
|
EventHandler.report(EventId.event_11000);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
@override
|
|
|
@@ -110,12 +111,19 @@ class MainController extends BaseController {
|
|
|
@override
|
|
|
Future<void> onReady() async {
|
|
|
super.onReady();
|
|
|
- if (memberStatusInfo != null && memberStatusInfo!.isMember && isLogin) {
|
|
|
- return;
|
|
|
- }
|
|
|
- if(!accountRepository.isVipUser){
|
|
|
- await NewDiscountPage.start();
|
|
|
- }
|
|
|
+
|
|
|
+ once(isRequest, (value) async {
|
|
|
+ if (value) {
|
|
|
+ if (memberStatusInfo != null && memberStatusInfo!.isMember && isLogin) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ AtmobLog.i(_tag, "memberStatusInfo ${memberStatusInfo?.isMember}");
|
|
|
+ if (!accountRepository.isVipUser) {
|
|
|
+
|
|
|
+ await NewDiscountPage.start();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
// 第一次显示首页,显示键盘引导页
|
|
|
KeyboardTutorialUtil.firstMainPageShowTutorial();
|
|
|
@@ -153,4 +161,4 @@ class TabBean {
|
|
|
const TabBean(this.title, this.normalIcon, this.selectedIcon, this.page);
|
|
|
}
|
|
|
|
|
|
-typedef WidgetFunction = Widget Function();
|
|
|
+typedef WidgetFunction = Widget Function();
|