Browse Source

[fit]修复bug,更换dropdownButton为dropdownButton2,去掉android:taskAffinity

云天逵 7 months ago
parent
commit
268487ecdb
38 changed files with 582 additions and 467 deletions
  1. 1 1
      android/app/src/main/AndroidManifest.xml
  2. 1 1
      android/app/src/main/res/drawable-v21/launch_background.xml
  3. BIN
      android/app/src/main/res/drawable-xxxhdpi/bg_splash_theme.webp
  4. 2 3
      android/app/src/main/res/drawable/launch_background.xml
  5. 0 18
      android/app/src/main/res/values-night/styles.xml
  6. 4 0
      android/app/src/main/res/values/styles.xml
  7. 2 1
      assets/string/base/string.xml
  8. 3 4
      lib/data/bean/goods_info.dart
  9. 2 2
      lib/data/bean/goods_info.g.dart
  10. 9 8
      lib/di/get_it.config.dart
  11. 3 3
      lib/dialog/agreement_dialog.dart
  12. 49 30
      lib/dialog/keyboard_generating_dialog.dart
  13. 1 1
      lib/dialog/login/login_dialog_controller.dart
  14. 22 22
      lib/dialog/login/login_dialog_view.dart
  15. 1 1
      lib/handler/wechat_login_service.dart
  16. 1 1
      lib/module/about/about_page.dart
  17. 8 0
      lib/module/character/character_controller.dart
  18. 53 28
      lib/module/character/character_view.dart
  19. 6 0
      lib/module/character/content/character_group_content_controller.dart
  20. 15 6
      lib/module/character_custom/list/character_custom_list_page.dart
  21. 65 65
      lib/module/intro/intro_page.dart
  22. 7 2
      lib/module/keyboard/keyboard_controller.dart
  23. 4 4
      lib/module/keyboard/keyboard_view.dart
  24. 41 21
      lib/module/keyboard_manage/keyboard_manage_page.dart
  25. 3 31
      lib/module/login/login_controller.dart
  26. 21 22
      lib/module/login/login_page.dart
  27. 45 30
      lib/module/mine/mine_controller.dart
  28. 63 52
      lib/module/mine/mine_view.dart
  29. 2 1
      lib/module/new_user/new_user_controller.dart
  30. 102 77
      lib/module/profile/profile_page.dart
  31. 14 16
      lib/module/splash/splash_controller.dart
  32. 1 1
      lib/module/store/discount/discount_controller.dart
  33. 16 10
      lib/module/store/store_controller.dart
  34. 6 3
      lib/module/store/suprise/goods_surprise_controller.dart
  35. 1 0
      lib/module/store/suprise/surprise_dialog.dart
  36. 1 0
      lib/module/store/ticket/discount_ticket_dialog.dart
  37. 4 2
      lib/resource/string.gen.dart
  38. 3 0
      pubspec.yaml

+ 1 - 1
android/app/src/main/AndroidManifest.xml

@@ -14,8 +14,8 @@
             android:exported="true"
             android:exported="true"
             android:hardwareAccelerated="true"
             android:hardwareAccelerated="true"
             android:launchMode="singleTop"
             android:launchMode="singleTop"
-            android:taskAffinity=""
             android:theme="@style/LaunchTheme"
             android:theme="@style/LaunchTheme"
+
             android:windowSoftInputMode="adjustResize">
             android:windowSoftInputMode="adjustResize">
             <!-- Specifies an Android theme to apply to this Activity as soon as
             <!-- Specifies an Android theme to apply to this Activity as soon as
                  the Android process has started. This theme is visible to the user
                  the Android process has started. This theme is visible to the user

+ 1 - 1
android/app/src/main/res/drawable-v21/launch_background.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <!-- Modify this file to customize your launch splash screen -->
 <!-- Modify this file to customize your launch splash screen -->
 <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
 <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:drawable="?android:colorBackground" />
+    <item android:drawable="@drawable/bg_splash_theme" />
 
 
     <!-- You can insert your own image assets here -->
     <!-- You can insert your own image assets here -->
     <!-- <item>
     <!-- <item>

BIN
android/app/src/main/res/drawable-xxxhdpi/bg_splash_theme.webp


+ 2 - 3
android/app/src/main/res/drawable/launch_background.xml

@@ -1,7 +1,6 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Modify this file to customize your launch splash screen -->
+<?xml version="1.0" encoding="utf-8"?><!-- Modify this file to customize your launch splash screen -->
 <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
 <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:drawable="@android:color/white" />
+    <item android:drawable="@drawable/bg_splash_theme" />
 
 
     <!-- You can insert your own image assets here -->
     <!-- You can insert your own image assets here -->
     <!-- <item>
     <!-- <item>

+ 0 - 18
android/app/src/main/res/values-night/styles.xml

@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-    <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
-    <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
-        <!-- Show a splash screen on the activity. Automatically removed when
-             the Flutter engine draws its first frame -->
-        <item name="android:windowBackground">@drawable/launch_background</item>
-    </style>
-    <!-- Theme applied to the Android Window as soon as the process has started.
-         This theme determines the color of the Android Window while your
-         Flutter UI initializes, as well as behind your Flutter UI while its
-         running.
-
-         This Theme is only used starting with V2 of Flutter's Android embedding. -->
-    <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
-        <item name="android:windowBackground">?android:colorBackground</item>
-    </style>
-</resources>

+ 4 - 0
android/app/src/main/res/values/styles.xml

@@ -5,6 +5,10 @@
         <!-- Show a splash screen on the activity. Automatically removed when
         <!-- Show a splash screen on the activity. Automatically removed when
              the Flutter engine draws its first frame -->
              the Flutter engine draws its first frame -->
         <item name="android:windowBackground">@drawable/launch_background</item>
         <item name="android:windowBackground">@drawable/launch_background</item>
+        <item name="android:windowTranslucentStatus">true</item>
+        <item name="android:statusBarColor">@android:color/transparent</item>
+        <item name="android:windowContentOverlay">@null</item>
+        <item name="android:windowNoTitle">true</item>
     </style>
     </style>
     <!-- Theme applied to the Android Window as soon as the process has started.
     <!-- Theme applied to the Android Window as soon as the process has started.
          This theme determines the color of the Android Window while your
          This theme determines the color of the Android Window while your

+ 2 - 1
assets/string/base/string.xml

@@ -26,7 +26,7 @@
 
 
     <string name="vip_level0_desc">开通会员,甜爱脱单只差一步</string>
     <string name="vip_level0_desc">开通会员,甜爱脱单只差一步</string>
     <string name="vip_level1_desc">会员有效期至</string>
     <string name="vip_level1_desc">会员有效期至</string>
-    <string name="vip_level2_desc">您已是甜爱键盘终身会员</string>
+    <string name="vip_level2_desc">您已是终身会员</string>
 
 
     <string name="vip_level0_btn">立即开通</string>
     <string name="vip_level0_btn">立即开通</string>
     <string name="vip_level1_btn">立即续费</string>
     <string name="vip_level1_btn">立即续费</string>
@@ -438,4 +438,5 @@
 
 
     <string name="intimacy_index">亲密指数</string>
     <string name="intimacy_index">亲密指数</string>
 
 
+    <string name="new_user_keyboard_generating">正在匹配...</string>
 </resources>
 </resources>

+ 3 - 4
lib/data/bean/goods_info.dart

@@ -27,12 +27,12 @@ class GoodsInfo {
   List<int>? payOptionIds;
   List<int>? payOptionIds;
   @JsonKey(name: 'description')
   @JsonKey(name: 'description')
   String? description;
   String? description;
-  @JsonKey(name: 'discountDesc')
-  String? discountDesc;
   @JsonKey(name: 'mostDesc')
   @JsonKey(name: 'mostDesc')
   String? mostDesc;
   String? mostDesc;
   @JsonKey(name: 'selectDesc')
   @JsonKey(name: 'selectDesc')
   String? selectDesc;
   String? selectDesc;
+  @JsonKey(name: 'timeLimitDesc')
+  String? timeLimitDesc;
 
 
   GoodsInfo({
   GoodsInfo({
     required this.id,
     required this.id,
@@ -46,9 +46,9 @@ class GoodsInfo {
     required this.priceDesc,
     required this.priceDesc,
     this.payOptionIds,
     this.payOptionIds,
     this.description,
     this.description,
-    this.discountDesc,
     this.mostDesc,
     this.mostDesc,
     this.selectDesc,
     this.selectDesc,
+    this.timeLimitDesc,
   });
   });
 
 
   get amountText => (amount / 100).toFormattedString(2);
   get amountText => (amount / 100).toFormattedString(2);
@@ -77,7 +77,6 @@ class GoodsInfo {
       priceDesc: priceDesc,
       priceDesc: priceDesc,
       payOptionIds: payOptionIds,
       payOptionIds: payOptionIds,
       description: description,
       description: description,
-      discountDesc: discountDesc,
       mostDesc: mostDesc,
       mostDesc: mostDesc,
       selectDesc: selectDesc,
       selectDesc: selectDesc,
     );
     );

+ 2 - 2
lib/data/bean/goods_info.g.dart

@@ -21,9 +21,9 @@ GoodsInfo _$GoodsInfoFromJson(Map<String, dynamic> json) => GoodsInfo(
           ?.map((e) => (e as num).toInt())
           ?.map((e) => (e as num).toInt())
           .toList(),
           .toList(),
   description: json['description'] as String?,
   description: json['description'] as String?,
-  discountDesc: json['discountDesc'] as String?,
   mostDesc: json['mostDesc'] as String?,
   mostDesc: json['mostDesc'] as String?,
   selectDesc: json['selectDesc'] as String?,
   selectDesc: json['selectDesc'] as String?,
+  timeLimitDesc: json['timeLimitDesc'] as String?,
 );
 );
 
 
 Map<String, dynamic> _$GoodsInfoToJson(GoodsInfo instance) => <String, dynamic>{
 Map<String, dynamic> _$GoodsInfoToJson(GoodsInfo instance) => <String, dynamic>{
@@ -38,7 +38,7 @@ Map<String, dynamic> _$GoodsInfoToJson(GoodsInfo instance) => <String, dynamic>{
   'priceDesc': instance.priceDesc,
   'priceDesc': instance.priceDesc,
   'payOptionIds': instance.payOptionIds,
   'payOptionIds': instance.payOptionIds,
   'description': instance.description,
   'description': instance.description,
-  'discountDesc': instance.discountDesc,
   'mostDesc': instance.mostDesc,
   'mostDesc': instance.mostDesc,
   'selectDesc': instance.selectDesc,
   'selectDesc': instance.selectDesc,
+  'timeLimitDesc': instance.timeLimitDesc,
 };
 };

+ 9 - 8
lib/di/get_it.config.dart

@@ -135,10 +135,10 @@ extension GetItInjectableX on _i174.GetIt {
     gh.factory<_i1060.ZodiacLoveIntimacyController>(
     gh.factory<_i1060.ZodiacLoveIntimacyController>(
       () => _i1060.ZodiacLoveIntimacyController(),
       () => _i1060.ZodiacLoveIntimacyController(),
     );
     );
+    gh.factory<_i211.IntroController>(() => _i211.IntroController());
     gh.factory<_i507.KeyboardTutorialController>(
     gh.factory<_i507.KeyboardTutorialController>(
       () => _i507.KeyboardTutorialController(),
       () => _i507.KeyboardTutorialController(),
     );
     );
-    gh.factory<_i211.IntroController>(() => _i211.IntroController());
     gh.lazySingleton<_i495.WechatLoginService>(
     gh.lazySingleton<_i495.WechatLoginService>(
       () => _i495.WechatLoginService(),
       () => _i495.WechatLoginService(),
     );
     );
@@ -210,6 +210,14 @@ extension GetItInjectableX on _i174.GetIt {
             currentKeyboardInfo: currentKeyboardInfo,
             currentKeyboardInfo: currentKeyboardInfo,
           ),
           ),
     );
     );
+    gh.factory<_i888.CharacterController>(
+      () => _i888.CharacterController(
+        gh<_i83.AccountRepository>(),
+        gh<_i421.CharactersRepository>(),
+        gh<_i50.ConfigRepository>(),
+        gh<_i274.KeyboardRepository>(),
+      ),
+    );
     gh.factory<_i329.UserProfileController>(
     gh.factory<_i329.UserProfileController>(
       () => _i329.UserProfileController(
       () => _i329.UserProfileController(
         gh<_i50.ConfigRepository>(),
         gh<_i50.ConfigRepository>(),
@@ -333,13 +341,6 @@ extension GetItInjectableX on _i174.GetIt {
         gh<_i83.AccountRepository>(),
         gh<_i83.AccountRepository>(),
       ),
       ),
     );
     );
-    gh.factory<_i888.CharacterController>(
-      () => _i888.CharacterController(
-        gh<_i421.CharactersRepository>(),
-        gh<_i50.ConfigRepository>(),
-        gh<_i274.KeyboardRepository>(),
-      ),
-    );
     gh.factory<_i79.CharacterCustomDetailController>(
     gh.factory<_i79.CharacterCustomDetailController>(
       () => _i79.CharacterCustomDetailController(
       () => _i79.CharacterCustomDetailController(
         gh<_i421.CharactersRepository>(),
         gh<_i421.CharactersRepository>(),

+ 3 - 3
lib/dialog/agreement_dialog.dart

@@ -83,7 +83,7 @@ class _AgreementDialog extends Dialog {
                         ),
                         ),
                       ),
                       ),
                       TextSpan(
                       TextSpan(
-                        text: '隐私政策 ',
+                        text: '隐私政策',
                         style: TextStyle(
                         style: TextStyle(
                           color: const Color(0xFF374BFF),
                           color: const Color(0xFF374BFF),
                           fontSize: 14,
                           fontSize: 14,
@@ -99,7 +99,7 @@ class _AgreementDialog extends Dialog {
                               },
                               },
                       ),
                       ),
                       TextSpan(
                       TextSpan(
-                        text: '和 ',
+                        text: ' 和 ',
                         style: TextStyle(
                         style: TextStyle(
                           color: Colors.black.withAlpha(204),
                           color: Colors.black.withAlpha(204),
                           fontSize: 14,
                           fontSize: 14,
@@ -109,7 +109,7 @@ class _AgreementDialog extends Dialog {
                       ),
                       ),
 
 
                       TextSpan(
                       TextSpan(
-                        text: '用户协议 ',
+                        text: '用户协议',
                         style: TextStyle(
                         style: TextStyle(
                           color: const Color(0xFF374BFF),
                           color: const Color(0xFF374BFF),
                           fontSize: 14,
                           fontSize: 14,

+ 49 - 30
lib/dialog/keyboard_generating_dialog.dart

@@ -5,40 +5,59 @@ import 'package:lottie/lottie.dart';
 
 
 import '../resource/assets.gen.dart';
 import '../resource/assets.gen.dart';
 
 
-class KeyboardGeneratingDialog{
+class KeyboardGeneratingDialog {
   static const tag = "KeyboardGeneratingDialog";
   static const tag = "KeyboardGeneratingDialog";
 
 
-  static void show(){
-    SmartDialog.show(tag:tag,
-        backType: SmartBackType.block,
-        clickMaskDismiss: false,
-        alignment: Alignment.center,
-        animationType: SmartAnimationType.centerScale_otherSlide,
-        builder: (_) {
-          return Container(
-            width: 298.w,
-            height: 234.h,
-            decoration: ShapeDecoration(
-              gradient: LinearGradient(
-                begin: Alignment(0.50, 0.00),
-                end: Alignment(0.50, 1.00),
-                colors: [const Color(0xFFE0D5FD), Colors.white],
-              ),
-              shape: RoundedRectangleBorder(
-                borderRadius: BorderRadius.circular(20.r),
-              ),
+  static void show({text = "生成中..."}) {
+    SmartDialog.show(
+      tag: tag,
+      backType: SmartBackType.block,
+      clickMaskDismiss: true,
+      alignment: Alignment.center,
+      animationType: SmartAnimationType.centerScale_otherSlide,
+      builder: (_) {
+        return Container(
+          width: 298.w,
+          height: 234.w,
+          decoration: ShapeDecoration(
+            gradient: LinearGradient(
+              begin: Alignment(0.50, 0.00),
+              end: Alignment(0.50, 1.00),
+              colors: [const Color(0xFFE0D5FD), Colors.white],
             ),
             ),
-            child: Lottie.asset(
-              Assets.anim.animKeyboardGeneratingData,
-              repeat: true,
-              width: 200.w,
-              height: 200.h,
-              fit: BoxFit.contain,
+            shape: RoundedRectangleBorder(
+              borderRadius: BorderRadius.circular(20.r),
             ),
             ),
-          );
-        });
+          ),
+          child: Stack(
+            alignment: Alignment.center,
+            children: [
+              Lottie.asset(
+                Assets.anim.animKeyboardGeneratingData,
+                repeat: true,
+                width: 298.w,
+                fit: BoxFit.contain,
+              ),
+              Positioned(
+                bottom: 20.w,
+                child: Text(
+                  text,
+                  textAlign: TextAlign.center,
+                  style: TextStyle(
+                    color: Colors.black.withAlpha(204),
+                    fontSize: 16.sp,
+                    fontWeight: FontWeight.w500,
+                  ),
+                ),
+              ),
+            ],
+          ),
+        );
+      },
+    );
   }
   }
-  static void hide(){
+
+  static void hide() {
     SmartDialog.dismiss(tag: tag);
     SmartDialog.dismiss(tag: tag);
   }
   }
-}
+}

+ 1 - 1
lib/dialog/login/login_dialog_controller.dart

@@ -49,7 +49,7 @@ class LoginDialogController extends BaseController {
     }
     }
     wechatLoginService.login(
     wechatLoginService.login(
       onSuccess: (code) {
       onSuccess: (code) {
-        debugPrint("登录成功 code: $code");
+
         accountRepository
         accountRepository
             .wechatLogin(code)
             .wechatLogin(code)
             .then((data) {
             .then((data) {

+ 22 - 22
lib/dialog/login/login_dialog_view.dart

@@ -158,31 +158,31 @@ class LoginDialogView extends BaseView<LoginDialogController> {
               controller.clickAgree();
               controller.clickAgree();
             },
             },
             child: Padding(
             child: Padding(
-              padding: EdgeInsets.symmetric(vertical: 10.w),
+              padding: EdgeInsets.symmetric(vertical: 20.w,horizontal: 20.w),
               child:
               child:
-                  controller.isAgree
-                      ? Assets.images.iconLoginAgreePrivacy.image(
-                        width: 14.w,
-                        height: 14.w,
-                      )
-                      : Container(
-                        padding: EdgeInsets.all(1.w),
-                        width: 12.w,
-                        height: 12.w,
-                        child: Container(
-                          decoration: BoxDecoration(
-                            shape: BoxShape.circle,
-                            border: Border.all(
-                              color: Colors.black.withAlpha(153),
-                              width: 1.w,
-                            ),
-                          ),
-                        ),
-                      ),
+              controller.isAgree
+                  ? Assets.images.iconLoginAgreePrivacy.image(
+                width: 12.w,
+                height: 12.w,
+              )
+                  : Container(
+                padding: EdgeInsets.all(1.w),
+                width: 12.w,
+                height: 12.w,
+                child: Container(
+                  decoration: BoxDecoration(
+                    shape: BoxShape.circle,
+                    border: Border.all(
+                      color: Colors.black.withAlpha(153),
+                      width: 1.w,
+                    ),
+                  ),
+                ),
+              ),
             ),
             ),
           );
           );
         }),
         }),
-        Text.rich(
+        Transform.translate(offset: Offset(-15.w,0),child:  Text.rich(
           TextSpan(
           TextSpan(
             children: [
             children: [
               TextSpan(
               TextSpan(
@@ -217,7 +217,7 @@ class LoginDialogView extends BaseView<LoginDialogController> {
               ),
               ),
             ],
             ],
           ),
           ),
-        ),
+        ),),
       ],
       ],
     );
     );
   }
   }

+ 1 - 1
lib/handler/wechat_login_service.dart

@@ -13,7 +13,7 @@ class WechatLoginService {
   final String _appId = "wx21272929e8fd33e9"; //AppID
   final String _appId = "wx21272929e8fd33e9"; //AppID
   final String? _universalLink = null; // universalLink
   final String? _universalLink = null; // universalLink
 
 
-  StreamSubscription<WechatResp>? _respSub;
+ late final StreamSubscription<WechatResp> _respSub;
 
 
   void Function(String code)? _onSuccess;
   void Function(String code)? _onSuccess;
   void Function(int code, String msg)? _onError;
   void Function(int code, String msg)? _onError;

+ 1 - 1
lib/module/about/about_page.dart

@@ -117,7 +117,7 @@ class AboutPage extends BasePage<AboutController> {
                       ),
                       ),
                       _buildDivider(),
                       _buildDivider(),
                       _buildListItem(
                       _buildListItem(
-                        StringName.personalProfile,
+                        StringName.personalInfo,
                         onTap: controller.clickPersonalInformation,
                         onTap: controller.clickPersonalInformation,
                       ),
                       ),
                     ],
                     ],

+ 8 - 0
lib/module/character/character_controller.dart

@@ -3,10 +3,12 @@ import 'package:get/get.dart';
 import 'package:injectable/injectable.dart';
 import 'package:injectable/injectable.dart';
 import 'package:keyboard/base/base_controller.dart';
 import 'package:keyboard/base/base_controller.dart';
 import 'package:keyboard/data/bean/keyboard_info.dart';
 import 'package:keyboard/data/bean/keyboard_info.dart';
+import 'package:keyboard/data/repository/account_repository.dart';
 import 'package:keyboard/data/repository/config_repository.dart';
 import 'package:keyboard/data/repository/config_repository.dart';
 import 'package:keyboard/module/keyboard_manage/keyboard_manage_page.dart';
 import 'package:keyboard/module/keyboard_manage/keyboard_manage_page.dart';
 import 'package:keyboard/utils/atmob_log.dart';
 import 'package:keyboard/utils/atmob_log.dart';
 
 
+import '../../data/api/response/user_info_response.dart';
 import '../../data/bean/character_group_info.dart';
 import '../../data/bean/character_group_info.dart';
 import '../../data/repository/characters_repository.dart';
 import '../../data/repository/characters_repository.dart';
 import '../../data/repository/keyboard_repository.dart';
 import '../../data/repository/keyboard_repository.dart';
@@ -19,8 +21,14 @@ class CharacterController extends BaseController
   final CharactersRepository charactersRepository;
   final CharactersRepository charactersRepository;
   final ConfigRepository configRepository;
   final ConfigRepository configRepository;
   final KeyboardRepository keyboardRepository;
   final KeyboardRepository keyboardRepository;
+  final AccountRepository accountRepository;
+
+
+  Rxn<UserInfoResponse> get userInfo => accountRepository.userInfo;
+
 
 
   CharacterController(
   CharacterController(
+    this.accountRepository,
     this.charactersRepository,
     this.charactersRepository,
     this.configRepository,
     this.configRepository,
     this.keyboardRepository,
     this.keyboardRepository,

+ 53 - 28
lib/module/character/character_view.dart

@@ -1,4 +1,5 @@
 import 'package:cached_network_image/cached_network_image.dart';
 import 'package:cached_network_image/cached_network_image.dart';
+import 'package:dropdown_button2/dropdown_button2.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter_screenutil/flutter_screenutil.dart';
 import 'package:flutter_screenutil/flutter_screenutil.dart';
 import 'package:get/get.dart';
 import 'package:get/get.dart';
@@ -34,10 +35,12 @@ class CharacterView extends BaseView<CharacterController> {
                           SliverPersistentHeader(
                           SliverPersistentHeader(
                             pinned: true,
                             pinned: true,
                             delegate: CharacterHeaderDelegate(
                             delegate: CharacterHeaderDelegate(
-                              expandedHeight: 380.h, //调整照片位置
+                              expandedHeight: 380.h,
+                              //调整照片位置
                               minHeight: 270.h,
                               minHeight: 270.h,
                               bottomWidget: _bottomAppBar(),
                               bottomWidget: _bottomAppBar(),
                               onTap: controller.clickMyKeyboard,
                               onTap: controller.clickMyKeyboard,
+                              isBoy: controller.userInfo.value?.gender! == 1,
                             ),
                             ),
                           ),
                           ),
                         ];
                         ];
@@ -107,40 +110,56 @@ class CharacterView extends BaseView<CharacterController> {
 
 
   // 人设市场标识和下拉框
   // 人设市场标识和下拉框
   Widget _marketSignAndDropDown() {
   Widget _marketSignAndDropDown() {
-    return Padding(
+    return Container(
       padding: EdgeInsets.symmetric(horizontal: 16.w),
       padding: EdgeInsets.symmetric(horizontal: 16.w),
       child: Row(
       child: Row(
         mainAxisAlignment: MainAxisAlignment.spaceBetween,
         mainAxisAlignment: MainAxisAlignment.spaceBetween,
         children: [
         children: [
           Assets.images.iconCharacterMarket.image(width: 73.w, height: 25.h),
           Assets.images.iconCharacterMarket.image(width: 73.w, height: 25.h),
           Obx(() {
           Obx(() {
-            return DropdownButton<String>(
-              // hint: Text(''),
+            return DropdownButton2<String>(
+              isDense: true,
               underline: Container(height: 0),
               underline: Container(height: 0),
-              style: TextStyle(
-                color: Colors.black.withAlpha(102),
-                fontSize: 14.sp,
-                fontWeight: FontWeight.w400,
+              customButton: Row(
+                children: [
+                  Text(
+                    controller.currentKeyboardInfo.value.name ?? "",
+                    style: TextStyle(
+                      color: Colors.black.withAlpha(102),
+                      fontSize: 14.sp,
+                      fontWeight: FontWeight.w400,
+                    ),
+                  ),
+                  Assets.images.iconCharacterArrowDown.image(
+                    width: 20.r,
+                    height: 20.r,
+                  ),
+                ],
               ),
               ),
-              icon: Assets.images.iconCharacterArrowDown.image(
-                width: 20.r,
-                height: 20.r,
+              dropdownSeparator:  DropdownSeparator<String>(
+                height: 1,
+                child: Padding(
+                  padding: EdgeInsets.symmetric(horizontal: 15.w),
+                  child: Divider(
+                    height: 1,
+                    color: Color(0xFFF6F6F6),
+                  ),
+                ),
               ),
               ),
-              value: controller.currentKeyboardInfo.value.name,
+              // 选项改变回调
               onChanged: (String? newValue) {
               onChanged: (String? newValue) {
                 controller.switchKeyboard(newValue);
                 controller.switchKeyboard(newValue);
               },
               },
-
+              // 生成下拉菜单项
               items: List.generate(controller.keyboardInfoList.length, (index) {
               items: List.generate(controller.keyboardInfoList.length, (index) {
                 String? value = controller.keyboardInfoList[index].name;
                 String? value = controller.keyboardInfoList[index].name;
-                return DropdownMenuItem<String>(
+                return DropdownItem<String>(
                   value: value,
                   value: value,
                   child: Column(
                   child: Column(
                     crossAxisAlignment: CrossAxisAlignment.start,
                     crossAxisAlignment: CrossAxisAlignment.start,
                     mainAxisSize: MainAxisSize.min,
                     mainAxisSize: MainAxisSize.min,
                     children: [
                     children: [
-                      Padding(
-                        padding: EdgeInsets.symmetric(vertical: 8),
+                      Container(
                         child: Text(
                         child: Text(
                           value ?? "",
                           value ?? "",
                           style: TextStyle(
                           style: TextStyle(
@@ -150,16 +169,21 @@ class CharacterView extends BaseView<CharacterController> {
                           ),
                           ),
                         ),
                         ),
                       ),
                       ),
-                      if (index != controller.keyboardInfoList.length - 1)
-                        Divider(
-                          color: Color(0xFFF6F6F6),
-                          thickness: 1,
-                          height: 1,
-                        ),
+
                     ],
                     ],
                   ),
                   ),
                 );
                 );
               }),
               }),
+              dropdownStyleData: DropdownStyleData(
+                // 下拉菜单最大高度
+                direction: DropdownDirection.left,
+                maxHeight: 250.w,
+               width: 102.w,
+                decoration: BoxDecoration(
+                  color: Colors.white,
+                  borderRadius: BorderRadius.circular(8.w),
+                ),
+              ),
             );
             );
           }),
           }),
         ],
         ],
@@ -330,12 +354,14 @@ class CharacterHeaderDelegate extends SliverPersistentHeaderDelegate {
 
 
   final Widget bottomWidget;
   final Widget bottomWidget;
   final VoidCallback onTap;
   final VoidCallback onTap;
+  final bool isBoy;
 
 
   CharacterHeaderDelegate({
   CharacterHeaderDelegate({
     required this.expandedHeight,
     required this.expandedHeight,
     required this.minHeight,
     required this.minHeight,
     required this.bottomWidget,
     required this.bottomWidget,
     required this.onTap,
     required this.onTap,
+    this.isBoy = true,
   });
   });
 
 
   @override
   @override
@@ -349,7 +375,7 @@ class CharacterHeaderDelegate extends SliverPersistentHeaderDelegate {
       expandedHeight,
       expandedHeight,
     );
     );
 
 
-    final opacity =1- currentVisibleHeight / (shrinkOffset + expandedHeight);
+    final opacity = 1 - currentVisibleHeight / (shrinkOffset + expandedHeight);
     return Stack(
     return Stack(
       // clipBehavior: Clip.none,
       // clipBehavior: Clip.none,
       children: [
       children: [
@@ -358,7 +384,9 @@ class CharacterHeaderDelegate extends SliverPersistentHeaderDelegate {
           left: 0,
           left: 0,
           right: 0,
           right: 0,
           child: Image.asset(
           child: Image.asset(
-            Assets.images.bgCharacterBoyBanner.path,
+            isBoy
+                ? Assets.images.bgCharacterBoyBanner.path
+                : Assets.images.bgCharacterGirlBanner.path,
             width: double.infinity,
             width: double.infinity,
             fit: BoxFit.fill,
             fit: BoxFit.fill,
             alignment: Alignment.topCenter,
             alignment: Alignment.topCenter,
@@ -372,10 +400,7 @@ class CharacterHeaderDelegate extends SliverPersistentHeaderDelegate {
           height: currentVisibleHeight,
           height: currentVisibleHeight,
           child: Opacity(
           child: Opacity(
             opacity: opacity,
             opacity: opacity,
-            child: Container(
-              width: double.infinity,
-              color: Color(0XffB683FD),
-            ),
+            child: Container(width: double.infinity, color: Color(0XffB683FD)),
           ),
           ),
         ),
         ),
         Positioned(bottom: 0, left: 0, right: 0, child: bottomWidget),
         Positioned(bottom: 0, left: 0, right: 0, child: bottomWidget),

+ 6 - 0
lib/module/character/content/character_group_content_controller.dart

@@ -3,9 +3,11 @@ import 'package:flutter/cupertino.dart';
 import 'package:get/get.dart';
 import 'package:get/get.dart';
 import 'package:injectable/injectable.dart';
 import 'package:injectable/injectable.dart';
 import 'package:keyboard/base/base_controller.dart';
 import 'package:keyboard/base/base_controller.dart';
+import 'package:keyboard/data/api/response/user_info_response.dart';
 import 'package:keyboard/data/repository/account_repository.dart';
 import 'package:keyboard/data/repository/account_repository.dart';
 import 'package:keyboard/data/repository/characters_repository.dart';
 import 'package:keyboard/data/repository/characters_repository.dart';
 import 'package:keyboard/dialog/character_details_dialog.dart';
 import 'package:keyboard/dialog/character_details_dialog.dart';
+import 'package:keyboard/dialog/login/login_dialog.dart';
 import 'package:keyboard/module/character/character_controller.dart';
 import 'package:keyboard/module/character/character_controller.dart';
 import 'package:keyboard/module/store/store_page.dart';
 import 'package:keyboard/module/store/store_page.dart';
 import 'package:keyboard/utils/atmob_log.dart';
 import 'package:keyboard/utils/atmob_log.dart';
@@ -32,6 +34,9 @@ class CharacterGroupContentController extends BaseController {
 
 
   bool get isLogin => accountRepository.isLogin.value;
   bool get isLogin => accountRepository.isLogin.value;
 
 
+  UserInfoResponse? get userInfo =>
+      accountRepository.userInfo.value;
+
   CharacterGroupContentController(
   CharacterGroupContentController(
     this.charactersRepository,
     this.charactersRepository,
     this.accountRepository,
     this.accountRepository,
@@ -112,6 +117,7 @@ class CharacterGroupContentController extends BaseController {
     AtmobLog.d(tag, 'characterInfo ${characterInfo.toJson()} ');
     AtmobLog.d(tag, 'characterInfo ${characterInfo.toJson()} ');
     if (isLogin == false) {
     if (isLogin == false) {
       ToastUtil.show('请先登录~');
       ToastUtil.show('请先登录~');
+      LoginDialog.show();
       return;
       return;
     }
     }
     CharacterDetailsDialog.show(
     CharacterDetailsDialog.show(

+ 15 - 6
lib/module/character_custom/list/character_custom_list_page.dart

@@ -195,18 +195,27 @@ class CharacterCustomListPage extends BasePage<CharacterCustomListController> {
       width: 60.r,
       width: 60.r,
       height: 60.r,
       height: 60.r,
       decoration: BoxDecoration(
       decoration: BoxDecoration(
-        borderRadius: BorderRadius.circular(8),
+        borderRadius: BorderRadius.circular(8.r),
         gradient: LinearGradient(
         gradient: LinearGradient(
           begin: Alignment.topCenter,
           begin: Alignment.topCenter,
           end: Alignment.bottomCenter,
           end: Alignment.bottomCenter,
           colors: [Color(0xffebe6ff), Color(0xffffe6fe)],
           colors: [Color(0xffebe6ff), Color(0xffffe6fe)],
         ),
         ),
       ),
       ),
-      child: CachedNetworkImage(
-        imageUrl: imageUrl ?? "",
-        width: 60.r,
-        height: 60.r,
-        fit: BoxFit.cover,
+      child:ClipRRect(
+        borderRadius: BorderRadius.circular(8.r),
+        child: CachedNetworkImage(
+          imageUrl: imageUrl ?? "",
+          width: 60.r,
+          height: 60.r,
+          fit: BoxFit.contain,
+          errorWidget:
+              (_, __, ___) => Assets.images.iconSystemKeyboard.image(
+            width: 60.r,
+            height: 60.r,
+            fit: BoxFit.contain,
+          ),
+        ),
       ),
       ),
     );
     );
   }
   }

+ 65 - 65
lib/module/intro/intro_page.dart

@@ -12,7 +12,7 @@ import '../../resource/colors.gen.dart';
 import '../../router/app_pages.dart';
 import '../../router/app_pages.dart';
 
 
 class IntroPage extends BasePage<IntroController> {
 class IntroPage extends BasePage<IntroController> {
-  const IntroPage({Key? key}) : super(key: key);
+  const IntroPage({super.key});
 
 
   static void start() {
   static void start() {
     Get.toNamed(RoutePath.intro);
     Get.toNamed(RoutePath.intro);
@@ -25,58 +25,59 @@ class IntroPage extends BasePage<IntroController> {
 
 
   @override
   @override
   Widget buildBody(BuildContext context) {
   Widget buildBody(BuildContext context) {
-    return Stack(
-      children: [
-        Assets.images.bgIntro.image(width: double.infinity, fit: BoxFit.fill),
-        SizedBox(
-          width: double.infinity,
-          height: double.infinity,
-          child: SafeArea(
-            child: Stack(
-              children: [
-                Column(
-                  crossAxisAlignment: CrossAxisAlignment.center,
-                  children: [
-                    SizedBox(height: 42.w),
-                    Assets.images.iconIntroTitle.image(
-                      width: 189.w,
-                      height: 40.6.w,
-                      fit: BoxFit.contain,
-                    ),
-                    SizedBox(height: 20.w),
-                    Flexible(
-                      child:
-
-                          NestedPageView(
-                        controller: controller.pageController.value,
-                        onPageChanged: (index) {
-                          controller.onPageChanged(index);
-                        },
-                        children: List.generate(
-                          controller.pageList.length,
-                          (index) =>
-                              buildPage(controller.pageList[index], index),
+    return PopScope(
+      canPop: false,
+      child: Stack(
+        children: [
+          Assets.images.bgIntro.image(width: double.infinity, fit: BoxFit.fill),
+          SizedBox(
+            width: double.infinity,
+            height: double.infinity,
+            child: SafeArea(
+              child: Stack(
+                children: [
+                  Column(
+                    crossAxisAlignment: CrossAxisAlignment.center,
+                    children: [
+                      SizedBox(height: 42.w),
+                      Assets.images.iconIntroTitle.image(
+                        width: 189.w,
+                        height: 40.6.w,
+                        fit: BoxFit.contain,
+                      ),
+                      SizedBox(height: 20.w),
+                      Flexible(
+                        child: NestedPageView(
+                          controller: controller.pageController.value,
+                          onPageChanged: (index) {
+                            controller.onPageChanged(index);
+                          },
+                          children: List.generate(
+                            controller.pageList.length,
+                            (index) =>
+                                buildPage(controller.pageList[index], index),
+                          ),
                         ),
                         ),
                       ),
                       ),
-                    ),
-                  ],
-                ),
-                Column(
-                  mainAxisAlignment: MainAxisAlignment.end,
-                  children: [
-                    buildIndicator(),
-                    SizedBox(height: 50.w),
-                    _buildCustomButton(),
-                    SizedBox(height: 25.w),
-                    _buildGoToLoginButton(),
-                    SizedBox(height: 50.w),
-                  ],
-                ),
-              ],
+                    ],
+                  ),
+                  Column(
+                    mainAxisAlignment: MainAxisAlignment.end,
+                    children: [
+                      buildIndicator(),
+                      SizedBox(height: 50.w),
+                      _buildCustomButton(),
+                      SizedBox(height: 25.w),
+                      _buildGoToLoginButton(),
+                      SizedBox(height: 50.w),
+                    ],
+                  ),
+                ],
+              ),
             ),
             ),
           ),
           ),
-        ),
-      ],
+        ],
+      ),
     );
     );
   }
   }
 
 
@@ -115,23 +116,22 @@ class IntroPage extends BasePage<IntroController> {
   }
   }
 
 
   Widget buildPage(PageBean pageBean, int index) {
   Widget buildPage(PageBean pageBean, int index) {
-    return  Column(
-        mainAxisSize: MainAxisSize.min,
-        crossAxisAlignment: CrossAxisAlignment.center,
-        mainAxisAlignment: MainAxisAlignment.start,
-        children: [
-          pageBean.title,
-          SizedBox(height: 20.h),
-
-            Lottie.asset(
-              pageBean.animUrl,
-              width: 360.w,
-              repeat: true,
-              fit: BoxFit.contain,
-            ),
-        ],
-      );
+    return Column(
+      mainAxisSize: MainAxisSize.min,
+      crossAxisAlignment: CrossAxisAlignment.center,
+      mainAxisAlignment: MainAxisAlignment.start,
+      children: [
+        pageBean.title,
+        SizedBox(height: 20.h),
 
 
+        Lottie.asset(
+          pageBean.animUrl,
+          width: 360.w,
+          repeat: true,
+          fit: BoxFit.contain,
+        ),
+      ],
+    );
   }
   }
 
 
   Widget _buildCustomButton() {
   Widget _buildCustomButton() {

+ 7 - 2
lib/module/keyboard/keyboard_controller.dart

@@ -10,6 +10,8 @@ import 'package:keyboard/module/intimacy_analyse/enums/intimacy_analyse_tab.dart
 import 'package:keyboard/module/keyboard_manage/keyboard_manage_page.dart';
 import 'package:keyboard/module/keyboard_manage/keyboard_manage_page.dart';
 import 'package:keyboard/module/store/new_discount/new_discount_page.dart';
 import 'package:keyboard/module/store/new_discount/new_discount_page.dart';
 import 'package:keyboard/module/store/store_page.dart';
 import 'package:keyboard/module/store/store_page.dart';
+import 'package:keyboard/module/user_info/user_info_page.dart';
+import 'package:keyboard/module/user_profile/user_profile_page.dart';
 
 
 import '../../data/api/response/keyboard_love_index_response.dart';
 import '../../data/api/response/keyboard_love_index_response.dart';
 import '../../utils/atmob_log.dart';
 import '../../utils/atmob_log.dart';
@@ -80,6 +82,8 @@ class KeyBoardController extends BaseController {
     debugPrint("click avatar");
     debugPrint("click avatar");
     if (!isUser) {
     if (!isUser) {
       ProfilePage.start();
       ProfilePage.start();
+    } else {
+      UserProfilePage.start();
     }
     }
   }
   }
 
 
@@ -88,15 +92,16 @@ class KeyBoardController extends BaseController {
     NewDiscountPage.start();
     NewDiscountPage.start();
   }
   }
 
 
-  void clickLovePercentage(){
-
+  void clickLovePercentage() {
     IntimacyScalePage.start();
     IntimacyScalePage.start();
   }
   }
+
   void startCountdown() {
   void startCountdown() {
     _timer = Timer.periodic(const Duration(milliseconds: 10), (timer) {
     _timer = Timer.periodic(const Duration(milliseconds: 10), (timer) {
       if (timeLeft.value > 0) {
       if (timeLeft.value > 0) {
         timeLeft.value--;
         timeLeft.value--;
       } else {
       } else {
+        isShowBanner.value = false;
         timer.cancel();
         timer.cancel();
       }
       }
     });
     });

+ 4 - 4
lib/module/keyboard/keyboard_view.dart

@@ -147,9 +147,9 @@ class KeyBoardView extends BaseView<KeyBoardController> {
               mainAxisAlignment: MainAxisAlignment.spaceBetween,
               mainAxisAlignment: MainAxisAlignment.spaceBetween,
               children: [
               children: [
                 _buildAvatar(true),
                 _buildAvatar(true),
-                SizedBox(width: 16.w),
+
                 _buildLovePercentage(),
                 _buildLovePercentage(),
-                SizedBox(width: 16.w),
+
                 _buildAvatar(false),
                 _buildAvatar(false),
               ],
               ],
             ),
             ),
@@ -281,7 +281,7 @@ class KeyBoardView extends BaseView<KeyBoardController> {
                       borderColor: Colors.white,
                       borderColor: Colors.white,
                       borderWidth: 2.r,
                       borderWidth: 2.r,
                       placeholder: (_, __) {
                       placeholder: (_, __) {
-                        return const CupertinoActivityIndicator();
+                        return const SizedBox();
                       },
                       },
                     ),
                     ),
                   ),
                   ),
@@ -360,7 +360,7 @@ class KeyBoardView extends BaseView<KeyBoardController> {
               },
               },
               child: SizedBox(
               child: SizedBox(
                 width: 88.w,
                 width: 88.w,
-                height: 72.h,
+                height: 72.w,
                 child: Stack(
                 child: Stack(
                   children: [
                   children: [
                     // Assets.images.bgKeyboardLove.image(width: 88.w, height: 72.h),
                     // Assets.images.bgKeyboardLove.image(width: 88.w, height: 72.h),

+ 41 - 21
lib/module/keyboard_manage/keyboard_manage_page.dart

@@ -1,4 +1,5 @@
 import 'package:dotted_border/dotted_border.dart';
 import 'package:dotted_border/dotted_border.dart';
+import 'package:dropdown_button2/dropdown_button2.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter_screenutil/flutter_screenutil.dart';
 import 'package:flutter_screenutil/flutter_screenutil.dart';
 import 'package:get/get.dart';
 import 'package:get/get.dart';
@@ -152,53 +153,72 @@ class KeyboardManagePage extends BasePage<KeyboardManageController> {
                 fontWeight: FontWeight.w500,
                 fontWeight: FontWeight.w500,
               ),
               ),
             ),
             ),
-            DropdownButton<String>(
+            DropdownButton2<String>(
+              isDense: true,
               underline: Container(height: 0),
               underline: Container(height: 0),
-              style: TextStyle(
-                color: Colors.black.withAlpha(204),
-                fontSize: 16.sp,
-                fontWeight: FontWeight.w500,
+              customButton: Row(
+                children: [
+                  Text(
+                    controller.currentCustomKeyboardInfo.name ?? "",
+                    style: TextStyle(
+                      color: Colors.black.withAlpha(204),
+                      fontSize: 16.sp,
+                      fontWeight: FontWeight.w500,
+                    ),
+                  ),
+                  Assets.images.iconModeSwitchArrow.image(
+
+                    width: 20.r,
+                    height: 20.r,
+                  ),
+                ],
               ),
               ),
-              icon: Assets.images.iconCharacterArrowDown.image(
-                width: 20.r,
-                height: 20.r,
+              dropdownSeparator: DropdownSeparator<String>(
+                height: 1,
+                child: Padding(
+                  padding: EdgeInsets.symmetric(horizontal: 15.w),
+                  child: Divider(height: 1, color: Color(0xFFF6F6F6)),
+                ),
               ),
               ),
-              value: controller.currentCustomKeyboardInfo.name,
+              // 选项改变回调
               onChanged: (String? newValue) {
               onChanged: (String? newValue) {
                 controller.switchCustomKeyboard(newValue);
                 controller.switchCustomKeyboard(newValue);
               },
               },
-
+              // 生成下拉菜单项
               items: List.generate(controller.customKeyboardInfoList.length, (
               items: List.generate(controller.customKeyboardInfoList.length, (
                 index,
                 index,
               ) {
               ) {
                 String? value = controller.customKeyboardInfoList[index].name;
                 String? value = controller.customKeyboardInfoList[index].name;
-                return DropdownMenuItem<String>(
+                return DropdownItem<String>(
                   value: value,
                   value: value,
                   child: Column(
                   child: Column(
                     crossAxisAlignment: CrossAxisAlignment.start,
                     crossAxisAlignment: CrossAxisAlignment.start,
                     mainAxisSize: MainAxisSize.min,
                     mainAxisSize: MainAxisSize.min,
                     children: [
                     children: [
-                      Padding(
-                        padding: EdgeInsets.symmetric(vertical: 8),
+                      Container(
                         child: Text(
                         child: Text(
                           value ?? "",
                           value ?? "",
                           style: TextStyle(
                           style: TextStyle(
                             color: Colors.black.withAlpha(204),
                             color: Colors.black.withAlpha(204),
-                            fontSize: 16.sp,
-                            fontWeight: FontWeight.w500,
+                            fontSize: 14.sp,
+                            fontWeight: FontWeight.w400,
                           ),
                           ),
                         ),
                         ),
                       ),
                       ),
-                      if (index != controller.customKeyboardInfoList.length - 1)
-                        Divider(
-                          color: Color(0xFFF6F6F6),
-                          thickness: 1,
-                          height: 1,
-                        ),
                     ],
                     ],
                   ),
                   ),
                 );
                 );
               }),
               }),
+              dropdownStyleData: DropdownStyleData(
+                // 下拉菜单最大高度
+                direction: DropdownDirection.left,
+                maxHeight: 250.w,
+                width: 102.w,
+                decoration: BoxDecoration(
+                  color: Colors.white,
+                  borderRadius: BorderRadius.circular(8.w),
+                ),
+              ),
             ),
             ),
           ],
           ],
         ),
         ),

+ 3 - 31
lib/module/login/login_controller.dart

@@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart';
 import 'package:get/get.dart';
 import 'package:get/get.dart';
 import 'package:injectable/injectable.dart';
 import 'package:injectable/injectable.dart';
 import 'package:keyboard/base/base_controller.dart';
 import 'package:keyboard/base/base_controller.dart';
+import 'package:keyboard/dialog/login/login_dialog.dart';
 
 
 import '../../data/consts/error_code.dart';
 import '../../data/consts/error_code.dart';
 import '../../data/repository/account_repository.dart';
 import '../../data/repository/account_repository.dart';
@@ -157,40 +158,11 @@ class LoginController extends BaseController {
 
 
   void clickWxLogin() async {
   void clickWxLogin() async {
     if (!_isAgree.value) {
     if (!_isAgree.value) {
-      PrivacyAgreementDialog.show(
-        btnConfirm: () async {
-          _isAgree.value = true;
-          clickWxLogin();
-        },
-      );
+      Get.back();
+      LoginDialog.show();
       return;
       return;
     }
     }
-    wechatLoginService.login(
-      onSuccess: (code) {
-        debugPrint("登录成功 code: $code");
-        accountRepository.wechatLogin(code).then((data) {
-          Get.back();
-          ToastUtil.show(StringName.loginSuccess);
-        }).catchError((error) {
-          if (error is ServerErrorException) {
-            if (error.code == ErrorCode.verificationCodeError) {
-              ToastUtil.show(StringName.loginVerificationCodeErrorToast);
-            } else {
-              ToastUtil.show(error.message);
-            }
-          } else {
-            ToastUtil.show(StringName.loginFailedToast);
-          }
-        });
 
 
-      },
-      onError: (code, msg) {
-        ToastUtil.show("微信登录失败:$msg");
-      },
-      onCancel: () {
-        ToastUtil.show("用户取消登录");
-      },
-    );
   }
   }
 
 
 
 

+ 21 - 22
lib/module/login/login_page.dart

@@ -233,31 +233,30 @@ class LoginPage extends BasePage<LoginController> {
               controller.clickAgree();
               controller.clickAgree();
             },
             },
             child: Padding(
             child: Padding(
-              padding: EdgeInsets.symmetric(vertical: 10.w),
+              padding: EdgeInsets.symmetric(vertical: 20.w,horizontal: 20.w),
               child:
               child:
-                  controller.isAgree
-                      ? Assets.images.iconLoginAgreePrivacy.image(
-                        width: 14.w,
-                        height: 14.w,
-                      )
-                      : Container(
-                        padding: EdgeInsets.all(1.w),
-                        width: 14.w,
-                        height: 14.w,
-                        child: Container(
-                          decoration: BoxDecoration(
-                            shape: BoxShape.circle,
-                            border: Border.all(
-                              color: Colors.black.withAlpha(153),
-                              width: 1.w,
-                            ),
-                          ),
-                        ),
-                      ),
+              controller.isAgree
+                  ? Assets.images.iconLoginAgreePrivacy.image(
+                width: 14.w,
+                height: 14.w,
+              )
+                  : Container(
+                width: 14.w,
+                height: 14.w,
+                child: Container(
+                  decoration: BoxDecoration(
+                    shape: BoxShape.circle,
+                    border: Border.all(
+                      color: Colors.black.withAlpha(153),
+                      width: 1.w,
+                    ),
+                  ),
+                ),
+              ),
             ),
             ),
           );
           );
         }),
         }),
-        Text.rich(
+        Transform.translate(offset: Offset(-17.w,0),child:  Text.rich(
           TextSpan(
           TextSpan(
             children: [
             children: [
               TextSpan(
               TextSpan(
@@ -292,7 +291,7 @@ class LoginPage extends BasePage<LoginController> {
               ),
               ),
             ],
             ],
           ),
           ),
-        ),
+        ),),
       ],
       ],
     );
     );
   }
   }

+ 45 - 30
lib/module/mine/mine_controller.dart

@@ -2,43 +2,26 @@ import 'dart:io';
 
 
 import 'package:flutter/material.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/rendering.dart';
 import 'package:flutter/rendering.dart';
-import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
-import 'package:get/get.dart';
-import 'package:get/get_core/src/get_main.dart';
 import 'package:injectable/injectable.dart';
 import 'package:injectable/injectable.dart';
 import 'package:keyboard/base/base_controller.dart';
 import 'package:keyboard/base/base_controller.dart';
+import 'package:keyboard/data/api/response/user_info_response.dart';
+import 'package:keyboard/data/bean/member_info.dart';
 import 'package:keyboard/module/about/about_page.dart';
 import 'package:keyboard/module/about/about_page.dart';
 import 'package:keyboard/module/feedback/feedback_page.dart';
 import 'package:keyboard/module/feedback/feedback_page.dart';
-import 'package:keyboard/module/new_user/new_user_page.dart';
-import 'package:keyboard/module/store/discount/discount_view.dart';
 import 'package:keyboard/module/user_info/user_info_page.dart';
 import 'package:keyboard/module/user_info/user_info_page.dart';
-import 'package:keyboard/utils/atmob_log.dart';
 
 
-import '../../data/bean/keyboard_info.dart';
 import '../../data/consts/build_config.dart';
 import '../../data/consts/build_config.dart';
-import '../../data/consts/constants.dart';
-import '../../data/consts/error_code.dart';
 import '../../data/consts/web_url.dart';
 import '../../data/consts/web_url.dart';
 import '../../data/repository/account_repository.dart';
 import '../../data/repository/account_repository.dart';
 import '../../dialog/login/login_dialog.dart';
 import '../../dialog/login/login_dialog.dart';
 import '../../plugins/keyboard_android_platform.dart';
 import '../../plugins/keyboard_android_platform.dart';
-import '../../plugins/keyboard_method_handler.dart';
-import '../../resource/colors.gen.dart';
+import '../../resource/string.gen.dart';
 import '../../utils/app_info_util.dart';
 import '../../utils/app_info_util.dart';
-import '../browser/browser_page.dart';
+import '../../utils/date_util.dart';
 import '../../utils/keyboard_tutorial_util.dart';
 import '../../utils/keyboard_tutorial_util.dart';
-import '../intimacy_analyse/intimacy_analyse_page.dart';
-import '../keyboard_guide/keyboard_guide_page.dart';
-import '../keyboard_tutorial/keyboard_tutorial_page.dart';
-import '../new_user/result/new_user_result_page.dart';
-import '../profile/profile_page.dart';
-import '../store/discount/discount_controller.dart';
-import '../store/suprise/surprise_dialog.dart';
-import '../../resource/string.gen.dart';
-import '../../utils/http_handler.dart';
 import '../../utils/toast_util.dart';
 import '../../utils/toast_util.dart';
+import '../browser/browser_page.dart';
 import '../store/store_page.dart';
 import '../store/store_page.dart';
-import '../store/ticket/discount_ticket_dialog.dart';
 import '../user_profile/user_profile_page.dart';
 import '../user_profile/user_profile_page.dart';
 
 
 @injectable
 @injectable
@@ -51,12 +34,23 @@ class MineController extends BaseController {
 
 
   String? get phone => accountRepository.loginPhoneNum.value;
   String? get phone => accountRepository.loginPhoneNum.value;
 
 
+  UserInfoResponse? get userInfo => accountRepository.userInfo.value;
+
+  MemberInfo? get memberInfo => accountRepository.memberStatusInfo.value;
+
   String getUserName() {
   String getUserName() {
-    if (isLogin && phone != null && phone!.length > 4) {
+    if (!isLogin) return StringName.mineAccountNoLogin;
+
+    final name = userInfo?.name;
+    if (name != null && name.isNotEmpty) {
+      return name;
+    }
+
+    if (phone != null && phone!.length > 4) {
       return '${StringName.mineAccountLoggedDesc}${phone!.substring(phone!.length - 4)}';
       return '${StringName.mineAccountLoggedDesc}${phone!.substring(phone!.length - 4)}';
-    } else {
-      return StringName.mineAccountNoLogin;
     }
     }
+
+    return StringName.mineAccountNoLogin;
   }
   }
 
 
   clickVip() {
   clickVip() {
@@ -85,6 +79,7 @@ class MineController extends BaseController {
     }
     }
   }
   }
 
 
+  // 七鱼客服
   void goToCustomerService() {
   void goToCustomerService() {
     final userInfo = accountRepository.userInfo.value;
     final userInfo = accountRepository.userInfo.value;
     if (userInfo == null) {
     if (userInfo == null) {
@@ -115,11 +110,13 @@ class MineController extends BaseController {
   clickTutorials() {
   clickTutorials() {
     debugPrint('clickTutorials');
     debugPrint('clickTutorials');
     KeyboardTutorialUtil.start();
     KeyboardTutorialUtil.start();
+  //   测试模isDebug式才生效
+    if (BuildConfig.isDebug) {
+      KeyboardAndroidPlatform.enableFloatingWindow(true);
+      KeyboardAndroidPlatform.openInputMethodSettings();
+    }
   }
   }
 
 
-  longClickTutorials() {
-    // NewUserPage.start();
-  }
 
 
 
 
   clickPersonalProfile() {
   clickPersonalProfile() {
@@ -128,7 +125,6 @@ class MineController extends BaseController {
   }
   }
 
 
   clickFeedback() {
   clickFeedback() {
-
     if (isLogin) {
     if (isLogin) {
       debugPrint('clickOnlineCustomerService');
       debugPrint('clickOnlineCustomerService');
       FeedbackPage.start();
       FeedbackPage.start();
@@ -137,11 +133,30 @@ class MineController extends BaseController {
       LoginDialog.show();
       LoginDialog.show();
       return;
       return;
     }
     }
-
   }
   }
 
 
   clickAboutUs() {
   clickAboutUs() {
     debugPrint('clickAboutUs');
     debugPrint('clickAboutUs');
     AboutPage.start();
     AboutPage.start();
   }
   }
+
+  String getVipButtonDesc() {
+    if (memberInfo?.isMember == true && isLogin) {
+      if (memberInfo?.permanent == true && isLogin) {
+        return StringName.vipLevel2Btn;
+      }
+      return StringName.vipLevel1Btn;
+    }
+    return StringName.vipLevel0Btn;
+  }
+
+  String getVipLevelDesc() {
+    if (memberInfo?.isMember == true && isLogin) {
+      if (memberInfo?.permanent == true && isLogin) {
+        return StringName.vipLevel2Desc;
+      }
+      return "${StringName.vipLevel1Desc}${DateUtil.fromMillisecondsSinceEpoch('yyyy年MM月dd日', memberInfo?.endTimestamp ?? 0)}";
+    }
+    return StringName.vipLevel0Desc;
+  }
 }
 }

+ 63 - 52
lib/module/mine/mine_view.dart

@@ -6,6 +6,7 @@ import 'package:keyboard/resource/string.gen.dart';
 
 
 import '../../resource/assets.gen.dart';
 import '../../resource/assets.gen.dart';
 import 'package:get/get.dart';
 import 'package:get/get.dart';
+
 class MineView extends BaseView<MineController> {
 class MineView extends BaseView<MineController> {
   const MineView({super.key});
   const MineView({super.key});
 
 
@@ -60,7 +61,6 @@ class MineView extends BaseView<MineController> {
             text: StringName.tutorials,
             text: StringName.tutorials,
             funIcon: Assets.images.iconMineTutorials.path,
             funIcon: Assets.images.iconMineTutorials.path,
             onTap: controller.clickTutorials,
             onTap: controller.clickTutorials,
-
           ),
           ),
 
 
           baseFunctionButton(
           baseFunctionButton(
@@ -90,28 +90,35 @@ class MineView extends BaseView<MineController> {
     return Obx(() {
     return Obx(() {
       return GestureDetector(
       return GestureDetector(
         onTap: controller.clickUserCard,
         onTap: controller.clickUserCard,
-      child: Row(
-        children: [
-          controller.isLogin
-              ? Assets.images.iconMineUserLogged.image(
-            width: 56.r, height: 56.r,fit: BoxFit.contain,)
-              : Assets.images.iconMineUserLogged.image(
-              width: 56.r, height: 56.r,fit: BoxFit.contain),
-          SizedBox(width: 12.r),
-          Text(
-            controller.getUserName(),
-            style: TextStyle(
-              fontSize: 18.sp,
-              color: Colors.black,
-              fontWeight: FontWeight.w500,
+        child: Row(
+          children: [
+            controller.isLogin
+                ? Assets.images.iconMineUserLogged.image(
+              width: 56.r,
+              height: 56.r,
+              fit: BoxFit.contain,
+            )
+                : Assets.images.iconMineUserLogged.image(
+              width: 56.r,
+              height: 56.r,
+              fit: BoxFit.contain,
+            ),
+            SizedBox(width: 12.r),
+            Text(
+              controller.getUserName(),
+              style: TextStyle(
+                fontSize: 18.sp,
+                color: Colors.black,
+                fontWeight: FontWeight.w500,
+              ),
             ),
             ),
-          ),
 
 
-          SizedBox(width: 4.r),
+            SizedBox(width: 4.r),
 
 
-          Assets.images.iconMineLoginArrow.image(width: 16.r, height: 16.r),
-        ],
-      ),);
+            Assets.images.iconMineLoginArrow.image(width: 16.r, height: 16.r),
+          ],
+        ),
+      );
     });
     });
   }
   }
 
 
@@ -147,22 +154,24 @@ class MineView extends BaseView<MineController> {
                   // vip 图标
                   // vip 图标
                   Assets.images.iconMineVip.image(width: 62.w, height: 19.h),
                   Assets.images.iconMineVip.image(width: 62.w, height: 19.h),
                   // vip描述文本
                   // vip描述文本
-                  Row(
-                    children: [
-                      Text(
-                        StringName.vipLevel0Desc,
-                        style: TextStyle(
-                          color: Color(0xFFE4B483),
-                          fontSize: 12.sp,
-                          fontWeight: FontWeight.w400,
+                  Obx(() {
+                    return Row(
+                      children: [
+                        Text(
+                          controller.getVipLevelDesc(),
+                          style: TextStyle(
+                            color: Color(0xFFE4B483),
+                            fontSize: 12.sp,
+                            fontWeight: FontWeight.w400,
+                          ),
                         ),
                         ),
-                      ),
-                      Assets.images.iconMineVipDescArrow.image(
-                        width: 16.w,
-                        height: 16.h,
-                      ),
-                    ],
-                  ),
+                        Assets.images.iconMineVipDescArrow.image(
+                          width: 16.w,
+                          height: 16.h,
+                        ),
+                      ],
+                    );
+                  }),
                 ],
                 ],
               ),
               ),
               // VIP按钮
               // VIP按钮
@@ -186,24 +195,26 @@ class MineView extends BaseView<MineController> {
                     borderRadius: BorderRadius.circular(32.r),
                     borderRadius: BorderRadius.circular(32.r),
                   ),
                   ),
                 ),
                 ),
-                child: Row(
-                  mainAxisAlignment: MainAxisAlignment.center,
-                  children: [
-                    Text(
-                      StringName.vipLevel0Btn,
-                      textAlign: TextAlign.center,
-                      style: TextStyle(
-                        color: Colors.white,
-                        fontSize: 13.sp,
-                        fontWeight: FontWeight.w400,
+                child: Obx(() {
+                  return Row(
+                    mainAxisAlignment: MainAxisAlignment.center,
+                    children: [
+                      Text(
+                        controller.getVipButtonDesc(),
+                        textAlign: TextAlign.center,
+                        style: TextStyle(
+                          color: Colors.white,
+                          fontSize: 13.sp,
+                          fontWeight: FontWeight.w400,
+                        ),
                       ),
                       ),
-                    ),
-                    Assets.images.iconMineVipArrow.image(
-                      width: 10.w,
-                      height: 10.w,
-                    ),
-                  ],
-                ),
+                      Assets.images.iconMineVipArrow.image(
+                        width: 10.w,
+                        height: 10.w,
+                      ),
+                    ],
+                  );
+                }),
               ),
               ),
             ],
             ],
           ),
           ),

+ 2 - 1
lib/module/new_user/new_user_controller.dart

@@ -10,6 +10,7 @@ import 'package:keyboard/module/new_user/step/gender/step_gender_logic.dart';
 import 'package:keyboard/module/new_user/step/intimacy/step_intimacy_stages_logic.dart';
 import 'package:keyboard/module/new_user/step/intimacy/step_intimacy_stages_logic.dart';
 import 'package:keyboard/module/new_user/step/nickname/step_nickname_logic.dart';
 import 'package:keyboard/module/new_user/step/nickname/step_nickname_logic.dart';
 import 'package:keyboard/module/new_user/step/partner/step_partner_logic.dart';
 import 'package:keyboard/module/new_user/step/partner/step_partner_logic.dart';
+import 'package:keyboard/resource/string.gen.dart';
 import 'package:keyboard/utils/atmob_log.dart';
 import 'package:keyboard/utils/atmob_log.dart';
 import 'package:intl/intl.dart';
 import 'package:intl/intl.dart';
 import '../../base/base_controller.dart';
 import '../../base/base_controller.dart';
@@ -178,7 +179,7 @@ class NewUserController extends BaseController
   }
   }
 
 
   Future<void> _generateKeyboard() async {
   Future<void> _generateKeyboard() async {
-    KeyboardGeneratingDialog.show();
+    KeyboardGeneratingDialog.show(text: StringName.newUserKeyboardGenerating);
     try {
     try {
       KeyboardGenerateResponse keyboardGenerateResponse =
       KeyboardGenerateResponse keyboardGenerateResponse =
           await keyboardRepository.getKeyboardGenerate(
           await keyboardRepository.getKeyboardGenerate(

+ 102 - 77
lib/module/profile/profile_page.dart

@@ -37,45 +37,54 @@ class ProfilePage extends BasePage<ProfileController> {
     return Stack(
     return Stack(
       children: [
       children: [
         SafeArea(
         SafeArea(
+          child: Column(
+            crossAxisAlignment: CrossAxisAlignment.start,
+            children: [
+              _buildTitle(),
 
 
-          child: CustomScrollView(
-            slivers: [
-              SliverToBoxAdapter(
-                child: Column(
-                  crossAxisAlignment: CrossAxisAlignment.start,
-                  children: [_buildTitle(), SizedBox(height: 26.h)],
-                ),
-              ),
-              // 键盘列表
-              Obx(() {
-                if (controller.customKeyboardInfoList.isEmpty) {
-                  return  SliverToBoxAdapter(child:  _buildKeyboardListItem(
-                    keyboardInfo: null,
-                    isChosen: false,
-                    hasKeyboard: false,
-                  ));
-                }
-                return SliverList(
-                  delegate: SliverChildBuilderDelegate((context, index) {
-                    KeyboardInfo keyboardInfo =
-                    controller.customKeyboardInfoList[index];
-                    return Obx(() {
-                      return _buildKeyboardListItem(
-                        keyboardInfo: keyboardInfo,
-                        isChosen: keyboardInfo.id == controller.currentCustomKeyboardInfo.id,
-                        hasKeyboard: true,
-                      );
-                    });
-                  }, childCount: controller.customKeyboardInfoList.length),
-                );
-              }),
+              SizedBox(height: 16.w),
+
+              Expanded(
+                child: Obx(() {
+                  final list = controller.customKeyboardInfoList;
+                  return CustomScrollView(
+                    physics: const ScrollPhysics(),
+                    slivers: [
+                      SliverToBoxAdapter(child: Container(height: 10.h)),
+                      if (list.isEmpty)
+                        SliverToBoxAdapter(
+                          child: _buildKeyboardListItem(
+                            keyboardInfo: null,
+                            isChosen: false,
+                            hasKeyboard: false,
+                          ),
+                        )
+                      else
+                        SliverList(
+                          delegate: SliverChildBuilderDelegate((context,
+                              index,) {
 
 
-              SliverToBoxAdapter(
-                child: SizedBox(height: 110.h),
+                            return Obx(() {
+                              final keyboardInfo = list[index];
+                              final isChosen =
+                                  keyboardInfo.id ==
+                                      controller.currentCustomKeyboardInfo.id;
+                              return _buildKeyboardListItem(
+                                keyboardInfo: keyboardInfo,
+                                isChosen: isChosen,
+                                hasKeyboard: true,
+                              );
+                            });
+                          }, childCount: list.length),
+                        ),
+
+                      SliverToBoxAdapter(child: SizedBox(height: 110.h)),
+                    ],
+                  );
+                }),
               ),
               ),
             ],
             ],
-
-          )
+          ),
         ),
         ),
         Positioned(
         Positioned(
           bottom: 20.h,
           bottom: 20.h,
@@ -102,8 +111,6 @@ class ProfilePage extends BasePage<ProfileController> {
     );
     );
   }
   }
 
 
-
-
   // 爱心
   // 爱心
   _buildLoveIndex(int? intimacy) {
   _buildLoveIndex(int? intimacy) {
     return Container(
     return Container(
@@ -117,45 +124,50 @@ class ProfilePage extends BasePage<ProfileController> {
           SizedBox(height: 45.h),
           SizedBox(height: 45.h),
           Row(
           Row(
             mainAxisAlignment: MainAxisAlignment.center,
             mainAxisAlignment: MainAxisAlignment.center,
-            children: [Container(
-            padding: EdgeInsets.only(left: 8.w,right: 8.w),
+            children: [
+              Container(
+                padding: EdgeInsets.only(left: 8.w, right: 8.w),
 
 
-            decoration: ShapeDecoration(
-              color: Colors.white,
-              shape: RoundedRectangleBorder(
-                side: BorderSide(width: 1.18.w, color: const Color(0xFFFD649B)),
-                borderRadius: BorderRadius.circular(12.36.r),
-              ),
-            ),
-            child:
-            (intimacy != null)
-                ? Center(
-              child: Text(
-                IntimacyUtil.getIntimacyName(intimacy),
-                style: TextStyle(
-                  color: const Color(0xFFFF73E0),
-                  fontSize: 11.sp,
-                  fontWeight: FontWeight.w500,
+                decoration: ShapeDecoration(
+                  color: Colors.white,
+                  shape: RoundedRectangleBorder(
+                    side: BorderSide(
+                      width: 1.18.w,
+                      color: const Color(0xFFFD649B),
+                    ),
+                    borderRadius: BorderRadius.circular(12.36.r),
+                  ),
                 ),
                 ),
-              ),
-            )
-                : Center(
-              child: Text(
-                "?",
-                style: TextStyle(
-                  color: const Color(0xFFFF73E0),
-                  fontSize: 11.sp,
-                  fontWeight: FontWeight.w500,
+                child:
+                (intimacy != null)
+                    ? Center(
+                  child: Text(
+                    IntimacyUtil.getIntimacyName(intimacy),
+                    style: TextStyle(
+                      color: const Color(0xFFFF73E0),
+                      fontSize: 11.sp,
+                      fontWeight: FontWeight.w500,
+                    ),
+                  ),
+                )
+                    : Center(
+                  child: Text(
+                    "?",
+                    style: TextStyle(
+                      color: const Color(0xFFFF73E0),
+                      fontSize: 11.sp,
+                      fontWeight: FontWeight.w500,
+                    ),
+                  ),
                 ),
                 ),
               ),
               ),
-            ),
-          ),],)
+            ],
+          ),
         ],
         ],
       ),
       ),
     );
     );
   }
   }
 
 
-
   _buildTitle() {
   _buildTitle() {
     return Container(
     return Container(
       alignment: Alignment.centerLeft,
       alignment: Alignment.centerLeft,
@@ -185,6 +197,7 @@ class ProfilePage extends BasePage<ProfileController> {
       ),
       ),
     );
     );
   }
   }
+
   Widget _buildKeyboardListItem({
   Widget _buildKeyboardListItem({
     KeyboardInfo? keyboardInfo,
     KeyboardInfo? keyboardInfo,
     bool isChosen = false,
     bool isChosen = false,
@@ -196,11 +209,15 @@ class ProfilePage extends BasePage<ProfileController> {
     final int gender = hasKeyboard ? (keyboardInfo?.gender ?? 1) : 1;
     final int gender = hasKeyboard ? (keyboardInfo?.gender ?? 1) : 1;
 
 
     return GestureDetector(
     return GestureDetector(
-      onTap: hasKeyboard ? () => controller.clickOnChangeKeyboard(keyboardInfo!) : null,
+      onTap:
+      hasKeyboard
+          ? () => controller.clickOnChangeKeyboard(keyboardInfo!)
+          : null,
       child: Container(
       child: Container(
         height: 164.h,
         height: 164.h,
         margin: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 12.h),
         margin: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 12.h),
-        decoration: isChosen
+        decoration:
+        isChosen
             ? ShapeDecoration(
             ? ShapeDecoration(
           gradient: LinearGradient(
           gradient: LinearGradient(
             begin: Alignment(0.02, 0.04),
             begin: Alignment(0.02, 0.04),
@@ -261,7 +278,13 @@ class ProfilePage extends BasePage<ProfileController> {
                 ),
                 ),
                 Expanded(
                 Expanded(
                   child: Container(
                   child: Container(
-                    margin: isChosen ? EdgeInsets.symmetric(horizontal: 4.w, vertical: 4.w) : EdgeInsets.zero,
+                    margin:
+                    isChosen
+                        ? EdgeInsets.symmetric(
+                      horizontal: 4.w,
+                      vertical: 4.w,
+                    )
+                        : EdgeInsets.zero,
                     decoration: ShapeDecoration(
                     decoration: ShapeDecoration(
                       color: Colors.white,
                       color: Colors.white,
                       shape: RoundedRectangleBorder(
                       shape: RoundedRectangleBorder(
@@ -292,7 +315,12 @@ class ProfilePage extends BasePage<ProfileController> {
                             ? _buildProfileAvatar(
                             ? _buildProfileAvatar(
                           imageUrl: keyboardAvatar,
                           imageUrl: keyboardAvatar,
                           gender: gender,
                           gender: gender,
-                          onTap: () => controller.clickAvatar(isUser: false,keyboardInfo:keyboardInfo),
+                          onTap:
+                              () =>
+                              controller.clickAvatar(
+                                isUser: false,
+                                keyboardInfo: keyboardInfo,
+                              ),
                           genderIconAlignment: Alignment.topLeft,
                           genderIconAlignment: Alignment.topLeft,
                         )
                         )
                             : _buildKeyboardListEmptyAvatar(
                             : _buildKeyboardListEmptyAvatar(
@@ -309,6 +337,7 @@ class ProfilePage extends BasePage<ProfileController> {
       ),
       ),
     );
     );
   }
   }
+
   // 头像
   // 头像
   Widget _buildProfileAvatar({
   Widget _buildProfileAvatar({
     required String? imageUrl,
     required String? imageUrl,
@@ -406,7 +435,6 @@ class ProfilePage extends BasePage<ProfileController> {
     );
     );
   }
   }
 
 
-
   //   没有Keyboard时
   //   没有Keyboard时
   _buildKeyboardListEmptyAvatar({required VoidCallback? onTap}) {
   _buildKeyboardListEmptyAvatar({required VoidCallback? onTap}) {
     return GestureDetector(
     return GestureDetector(
@@ -418,7 +446,7 @@ class ProfilePage extends BasePage<ProfileController> {
             margin: EdgeInsets.only(bottom: 10.h),
             margin: EdgeInsets.only(bottom: 10.h),
             width: 78.w,
             width: 78.w,
             height: 78.w,
             height: 78.w,
-            child:    DottedBorder(
+            child: DottedBorder(
               color: const Color(0xFFA595C8),
               color: const Color(0xFFA595C8),
               strokeWidth: 1.0.w,
               strokeWidth: 1.0.w,
               borderType: BorderType.Circle,
               borderType: BorderType.Circle,
@@ -448,13 +476,10 @@ class ProfilePage extends BasePage<ProfileController> {
                   ],
                   ],
                 ),
                 ),
               ),
               ),
-            )
+            ),
           ),
           ),
-
         ],
         ],
       ),
       ),
     );
     );
-
-
   }
   }
 }
 }

+ 14 - 16
lib/module/splash/splash_controller.dart

@@ -20,7 +20,6 @@ import '../main/main_page.dart';
 class SplashController extends BaseController {
 class SplashController extends BaseController {
   final splashDelayedTime = 2;
   final splashDelayedTime = 2;
 
 
-
   @override
   @override
   Future<void> onInit() async {
   Future<void> onInit() async {
     super.onInit();
     super.onInit();
@@ -30,38 +29,39 @@ class SplashController extends BaseController {
 
 
   @override
   @override
   void onReady() {
   void onReady() {
-
     final isAgreePrivacy = PrivacyCompliance.isAgreePrivacyPolicy();
     final isAgreePrivacy = PrivacyCompliance.isAgreePrivacyPolicy();
     if (isAgreePrivacy) {
     if (isAgreePrivacy) {
       isAgreePrivacyNextStep();
       isAgreePrivacyNextStep();
     } else {
     } else {
-      AgreementDialog.show(cancelClick: () {
-        AgreementAgainDialog.show(
+      AgreementDialog.show(
+        cancelClick: () {
+          AgreementAgainDialog.show(
             cancelClick: () {
             cancelClick: () {
               exitApp();
               exitApp();
             },
             },
             sureClick: () {
             sureClick: () {
               _agreePrivacy();
               _agreePrivacy();
               isAgreePrivacyNextStep();
               isAgreePrivacyNextStep();
-            });
-      }, sureClick: () {
-        _agreePrivacy();
-        isAgreePrivacyNextStep();
-      });
+            },
+          );
+        },
+        sureClick: () {
+          _agreePrivacy();
+          isAgreePrivacyNextStep();
+        },
+      );
     }
     }
   }
   }
 
 
   void isAgreePrivacyNextStep() {
   void isAgreePrivacyNextStep() {
-    _goMain(Duration(seconds: splashDelayedTime));
+    _goMain(Duration(microseconds: 800));
   }
   }
 
 
-
   void _goMain(Duration delayTime, {Map<String, dynamic>? arguments}) {
   void _goMain(Duration delayTime, {Map<String, dynamic>? arguments}) {
     Timer(delayTime, () {
     Timer(delayTime, () {
-
       if (isFirstIntro()) {
       if (isFirstIntro()) {
         IntroPage.start();
         IntroPage.start();
-      }else{
+      } else {
         MainPage.start(arguments: arguments);
         MainPage.start(arguments: arguments);
       }
       }
     });
     });
@@ -70,13 +70,11 @@ class SplashController extends BaseController {
   void exitApp() {
   void exitApp() {
     if (GetPlatform.isAndroid) {
     if (GetPlatform.isAndroid) {
       SystemNavigator.pop();
       SystemNavigator.pop();
-    } else {
-      exit(0);
     }
     }
+    exit(0);
   }
   }
 
 
   void _agreePrivacy() async {
   void _agreePrivacy() async {
-
     PrivacyCompliance.setPrivacyPolicy(true);
     PrivacyCompliance.setPrivacyPolicy(true);
   }
   }
 }
 }

+ 1 - 1
lib/module/store/discount/discount_controller.dart

@@ -4,7 +4,7 @@ import 'package:injectable/injectable.dart';
 import 'package:keyboard/base/base_controller.dart';
 import 'package:keyboard/base/base_controller.dart';
 
 
 import '../../../data/bean/pay_way_info.dart';
 import '../../../data/bean/pay_way_info.dart';
-
+///这版目前没用,用的是newDiscount
 @injectable
 @injectable
 class DiscountController extends BaseController {
 class DiscountController extends BaseController {
   final RxList<PayWayInfo> payWayList = <PayWayInfo>[].obs;
   final RxList<PayWayInfo> payWayList = <PayWayInfo>[].obs;

+ 16 - 10
lib/module/store/store_controller.dart

@@ -278,7 +278,7 @@ class StoreController extends BaseController implements PaymentStatusCallback {
               ToastUtil.show(error.message);
               ToastUtil.show(error.message);
             } else if (error.code == ErrorCode.noLoginError) {
             } else if (error.code == ErrorCode.noLoginError) {
               ToastUtil.show(StringName.accountNoLogin);
               ToastUtil.show(StringName.accountNoLogin);
-            LoginDialog.show();
+              LoginDialog.show();
             } else {
             } else {
               ToastUtil.show(error.message);
               ToastUtil.show(error.message);
               paymentFail();
               paymentFail();
@@ -451,11 +451,11 @@ class StoreController extends BaseController implements PaymentStatusCallback {
     super.onReady();
     super.onReady();
     refreshStoreData();
     refreshStoreData();
   }
   }
+
   @override
   @override
-  void onInit() async{
+  void onInit() async {
     super.onInit();
     super.onInit();
     await AssetLottie(Assets.anim.animSurpriseDialogData).load();
     await AssetLottie(Assets.anim.animSurpriseDialogData).load();
-
   }
   }
 
 
   @override
   @override
@@ -463,15 +463,21 @@ class StoreController extends BaseController implements PaymentStatusCallback {
     super.onClose();
     super.onClose();
     _storeDataFuture?.cancel();
     _storeDataFuture?.cancel();
     paymentStatusManager.unregisterPaymentSuccessCallback(this);
     paymentStatusManager.unregisterPaymentSuccessCallback(this);
-    DiscountTicketDialog.show(clickConfirm: () {
-      NewDiscountPage.start();
-    },clickCancel: () {
-      SurpriseDialog.show(
+
+    if (memberStatusInfo != null && memberStatusInfo!.isMember) {
+      return;
+    }
+    DiscountTicketDialog.show(
+      clickConfirm: () {
+        NewDiscountPage.start();
+      },
+      clickCancel: () {
+        SurpriseDialog.show(
           clickConfirm: () {
           clickConfirm: () {
             NewDiscountPage.start();
             NewDiscountPage.start();
-          }
-      );
-    }
+          },
+        );
+      },
     );
     );
   }
   }
 
 

+ 6 - 3
lib/module/store/suprise/goods_surprise_controller.dart

@@ -21,7 +21,8 @@ class GoodsSurpriseController extends BaseController {
 
 
   CancelableFuture? _storeDataFuture;
   CancelableFuture? _storeDataFuture;
 
 
-  RxList<GoodsInfo> get goodsInfoList => storeRepository.newDiscountGoodsInfoList;
+  RxList<GoodsInfo> get goodsInfoList =>
+      storeRepository.newDiscountGoodsInfoList;
 
 
   final Rxn<GoodsInfo> _firstAmount = Rxn<GoodsInfo>();
   final Rxn<GoodsInfo> _firstAmount = Rxn<GoodsInfo>();
 
 
@@ -36,6 +37,9 @@ class GoodsSurpriseController extends BaseController {
   @override
   @override
   void onInit() {
   void onInit() {
     startCountdown();
     startCountdown();
+    if (goodsInfoList.isEmpty) {
+      return;
+    }
     _firstAmount.value = goodsInfoList.first;
     _firstAmount.value = goodsInfoList.first;
     _secondAmount.value = goodsInfoList.last;
     _secondAmount.value = goodsInfoList.last;
 
 
@@ -45,7 +49,6 @@ class GoodsSurpriseController extends BaseController {
   @override
   @override
   void onReady() {
   void onReady() {
     super.onReady();
     super.onReady();
-
   }
   }
 
 
   void startCountdown() {
   void startCountdown() {
@@ -90,7 +93,7 @@ class GoodsSurpriseController extends BaseController {
 
 
       if (response.firstAmount != null) {
       if (response.firstAmount != null) {
         _firstAmount.value = response.firstAmount;
         _firstAmount.value = response.firstAmount;
-       print('firstAmount: ${response.firstAmount?.toJson()}');
+        print('firstAmount: ${response.firstAmount?.toJson()}');
       }
       }
 
 
       if (response.secondAmount != null) {
       if (response.secondAmount != null) {

+ 1 - 0
lib/module/store/suprise/surprise_dialog.dart

@@ -12,6 +12,7 @@ import '../../../widget/horizontal_dashed_line.dart';
 import '../../../widget/vertical_dots.dart';
 import '../../../widget/vertical_dots.dart';
 import 'goods_surprise_controller.dart';
 import 'goods_surprise_controller.dart';
 
 
+// 惊喜买断价弹窗
 class SurpriseDialog {
 class SurpriseDialog {
   static const String tag = 'SurpriseDialog';
   static const String tag = 'SurpriseDialog';
 
 

+ 1 - 0
lib/module/store/ticket/discount_ticket_dialog.dart

@@ -9,6 +9,7 @@ import '../../../resource/colors.gen.dart';
 import '../../../utils/styles.dart';
 import '../../../utils/styles.dart';
 import '../suprise/goods_surprise_controller.dart';
 import '../suprise/goods_surprise_controller.dart';
 
 
+// 折扣券一杯奶茶弹窗
 class DiscountTicketDialog {
 class DiscountTicketDialog {
   static const String tag = 'DiscountTicketDialog';
   static const String tag = 'DiscountTicketDialog';
 
 

+ 4 - 2
lib/resource/string.gen.dart

@@ -21,7 +21,7 @@ class StringName {
   static final String autoOpenFloatDesc = 'auto_open_float_desc'.tr; // 在启动键盘和APP时,自动打开悬浮窗
   static final String autoOpenFloatDesc = 'auto_open_float_desc'.tr; // 在启动键盘和APP时,自动打开悬浮窗
   static final String vipLevel0Desc = 'vip_level0_desc'.tr; // 开通会员,甜爱脱单只差一步
   static final String vipLevel0Desc = 'vip_level0_desc'.tr; // 开通会员,甜爱脱单只差一步
   static final String vipLevel1Desc = 'vip_level1_desc'.tr; // 会员有效期至
   static final String vipLevel1Desc = 'vip_level1_desc'.tr; // 会员有效期至
-  static final String vipLevel2Desc = 'vip_level2_desc'.tr; // 您已是甜爱键盘终身会员
+  static final String vipLevel2Desc = 'vip_level2_desc'.tr; // 您已是终身会员
   static final String vipLevel0Btn = 'vip_level0_btn'.tr; // 立即开通
   static final String vipLevel0Btn = 'vip_level0_btn'.tr; // 立即开通
   static final String vipLevel1Btn = 'vip_level1_btn'.tr; // 立即续费
   static final String vipLevel1Btn = 'vip_level1_btn'.tr; // 立即续费
   static final String vipLevel2Btn = 'vip_level2_btn'.tr; // 立即查看
   static final String vipLevel2Btn = 'vip_level2_btn'.tr; // 立即查看
@@ -327,6 +327,7 @@ class StringName {
   static final String customLoveKeyboard = 'custom_love_keyboard'.tr; // 定制恋爱键盘
   static final String customLoveKeyboard = 'custom_love_keyboard'.tr; // 定制恋爱键盘
   static final String goToLogin = 'go_to_login'.tr; // 去登录
   static final String goToLogin = 'go_to_login'.tr; // 去登录
   static final String intimacyIndex = 'intimacy_index'.tr; // 亲密指数
   static final String intimacyIndex = 'intimacy_index'.tr; // 亲密指数
+  static final String newUserKeyboardGenerating = 'new_user_keyboard_generating'.tr; // 正在匹配...
 }
 }
 class StringMultiSource {
 class StringMultiSource {
   StringMultiSource._();
   StringMultiSource._();
@@ -351,7 +352,7 @@ class StringMultiSource {
       'auto_open_float_desc': '在启动键盘和APP时,自动打开悬浮窗',
       'auto_open_float_desc': '在启动键盘和APP时,自动打开悬浮窗',
       'vip_level0_desc': '开通会员,甜爱脱单只差一步',
       'vip_level0_desc': '开通会员,甜爱脱单只差一步',
       'vip_level1_desc': '会员有效期至',
       'vip_level1_desc': '会员有效期至',
-      'vip_level2_desc': '您已是甜爱键盘终身会员',
+      'vip_level2_desc': '您已是终身会员',
       'vip_level0_btn': '立即开通',
       'vip_level0_btn': '立即开通',
       'vip_level1_btn': '立即续费',
       'vip_level1_btn': '立即续费',
       'vip_level2_btn': '立即查看',
       'vip_level2_btn': '立即查看',
@@ -657,6 +658,7 @@ class StringMultiSource {
       'custom_love_keyboard': '定制恋爱键盘',
       'custom_love_keyboard': '定制恋爱键盘',
       'go_to_login': '去登录',
       'go_to_login': '去登录',
       'intimacy_index': '亲密指数',
       'intimacy_index': '亲密指数',
+      'new_user_keyboard_generating': '正在匹配...',
     },
     },
   };
   };
 }
 }

+ 3 - 0
pubspec.yaml

@@ -59,6 +59,9 @@ dependencies:
   reorderables:
   reorderables:
     path: plugins/reorderables
     path: plugins/reorderables
 
 
+    #下拉菜单
+  dropdown_button2: ^3.0.0-beta.22
+
   # 图片选择器
   # 图片选择器
   wechat_assets_picker: ^9.5.0
   wechat_assets_picker: ^9.5.0