Procházet zdrojové kódy

[feat]星座恋爱分析,增加分析中的视图展示

hezihao před 8 měsíci
rodič
revize
505dab1911

+ 1 - 0
lib/module/zodiac_love_intimacy/future_week/zodiac_love_future_week_view.dart

@@ -21,6 +21,7 @@ class ZodiacLoveFutureWeekView
       return ZodiacLoveIntimacyReportWidget(
         unlock: controller.memberInfo.value?.isMember ?? false,
         reportResult: controller.zodiacLoveIntimacyResp.value,
+        isReportCreating: controller.isReportCreating.value,
         clickUnlockBtnCallback: () {
           controller.clickUnlockBtn();
         },

+ 1 - 0
lib/module/zodiac_love_intimacy/tody/zodiac_love_today_view.dart

@@ -22,6 +22,7 @@ class ZodiacLoveTodayView extends BaseView<ZodiacLoveTodayController> {
         // 今日分析,不需要VIP就可以查看
         unlock: true,
         reportResult: controller.zodiacLoveIntimacyResp.value,
+        isReportCreating: controller.isReportCreating.value,
         clickUnlockBtnCallback: () {
           controller.clickUnlockBtn();
         },

+ 9 - 0
lib/module/zodiac_love_intimacy/zodiac_love_intimacy_page.dart

@@ -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);
   }