Selaa lähdekoodia

[fit]1.修改vip人设状态

云天逵 7 kuukautta sitten
vanhempi
commit
286ff61d59

BIN
assets/images/icon_profile_keyboard_select.webp


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

@@ -239,6 +239,8 @@
     <string name="profile_list">档案列表</string>
     <string name="profile_add">添加</string>
     <string name="profile_edit">编辑</string>
+    <string name="profile_select">当前选择</string>
+
 
 
     <string name="keyboard_member_open">开通会员</string>

+ 1 - 1
lib/data/repository/config_repository.dart

@@ -43,7 +43,7 @@ class ConfigRepository {
   void refreshConfig() {
     AsyncUtil.retry(
       () => requestConfigsData(),
-      Duration(seconds: 3),
+      Duration(seconds: 4),
       maxRetry: 100,
     ).then((configsResponse) {
       final list = configsResponse.list;

+ 1 - 3
lib/dialog/content/character_tab_group_content_controller.dart

@@ -98,9 +98,7 @@ class CharacterTabGroupContentController extends BaseController {
     CharacterDetailsDialog.show(
       characterInfo: characterInfo,
       clickCallback: () {
-        if (characterInfo.isVip == true && characterInfo.isLock == true) {
-          unlockCharacter(characterInfo);
-        } else if (characterInfo.isAdd == false) {
+        if (characterInfo.isAdd == false) {
           addCharacter(characterInfo);
         }
       },

+ 2 - 3
lib/module/character/content/character_group_content_controller.dart

@@ -140,9 +140,8 @@ class CharacterGroupContentController extends BaseController {
     CharacterDetailsDialog.show(
       characterInfo: characterInfo,
       clickCallback: () {
-        if (characterInfo.isVip == true && characterInfo.isLock == true) {
-          unlockCharacter(characterInfo);
-        } else if (characterInfo.isAdd == false) {
+        if (characterInfo.isAdd == false) {
+
           addCharacter(characterInfo);
         }
       },

+ 101 - 89
lib/module/profile/profile_page.dart

@@ -61,14 +61,15 @@ class ProfilePage extends BasePage<ProfileController> {
                         )
                       else
                         SliverList(
-                          delegate: SliverChildBuilderDelegate((context,
-                              index,) {
-
+                          delegate: SliverChildBuilderDelegate((
+                            context,
+                            index,
+                          ) {
                             return Obx(() {
                               final keyboardInfo = list[index];
                               final isChosen =
                                   keyboardInfo.id ==
-                                      controller.currentCustomKeyboardInfo.id;
+                                  controller.currentCustomKeyboardInfo.id;
                               return _buildKeyboardListItem(
                                 keyboardInfo: keyboardInfo,
                                 isChosen: isChosen,
@@ -139,27 +140,27 @@ class ProfilePage extends BasePage<ProfileController> {
                   ),
                 ),
                 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,
-                    ),
-                  ),
-                ),
+                    (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,
+                            ),
+                          ),
+                        ),
               ),
             ],
           ),
@@ -210,38 +211,38 @@ class ProfilePage extends BasePage<ProfileController> {
 
     return GestureDetector(
       onTap:
-      hasKeyboard
-          ? () => controller.clickOnChangeKeyboard(keyboardInfo!)
-          : null,
+          hasKeyboard
+              ? () => controller.clickOnChangeKeyboard(keyboardInfo!)
+              : null,
       child: Container(
         height: 164.h,
         margin: EdgeInsets.only(left: 16.w, right: 16.w, bottom: 12.h),
         decoration:
-        isChosen
-            ? ShapeDecoration(
-          gradient: LinearGradient(
-            begin: Alignment(0.02, 0.04),
-            end: Alignment(1.00, 1.00),
-            colors: [const Color(0xFFE7A0FF), const Color(0xFFAB8FFA)],
-          ),
-          shape: RoundedRectangleBorder(
-            borderRadius: BorderRadius.circular(22.r),
-          ),
-          shadows: [
-            BoxShadow(
-              color: Color(0x1CD6C1FF),
-              blurRadius: 4.r,
-              offset: Offset(0, 4.r),
-              spreadRadius: 0,
-            ),
-          ],
-        )
-            : ShapeDecoration(
-          color: Colors.white,
-          shape: RoundedRectangleBorder(
-            borderRadius: BorderRadius.circular(20.r),
-          ),
-        ),
+            isChosen
+                ? ShapeDecoration(
+                  gradient: LinearGradient(
+                    begin: Alignment(0.02, 0.04),
+                    end: Alignment(1.00, 1.00),
+                    colors: [const Color(0xFFE7A0FF), const Color(0xFFAB8FFA)],
+                  ),
+                  shape: RoundedRectangleBorder(
+                    borderRadius: BorderRadius.circular(22.r),
+                  ),
+                  shadows: [
+                    BoxShadow(
+                      color: Color(0x1CD6C1FF),
+                      blurRadius: 4.r,
+                      offset: Offset(0, 4.r),
+                      spreadRadius: 0,
+                    ),
+                  ],
+                )
+                : ShapeDecoration(
+                  color: Colors.white,
+                  shape: RoundedRectangleBorder(
+                    borderRadius: BorderRadius.circular(20.r),
+                  ),
+                ),
         child: Stack(
           children: [
             if (isChosen)
@@ -260,11 +261,23 @@ class ProfilePage extends BasePage<ProfileController> {
                       Text(
                         title,
                         style: TextStyle(
-                          color: const Color(0xFF202020),
+                          color:
+                              isChosen ? Colors.white : const Color(0xFF202020),
                           fontSize: 16.sp,
                           fontWeight: FontWeight.w700,
                         ),
                       ),
+                      const Spacer(),
+                      isChosen ?Text(StringName.profileSelect,style: TextStyle(
+                        color: Colors.white,
+                        fontSize: 14.sp,
+                        fontWeight: FontWeight.w400,
+                      ),):SizedBox(),
+                      SizedBox(width: 4.w),
+                      isChosen?Assets.images.iconProfileKeyboardSelect.image(
+                        width: 17.w,
+                        height: 17.w,
+                      ):SizedBox(),
                     ],
                   ),
                 ),
@@ -279,12 +292,12 @@ class ProfilePage extends BasePage<ProfileController> {
                 Expanded(
                   child: Container(
                     margin:
-                    isChosen
-                        ? EdgeInsets.symmetric(
-                      horizontal: 4.w,
-                      vertical: 4.w,
-                    )
-                        : EdgeInsets.zero,
+                        isChosen
+                            ? EdgeInsets.symmetric(
+                              horizontal: 4.w,
+                              vertical: 4.w,
+                            )
+                            : EdgeInsets.zero,
                     decoration: ShapeDecoration(
                       color: Colors.white,
                       shape: RoundedRectangleBorder(
@@ -313,19 +326,18 @@ class ProfilePage extends BasePage<ProfileController> {
                         SizedBox(width: 8.w),
                         hasKeyboard
                             ? _buildProfileAvatar(
-                          imageUrl: keyboardAvatar,
-                          gender: gender,
-                          onTap:
-                              () =>
-                              controller.clickAvatar(
-                                isUser: false,
-                                keyboardInfo: keyboardInfo,
-                              ),
-                          genderIconAlignment: Alignment.topLeft,
-                        )
+                              imageUrl: keyboardAvatar,
+                              gender: gender,
+                              onTap:
+                                  () => controller.clickAvatar(
+                                    isUser: false,
+                                    keyboardInfo: keyboardInfo,
+                                  ),
+                              genderIconAlignment: Alignment.topLeft,
+                            )
                             : _buildKeyboardListEmptyAvatar(
-                          onTap: () => controller.clickAddButton(),
-                        ),
+                              onTap: () => controller.clickAddButton(),
+                            ),
                       ],
                     ),
                   ),
@@ -358,13 +370,13 @@ class ProfilePage extends BasePage<ProfileController> {
             decoration: ShapeDecoration(
               color: gender == 1 ? const Color(0xFFB7B6FF) : null,
               gradient:
-              gender == 1
-                  ? null
-                  : const LinearGradient(
-                begin: Alignment(0.5, 0),
-                end: Alignment(0.5, 1.0),
-                colors: [Color(0xFFEBE6FF), Color(0xFFFFE6FE)],
-              ),
+                  gender == 1
+                      ? null
+                      : const LinearGradient(
+                        begin: Alignment(0.5, 0),
+                        end: Alignment(0.5, 1.0),
+                        colors: [Color(0xFFEBE6FF), Color(0xFFFFE6FE)],
+                      ),
               shape: RoundedRectangleBorder(
                 side: BorderSide(width: 1.5.w, color: Colors.white),
                 borderRadius: BorderRadius.circular(40.r),
@@ -375,7 +387,7 @@ class ProfilePage extends BasePage<ProfileController> {
               imageUrl: imageUrl,
               size: 78.w,
               borderWidth: 0.r,
-                borderColor: Colors.transparent,
+              borderColor: Colors.transparent,
               placeholder: (_, __) {
                 return const CupertinoActivityIndicator();
               },
@@ -387,15 +399,15 @@ class ProfilePage extends BasePage<ProfileController> {
             left: genderIconAlignment == Alignment.topLeft ? 0 : null,
             right: genderIconAlignment == Alignment.topRight ? 0 : null,
             child:
-            gender == 1
-                ? Assets.images.iconProfileMale.image(
-              width: 20.w,
-              height: 20.w,
-            )
-                : Assets.images.iconProfileFemale.image(
-              width: 20.w,
-              height: 20.w,
-            ),
+                gender == 1
+                    ? Assets.images.iconProfileMale.image(
+                      width: 20.w,
+                      height: 20.w,
+                    )
+                    : Assets.images.iconProfileFemale.image(
+                      width: 20.w,
+                      height: 20.w,
+                    ),
           ),
           Positioned(
             child: Container(

+ 5 - 0
lib/resource/assets.gen.dart

@@ -1033,6 +1033,10 @@ class $AssetsImagesGen {
   AssetGenImage get iconProfileFemale =>
       const AssetGenImage('assets/images/icon_profile_female.webp');
 
+  /// File path: assets/images/icon_profile_keyboard_select.webp
+  AssetGenImage get iconProfileKeyboardSelect =>
+      const AssetGenImage('assets/images/icon_profile_keyboard_select.webp');
+
   /// File path: assets/images/icon_profile_male.webp
   AssetGenImage get iconProfileMale =>
       const AssetGenImage('assets/images/icon_profile_male.webp');
@@ -1457,6 +1461,7 @@ class $AssetsImagesGen {
     iconProfileAdd,
     iconProfileEdit,
     iconProfileFemale,
+    iconProfileKeyboardSelect,
     iconProfileMale,
     iconProfilePlus,
     iconSagittarius,

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

@@ -176,6 +176,7 @@ class StringName {
   static final String profileList = 'profile_list'.tr; // 档案列表
   static final String profileAdd = 'profile_add'.tr; // 添加
   static final String profileEdit = 'profile_edit'.tr; // 编辑
+  static final String profileSelect = 'profile_select'.tr; // 当前选择
   static final String keyboardMemberOpen = 'keyboard_member_open'.tr; // 开通会员
   static final String keyboardGoToManage = 'keyboard_go_to_manage'.tr; // 去管理
   static final String keyboardAdd = 'keyboard_add'.tr; // 添加
@@ -525,6 +526,7 @@ class StringMultiSource {
       'profile_list': '档案列表',
       'profile_add': '添加',
       'profile_edit': '编辑',
+      'profile_select': '当前选择',
       'keyboard_member_open': '开通会员',
       'keyboard_go_to_manage': '去管理',
       'keyboard_add': '添加',