|
|
@@ -4,6 +4,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
import 'package:get/get.dart';
|
|
|
import 'package:keyboard/base/base_page.dart';
|
|
|
import 'package:keyboard/data/repository/account_repository.dart';
|
|
|
+import 'package:keyboard/dialog/login/login_dialog.dart';
|
|
|
import 'package:keyboard/module/zodiac_love_intimacy/tody/zodiac_love_today_view.dart';
|
|
|
import 'package:keyboard/module/zodiac_love_intimacy/zodiac_love_intimacy_controller.dart';
|
|
|
import 'package:keyboard/resource/colors.gen.dart';
|
|
|
@@ -29,12 +30,20 @@ class ZodiacLoveIntimacyPage extends BasePage<ZodiacLoveIntimacyController> {
|
|
|
|
|
|
static start({ZodiacLoveIntimacyTab tab = ZodiacLoveIntimacyTab.today}) {
|
|
|
var accountRepository = getIt.get<AccountRepository>();
|
|
|
+ // 未登录,要求先登录
|
|
|
+ if (!accountRepository.isLogin.value) {
|
|
|
+ ToastUtil.show(StringName.accountNoLogin);
|
|
|
+ LoginDialog.show();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
// 如果用户未设置生日,则要求先设置生日,才能跳转
|
|
|
if (accountRepository.userInfo.value?.birthday == null) {
|
|
|
ToastUtil.show(StringName.userNotSetBirthdayTip);
|
|
|
UserProfilePage.start();
|
|
|
return;
|
|
|
}
|
|
|
+
|
|
|
var args = {AppPageArguments.index: tab.tabIndex};
|
|
|
Get.toNamed(RoutePath.zodiacLoveIntimacy, arguments: args);
|
|
|
}
|