Browse Source

no message

xiaobai 2 weeks ago
parent
commit
2476d4d8c2

BIN
assets/images/2.0x/home_ai_chat_bg.png


BIN
assets/images/3.0x/home_ai_chat_bg.png


BIN
assets/images/home_ai_chat_bg.png


+ 2 - 0
lib/generated/json/mood_record_history_model.g.dart

@@ -4,6 +4,8 @@ import 'package:iquokka/pages/today/practice/model/ai_respond_model.dart';
 
 import '../../pages/my/mood_analysis/model/mood_model.dart';
 
+
+
 MoodRecordHistoryModel $MoodRecordHistoryModelFromJson(
     Map<String, dynamic> json) {
   final MoodRecordHistoryModel moodRecordHistoryModel = MoodRecordHistoryModel();

+ 29 - 1
lib/generated/json/vip_buy_model.g.dart

@@ -30,6 +30,22 @@ VipBuyModel $VipBuyModelFromJson(Map<String, dynamic> json) {
   if (discountName != null) {
     vipBuyModel.discountName = discountName;
   }
+  final String? name = jsonConvert.convert<String>(json['name']);
+  if (name != null) {
+    vipBuyModel.name = name;
+  }
+  final String? desc = jsonConvert.convert<String>(json['desc']);
+  if (desc != null) {
+    vipBuyModel.desc = desc;
+  }
+  final String? subscript = jsonConvert.convert<String>(json['subscript']);
+  if (subscript != null) {
+    vipBuyModel.subscript = subscript;
+  }
+  final bool? highlight = jsonConvert.convert<bool>(json['highlight']);
+  if (highlight != null) {
+    vipBuyModel.highlight = highlight;
+  }
   return vipBuyModel;
 }
 
@@ -41,6 +57,10 @@ Map<String, dynamic> $VipBuyModelToJson(VipBuyModel entity) {
   data['iosPrice'] = entity.iosPrice;
   data['channelCodeUsageId'] = entity.channelCodeUsageId;
   data['discountName'] = entity.discountName;
+  data['name'] = entity.name;
+  data['desc'] = entity.desc;
+  data['subscript'] = entity.subscript;
+  data['highlight'] = entity.highlight;
   return data;
 }
 
@@ -52,6 +72,10 @@ extension VipBuyModelExtension on VipBuyModel {
     String? iosPrice,
     int? channelCodeUsageId,
     String? discountName,
+    String? name,
+    String? desc,
+    String? subscript,
+    bool? highlight,
   }) {
     return VipBuyModel()
       ..type = type ?? this.type
@@ -59,6 +83,10 @@ extension VipBuyModelExtension on VipBuyModel {
       ..currentPrice = currentPrice ?? this.currentPrice
       ..iosPrice = iosPrice ?? this.iosPrice
       ..channelCodeUsageId = channelCodeUsageId ?? this.channelCodeUsageId
-      ..discountName = discountName ?? this.discountName;
+      ..discountName = discountName ?? this.discountName
+      ..name = name ?? this.name
+      ..desc = desc ?? this.desc
+      ..subscript = subscript ?? this.subscript
+      ..highlight = highlight ?? this.highlight;
   }
 }

+ 60 - 52
lib/module/app_service.dart

@@ -2,8 +2,8 @@
 import 'package:iquokka/common/AC.dart';
 import 'package:iquokka/common/score_rule_model.dart';
 import 'package:iquokka/module/home_widget_service.dart';
-import 'package:iquokka/module/shared_prefs_util.dart';
 import 'package:iquokka/utils/hex_color.dart';
+import 'package:sp_util/sp_util.dart';
 
 import '../pages/today/main/model/update_tips_model.dart';
 
@@ -23,6 +23,7 @@ class AppService {
   static const String spLoginDialog = "login_dialog";
   static const String spIsInitMood = "is_init_mood";
   static const String spTodayCloseBannerId = "today_close_banner_id";
+  static const String spTodayCloseTopBannerId = "today_close_top_banner_id";
   static const String spCurrentDate = "current_date";
   static const String spVersionUpdateTips = "version_update_tips";
   static const String spCurrentVersionContentTips = "current_version_content_tips";
@@ -43,120 +44,128 @@ class AppService {
   AppService._internal();
 
   isFirstLaunch() {
-    return SharedPrefsUtil.getBool(spFirstLaunch, defValue: true);
+    return SpUtil.getBool(spFirstLaunch, defValue: true);
   }
 
   setLaunch() {
-    SharedPrefsUtil.putBool(spFirstLaunch, false);
+    SpUtil.putBool(spFirstLaunch, false);
   }
 
   isAgreeAgreement() {
-    return SharedPrefsUtil.getBool(spAgreeAgreement, defValue: false);
+    return SpUtil.getBool(spAgreeAgreement, defValue: false);
   }
 
   setAgreeAgreement() {
-    SharedPrefsUtil.putBool(spAgreeAgreement, true);
+    SpUtil.putBool(spAgreeAgreement, true);
   }
 
   isShowGuide() {
-    return SharedPrefsUtil.getBool(spIsShowGuide, defValue: false);
+    return SpUtil.getBool(spIsShowGuide, defValue: false);
   }
 
   setShowGuide() {
-    SharedPrefsUtil.putBool(spIsShowGuide, true);
+    SpUtil.putBool(spIsShowGuide, true);
   }
 
   isPersonalRecommend() {
-    return SharedPrefsUtil.getBool(spIsPersonalRecommend, defValue: false);
+    return SpUtil.getBool(spIsPersonalRecommend, defValue: false);
   }
 
   setPersonalRecommend(bool value) {
-    SharedPrefsUtil.putBool(spIsPersonalRecommend, value);
+    SpUtil.putBool(spIsPersonalRecommend, value);
   }
 
   setPracticeFont(int font) {
-    SharedPrefsUtil.putInt(spIsPracticeFont, font);
+    SpUtil.putInt(spIsPracticeFont, font);
   }
 
   int isPracticeFont() {
-    return SharedPrefsUtil.getInt(spIsPracticeFont, defValue: 0)??0;
+    return SpUtil.getInt(spIsPracticeFont, defValue: 0)??0;
   }
 
   setPwdLock(String password) {
-    SharedPrefsUtil.putString(spPwdLock, password);
+    SpUtil.putString(spPwdLock, password);
   }
 
   String getPwdLock() {
-    return SharedPrefsUtil.getString(spPwdLock, defValue: "")??"";
+    return SpUtil.getString(spPwdLock, defValue: "")??"";
   }
 
   setSentenceBg(int bg) {
-    SharedPrefsUtil.putInt(spSentenceBg, bg);
+    SpUtil.putInt(spSentenceBg, bg);
     HomeWidgetService().updateWidgetSentenceBg();
   }
 
   void setSentenceSlideGuide(bool isShow) {
-    SharedPrefsUtil.putBool(spSentenceSlideGuide, isShow);
+    SpUtil.putBool(spSentenceSlideGuide, isShow);
   }
 
   bool getSentenceSlideGuide() {
-    return SharedPrefsUtil.getBool(spSentenceSlideGuide, defValue: true)??true;
+    return SpUtil.getBool(spSentenceSlideGuide, defValue: true)??true;
   }
 
   int getSentenceBg() {
-    return SharedPrefsUtil.getInt(spSentenceBg, defValue: 1)??1;
+    return SpUtil.getInt(spSentenceBg, defValue: 1)??1;
   }
 
   int getThemeMode() {
-    return SharedPrefsUtil.getInt(spThemeMode, defValue: 0)??0;
+    return SpUtil.getInt(spThemeMode, defValue: 0)??0;
   }
 
   // 设置主题模式, 0跟随系统,1浅色模式,2深色模式
   setThemeMode(int modeType) {
-    SharedPrefsUtil.putInt(spThemeMode, modeType);
+    SpUtil.putInt(spThemeMode, modeType);
     HexColor.reload();
     AC.reload();
     HomeWidgetService().updateWidgetTheme();
   }
 
   void setLoginDialog(bool isShow) {
-    SharedPrefsUtil.putBool(spLoginDialog, isShow);
+    SpUtil.putBool(spLoginDialog, isShow);
   }
 
   bool getLoginDialog() {
-    return SharedPrefsUtil.getBool(spLoginDialog, defValue: false)??false;
+    return SpUtil.getBool(spLoginDialog, defValue: false)??false;
   }
 
   void setIsInitMood(bool isInit) {
-    SharedPrefsUtil.putBool(spIsInitMood, isInit);
+    SpUtil.putBool(spIsInitMood, isInit);
   }
 
   bool getIsInitMood() {
-    return SharedPrefsUtil.getBool(spIsInitMood, defValue: false)??false;
+    return SpUtil.getBool(spIsInitMood, defValue: false)??false;
   }
 
-  void setTodayCloseBannerId(List<String> bannerIds) {
-    SharedPrefsUtil.putStringList(spTodayCloseBannerId, bannerIds);
+  void setTodayCloseBottomBannerId(List<String> bannerIds) {
+    SpUtil.putStringList(spTodayCloseBannerId, bannerIds);
   }
 
-  List<String> getTodayCloseBannerIds() {
-    return SharedPrefsUtil.getStringList(spTodayCloseBannerId) ?? [];
+  List<String> getTodayCloseBottomBannerIds() {
+    return SpUtil.getStringList(spTodayCloseBannerId) ?? [];
+  }
+
+  void setTodayCloseTopBannerId(List<String> bannerIds) {
+    SpUtil.putStringList(spTodayCloseTopBannerId, bannerIds);
+  }
+
+  List<String> getTodayCloseTopBannerIds() {
+    return SpUtil.getStringList(spTodayCloseTopBannerId) ?? [];
   }
 
   void setCurrentDate(String password) {
-    SharedPrefsUtil.putString(spCurrentDate, password);
+    SpUtil.putString(spCurrentDate, password);
   }
 
   String getCurrentDate() {
-    return SharedPrefsUtil.getString(spCurrentDate, defValue: "")??"";
+    return SpUtil.getString(spCurrentDate, defValue: "")??"";
   }
 
   void setVersionUpdateTips(UpdateTipsModel tipsModel) {
-    SharedPrefsUtil.putObject(spVersionUpdateTips, tipsModel);
+    SpUtil.putObject(spVersionUpdateTips, tipsModel);
   }
 
   UpdateTipsModel getVersionUpdateTips() {
-    UpdateTipsModel tipsModel = SharedPrefsUtil.getObj<UpdateTipsModel?>(spVersionUpdateTips, (v) {
+    UpdateTipsModel tipsModel = SpUtil.getObj<UpdateTipsModel?>(spVersionUpdateTips, (v) {
       Map<String, dynamic> converted = {};
       for (var item in v.keys) {
         converted[item.toString()] = v[item];
@@ -168,11 +177,11 @@ class AppService {
   }
 
   void setCurrentVersionUpdateContentTips(UpdateTipsModel tipsModel) {
-    SharedPrefsUtil.putObject(spCurrentVersionContentTips, tipsModel);
+    SpUtil.putObject(spCurrentVersionContentTips, tipsModel);
   }
 
   UpdateTipsModel getCurrentVersionUpdateContentTips() {
-    UpdateTipsModel tipsModel = SharedPrefsUtil.getObj<UpdateTipsModel?>(spCurrentVersionContentTips, (v) {
+    UpdateTipsModel tipsModel = SpUtil.getObj<UpdateTipsModel?>(spCurrentVersionContentTips, (v) {
       Map<String, dynamic> converted = {};
       for (var item in v.keys) {
         converted[item.toString()] = v[item];
@@ -184,11 +193,11 @@ class AppService {
   }
 
   void setAppStoreScoreRule(ScoreRuleModel ruleModel) {
-    SharedPrefsUtil.putObject(spAppStoreScoreRule, ruleModel);
+    SpUtil.putObject(spAppStoreScoreRule, ruleModel);
   }
 
   ScoreRuleModel getAppStoreScoreRule() {
-    ScoreRuleModel ruleModel = SharedPrefsUtil.getObj<ScoreRuleModel?>(spAppStoreScoreRule, (v) {
+    ScoreRuleModel ruleModel = SpUtil.getObj<ScoreRuleModel?>(spAppStoreScoreRule, (v) {
       Map<String, dynamic> converted = {};
       for (var item in v.keys) {
         converted[item.toString()] = v[item];
@@ -200,69 +209,68 @@ class AppService {
   }
 
   void setFootprintHideAiRespond(bool isInit) {
-    SharedPrefsUtil.putBool(spFootprintHideAiRespond, isInit);
+    SpUtil.putBool(spFootprintHideAiRespond, isInit);
   }
 
   bool getFootprintHideAiRespond() {
-    return SharedPrefsUtil.getBool(spFootprintHideAiRespond, defValue: false)??false;
+    return SpUtil.getBool(spFootprintHideAiRespond, defValue: false)??false;
   }
 
   void setHideAiTips(bool isHide) {
-    SharedPrefsUtil.putBool(spHideAiTips, isHide);
+    SpUtil.putBool(spHideAiTips, isHide);
   }
 
   bool getHideAiTips() {
-    return SharedPrefsUtil.getBool(spHideAiTips, defValue: false)??false;
+    return SpUtil.getBool(spHideAiTips, defValue: false)??false;
   }
 
   void setSettingRedPoint(int type) {
-    SharedPrefsUtil.putInt(spSettingRedPoint, type);
+    SpUtil.putInt(spSettingRedPoint, type);
   }
 
   int getSettingRedPoint() {
-    return SharedPrefsUtil.getInt(spSettingRedPoint, defValue: 0)??0;
+    return SpUtil.getInt(spSettingRedPoint, defValue: 0)??0;
   }
 
   // void setSyncAppleHealth(bool isSync) {
-  //   SharedPrefsUtil.putBool(spSyncAppleHealth, isSync);
+  //   SpUtil.putBool(spSyncAppleHealth, isSync);
   // }
   //
   // bool getSyncAppleHealth() {
-  //   return SharedPrefsUtil.getBool(spSyncAppleHealth, defValue: false)??false;
+  //   return SpUtil.getBool(spSyncAppleHealth, defValue: false)??false;
   // }
 
   void setHealthAuthDialog(bool isAuth) {
-    SharedPrefsUtil.putBool(spHealthAuthDialog, isAuth);
+    SpUtil.putBool(spHealthAuthDialog, isAuth);
   }
 
   bool getHealthAuthDialog() {
-    return SharedPrefsUtil.getBool(spHealthAuthDialog, defValue: false)??false;
+    return SpUtil.getBool(spHealthAuthDialog, defValue: false)??false;
   }
 
   void setChatBg(int type) {
-    SharedPrefsUtil.putInt(spChatBg, type);
+    SpUtil.putInt(spChatBg, type);
   }
 
   int getChatBg() {
-    return SharedPrefsUtil.getInt(spChatBg, defValue: 0)??0;
+    return SpUtil.getInt(spChatBg, defValue: 0)??0;
   }
 
   void setHomeChatDialogTips(bool isShow) {
-    SharedPrefsUtil.putBool(spHomeChatDialogTips, isShow);
+    SpUtil.putBool(spHomeChatDialogTips, isShow);
   }
 
   bool getHomeChatDialogTips() {
-    return SharedPrefsUtil.getBool(spHomeChatDialogTips, defValue: false)??false;
+    return SpUtil.getBool(spHomeChatDialogTips, defValue: false)??false;
   }
 
   void setMoreChatDialogTips(bool isShow) {
-    SharedPrefsUtil.putBool(spMoreChatDialogTips, isShow);
+    SpUtil.putBool(spMoreChatDialogTips, isShow);
   }
 
   bool getMoreChatDialogTips() {
-    return SharedPrefsUtil.getBool(spMoreChatDialogTips, defValue: false)??false;
+    return SpUtil.getBool(spMoreChatDialogTips, defValue: false)??false;
   }
 
 
-
 }

+ 1 - 1
lib/net/http_url.dart

@@ -92,7 +92,7 @@ class HttpUrl {
   static const String discover_recommend_URL = "recommend/discover"; //探索推荐
   static const String discover_banner_URL = "banner/bannerList"; //探索banner
 
-  static const String buy_vip_price_URL = "order/vipPriceV2"; //购买vip价格
+  static const String buy_vip_price_URL = "order/vipPriceV3"; //购买vip价格
   static const String buy_vip_wechat_URL = "order/wxBuyVip"; //购买vip,微信支付信息
   static const String buy_practice_wechat_URL = "order/wxBuyPractice"; //购买练习,微信支付信息
   static const String buy_assess_wechat_URL = "order/wxBuyTest"; //购买测评,微信支付信息

+ 4 - 0
lib/pages/my/vip/model/vip_buy_model.dart

@@ -10,6 +10,10 @@ class VipBuyModel {
 	String? iosPrice;
 	int? channelCodeUsageId;
 	String? discountName;
+	String? name;
+	String? desc;
+	String? subscript;
+	bool? highlight;
 
 
 	VipBuyModel();

+ 122 - 142
lib/pages/my/vip/page/vip_buy_page.dart

@@ -14,17 +14,10 @@ import 'package:in_app_purchase_storekit/store_kit_wrappers.dart';
 import 'package:iquokka/pages/my/vip/model/user_comment_model.dart';
 import 'package:iquokka/pages/my/vip/page/vip_common_problem_page.dart';
 import 'package:logger/logger.dart';
-// import 'package:macos_ui/macos_ui.dart';
 import 'package:iquokka/pages/my/vip/model/cash_code_model.dart';
 import 'package:iquokka/pages/my/vip/model/vip_buy_model.dart';
-import 'package:iquokka/pages/my/vip/page/vip_activated_page.dart';
-import 'package:iquokka/pages/my/vip/page/vip_agreement_page.dart';
-import 'package:iquokka/pages/my/vip/view/vip_desc_widget.dart';
 import 'package:iquokka/routers/app_routers.dart';
 import 'package:iquokka/utils/time_util.dart';
-import 'package:package_info_plus/package_info_plus.dart';
-// import 'package:sp_util/sp_util.dart';
-// import 'package:universal_platform/universal_platform.dart';
 
 import '../../../../common/AC.dart';
 import '../../../../gen_a/A.dart';
@@ -38,7 +31,6 @@ import '../../../../utils/base_app_bar.dart';
 import '../../../../utils/event_tracking.dart';
 import '../../../../utils/hex_color.dart';
 import '../../../../utils/toast_utils.dart';
-import '../../../today/main/model/app_config_model.dart';
 import '../../../today/practice/page/practice_detail_page.dart';
 import '../../main/model/user_model.dart';
 
@@ -92,7 +84,7 @@ class _VipBuyState extends State<VipBuyPage>
   double _appBarAlpha = 0;
   double _APPBAR_SCROLL_OFFSET = 200;
   double _offset = 0;
-  bool _isForeverVip = false; //是否永久会员
+  // bool _isForeverVip = false; //是否永久会员
   int _oriVipStatus = 0; //原始vip状态,埋点用
   bool _isShowUseCode = false; //是否显示使用兑换码
   int _type = 1; //1购买页,2会员页
@@ -127,9 +119,9 @@ class _VipBuyState extends State<VipBuyPage>
     }
     else {
       _isShowUseCode = true;
-      if (int.parse(_userModel.vipEndTime??"")>2145888000000) {
-        _isForeverVip = true;
-      }
+      // if (int.parse(_userModel.vipEndTime??"")>2145888000000) {
+      //   _isForeverVip = true;
+      // }
     }
     _requestUserComment();
 
@@ -170,15 +162,15 @@ class _VipBuyState extends State<VipBuyPage>
     });
   }
 
-  VipBuyModel _getVipModelByType(int type) {
-
-    for (VipBuyModel model in _priceList) {
-      if (model.type == type) {
-        return model;
-      }
-    }
-    return VipBuyModel();
-  }
+  // VipBuyModel _getVipModelByType(int type) {
+  //
+  //   for (VipBuyModel model in _priceList) {
+  //     if (model.type == type) {
+  //       return model;
+  //     }
+  //   }
+  //   return VipBuyModel();
+  // }
 
   void _requestUserComment() {
 
@@ -410,21 +402,7 @@ class _VipBuyState extends State<VipBuyPage>
                                                                 ),
                                                               ),
                                                             ),
-                                                          if (buyModel.channelCodeUsageId == null && Platform.isIOS && _userModel.vipStatus==0)...[
-                                                            Container(
-                                                              margin: EdgeInsets.only(top: 10.w, left: 16.w, right: 16.w),
-                                                              alignment: Alignment.center,
-                                                              child: Text(
-                                                                _getVipTypeDesc(buyModel.type??1),
-                                                                textAlign: TextAlign.center,
-                                                                style: TextStyle(
-                                                                    fontSize: 12.sp,
-                                                                    color: HexColor.QUOKKA_T3,
-                                                                    fontWeight: FontWeight.w400
-                                                                ),
-                                                              ),
-                                                            )
-                                                          ]else...[
+                                                          if ((buyModel.discountName??"").isNotEmpty && !(Platform.isIOS && _userModel.vipStatus==0))...[
                                                             Container(
                                                               margin: EdgeInsets.only(top: 10.w),
                                                               width: 117.w,
@@ -443,11 +421,25 @@ class _VipBuyState extends State<VipBuyPage>
                                                                 ),
                                                               ),
                                                             ),
-                                                          ],
+                                                          ] else...[
+                                                            Container(
+                                                              margin: EdgeInsets.only(top: 10.w, left: 16.w, right: 16.w),
+                                                              alignment: Alignment.center,
+                                                              child: Text(
+                                                                _getVipTypeDesc(buyModel),
+                                                                textAlign: TextAlign.center,
+                                                                style: TextStyle(
+                                                                    fontSize: 12.sp,
+                                                                    color: HexColor.QUOKKA_T3,
+                                                                    fontWeight: FontWeight.w400
+                                                                ),
+                                                              ),
+                                                            )
+                                                          ]
                                                         ],
                                                       ),
                                                     ),
-                                                    if (buyModel.type == 4 && buyModel.channelCodeUsageId == null)
+                                                    if (_getSubscript(buyModel).isNotEmpty)
                                                       Positioned(
                                                           left: 0,
                                                           top: 0,
@@ -464,7 +456,7 @@ class _VipBuyState extends State<VipBuyPage>
                                                               ),
                                                             ),
                                                             child: Text(
-                                                              Platform.isIOS?_userModel.vipStatus==0?"限时特惠":"最超值":"最超值",
+                                                              _getSubscript(buyModel),
                                                               style: TextStyle(
                                                                   fontSize: 11.sp,
                                                                   fontWeight: FontWeight.w500,
@@ -473,32 +465,6 @@ class _VipBuyState extends State<VipBuyPage>
                                                             ),
                                                           )
                                                       ),
-                                                    if (buyModel.channelCodeUsageId != null)
-                                                      Positioned(
-                                                          left: 0,
-                                                          top: 0,
-                                                          width: 64.w,
-                                                          height: 20.w,
-                                                          child: Container(
-                                                            alignment: Alignment.center,
-                                                            decoration: BoxDecoration(
-                                                              borderRadius: BorderRadius.only(topLeft: Radius.circular(8.w), topRight: Radius.circular(3.w), bottomRight: Radius.circular(8.w)),
-                                                              gradient: LinearGradient(
-                                                                  begin: Alignment.centerLeft,
-                                                                  end: Alignment.centerRight,
-                                                                  colors: [HexColor("#644128"), HexColor("#8F6343")]
-                                                              ),
-                                                            ),
-                                                            child: Text(
-                                                              "合作专享",
-                                                              style: TextStyle(
-                                                                  fontSize: 11.sp,
-                                                                  fontWeight: FontWeight.w500,
-                                                                  color: HexColor("#E6D89A")
-                                                              ),
-                                                            ),
-                                                          )
-                                                      ),
                                                   ],
                                                 )
                                               ),
@@ -772,7 +738,7 @@ class _VipBuyState extends State<VipBuyPage>
                 Get.toNamed(AppRouters.vipAgreementPage);
               },
             ),
-          if (!(_isForeverVip&&_type==2))
+          if (!((int.parse(_userModel.vipEndTime??"")>2145888000000)&&_type==2))
             InkWell(
               child: Container(
                   margin: EdgeInsets.only(top: 24.w),
@@ -866,6 +832,9 @@ class _VipBuyState extends State<VipBuyPage>
         else if (buyModel.type == 1) {
           text = "连续包月";
         }
+        else {
+          text = buyModel.name??"";
+        }
       }
       else {
         if (buyModel.type == 4) {
@@ -874,6 +843,9 @@ class _VipBuyState extends State<VipBuyPage>
         else if (buyModel.type == 1) {
           text = "月度专业版";
         }
+        else {
+          text = buyModel.name??"";
+        }
       }
     }
     else {
@@ -1021,7 +993,7 @@ class _VipBuyState extends State<VipBuyPage>
         time = "专业版将于"+TimeUtil.getTimeWithTimeStamp(_userModel.vipEndTime??"", "yyyy年MM月dd日")+"过期".tr;
       }
     }else {
-      if (_isForeverVip) {
+      if (int.parse(_userModel.vipEndTime??"")>2145888000000) {
         time = "永久会员".tr;
       }
       else {
@@ -1048,6 +1020,9 @@ class _VipBuyState extends State<VipBuyPage>
             else if (priceType == 4) {
               text = "7天免费用,续费¥${((buyModel.currentPrice??0)/100).toStringAsFixed(2)}/年";
             }
+            else {
+              text = "立即开通";
+            }
           }
           else { //渠道价格
             text = "${buyModel.discountName} 开通专业版";
@@ -1061,6 +1036,9 @@ class _VipBuyState extends State<VipBuyPage>
             else if (priceType == 4) {
               text = "¥${((buyModel.currentPrice??0)/100).toStringAsFixed(2)}/年 续费专业版";
             }
+            else {
+              text = "立即开通";
+            }
           }
           else {
             text = "${buyModel.discountName} 续费专业版";
@@ -1076,6 +1054,9 @@ class _VipBuyState extends State<VipBuyPage>
             else if (priceType == 4) {
               text = "¥${((buyModel.currentPrice??0)/100).toStringAsFixed(2)}/年 开通专业版";
             }
+            else {
+              text = "立即开通";
+            }
           }
           else {
             text = "${buyModel.discountName} 开通专业版";
@@ -1089,6 +1070,9 @@ class _VipBuyState extends State<VipBuyPage>
             else if (priceType == 4) {
               text = "¥${((buyModel.currentPrice??0)/100).toStringAsFixed(2)}/年 续费专业版";
             }
+            else {
+              text = "立即开通";
+            }
           }
           else {
             text = "${buyModel.discountName} 续费专业版";
@@ -1102,30 +1086,26 @@ class _VipBuyState extends State<VipBuyPage>
   }
 
   // type=1月,4年
-  String _getVipTypeDesc(int type) {
-    String desc = "";
-    // if (UniversalPlatform.isIOS) {
-    //   if (_userModel.vipStatus == 0) {
-    //     if (type == 1) {
-    //       desc = "免费试用3天,可随时取消自动续订";
-    //     }
-    //     else if (type == 4) {
-    //       desc = "免费试用7天,可随时取消自动续订";
-    //     }
-    //   }
-    //   else {
-    //     desc = "可随时取消自动续订";
-    //   }
-    // }
-    if (type == 1) {
+  String _getVipTypeDesc(VipBuyModel buyModel) {
+    String desc = buyModel.desc??"";
+    if (buyModel.type == 1) {
       desc = "免费试用3天,可随时取消自动续订";
     }
-    else if (type == 4) {
+    else if (buyModel.type == 4) {
       desc = "免费试用7天,可随时取消自动续订";
     }
     return desc;
   }
 
+  String _getSubscript(VipBuyModel buyModel) {
+
+    String subscript = buyModel.subscript??"";
+    if (buyModel.type == 4) {
+      subscript = Platform.isIOS?_userModel.vipStatus==0?"限时特惠":"最超值":"最超值";
+    }
+    return subscript;
+  }
+
   bool _getBtnIsShowPro() {
 
     if (_type == 2) {
@@ -1137,64 +1117,64 @@ class _VipBuyState extends State<VipBuyPage>
     return true;
   }
 
-  Widget _getMoneyWidget(String money, String time, String desc, bool isSelected, double topPadding) {
-
-    return Container(
-      margin: EdgeInsets.only(top: topPadding),
-      padding: EdgeInsets.fromLTRB(16.w, 12.h, 0, 0),
-      width: 342.w,
-      height: 73.h,
-      decoration: BoxDecoration(
-        color: isSelected?HexColor("#FAB16D").withOpacity(0.2):HexColor.isDarkMode?HexColor.QUOKKA_DARK_BG2:HexColor("#FFFFFF"),
-        borderRadius: BorderRadius.circular(12.h)
-      ),
-      child: Column(
-        crossAxisAlignment: CrossAxisAlignment.start,
-        children: [
-          Container(
-            height: 28.h,
-            child: RichText(
-                text: TextSpan(
-                    text: "",
-                    children: [
-                      TextSpan(
-                        text: money,
-                        style: TextStyle(
-                            fontSize: 20.h,
-                            color: isSelected?HexColor.QUOKKA_BTN:HexColor.QUOKKA_T1,
-                            fontWeight: FontWeight.w600
-                        ),
-                      ),
-                      TextSpan(
-                          text: " "
-                      ),
-                      TextSpan(
-                        text: time,
-                        style: TextStyle(
-                            fontSize: 12.h,
-                            color: isSelected?HexColor.QUOKKA_BTN:HexColor.QUOKKA_T1,
-                            fontWeight: FontWeight.w600
-                        ),
-                      ),
-                    ]
-                )
-            ),
-          ),
-          Container(
-            margin: EdgeInsets.only(top: 2.h),
-            child: Text(
-              desc,
-              style: TextStyle(
-                  fontSize: 12.h,
-                  color: HexColor.isDarkMode?HexColor.QUOKKA_T3:HexColor("#000000").withOpacity(0.5),
-                  fontWeight: FontWeight.w400
-              ),
-            ),
-          )
-        ],
-      ),
-    );
-  }
+  // Widget _getMoneyWidget(String money, String time, String desc, bool isSelected, double topPadding) {
+  //
+  //   return Container(
+  //     margin: EdgeInsets.only(top: topPadding),
+  //     padding: EdgeInsets.fromLTRB(16.w, 12.h, 0, 0),
+  //     width: 342.w,
+  //     height: 73.h,
+  //     decoration: BoxDecoration(
+  //       color: isSelected?HexColor("#FAB16D").withOpacity(0.2):HexColor.isDarkMode?HexColor.QUOKKA_DARK_BG2:HexColor("#FFFFFF"),
+  //       borderRadius: BorderRadius.circular(12.h)
+  //     ),
+  //     child: Column(
+  //       crossAxisAlignment: CrossAxisAlignment.start,
+  //       children: [
+  //         Container(
+  //           height: 28.h,
+  //           child: RichText(
+  //               text: TextSpan(
+  //                   text: "",
+  //                   children: [
+  //                     TextSpan(
+  //                       text: money,
+  //                       style: TextStyle(
+  //                           fontSize: 20.h,
+  //                           color: isSelected?HexColor.QUOKKA_BTN:HexColor.QUOKKA_T1,
+  //                           fontWeight: FontWeight.w600
+  //                       ),
+  //                     ),
+  //                     TextSpan(
+  //                         text: " "
+  //                     ),
+  //                     TextSpan(
+  //                       text: time,
+  //                       style: TextStyle(
+  //                           fontSize: 12.h,
+  //                           color: isSelected?HexColor.QUOKKA_BTN:HexColor.QUOKKA_T1,
+  //                           fontWeight: FontWeight.w600
+  //                       ),
+  //                     ),
+  //                   ]
+  //               )
+  //           ),
+  //         ),
+  //         Container(
+  //           margin: EdgeInsets.only(top: 2.h),
+  //           child: Text(
+  //             desc,
+  //             style: TextStyle(
+  //                 fontSize: 12.h,
+  //                 color: HexColor.isDarkMode?HexColor.QUOKKA_T3:HexColor("#000000").withOpacity(0.5),
+  //                 fontWeight: FontWeight.w400
+  //             ),
+  //           ),
+  //         )
+  //       ],
+  //     ),
+  //   );
+  // }
 
   // timeType=1月,4年
   // String _getMoneyDesc(int timeType) {

+ 3 - 0
lib/routers/app_routers.dart

@@ -16,6 +16,7 @@ import 'package:iquokka/pages/my/setting/page/order_manage_page.dart';
 import 'package:iquokka/pages/my/setting/page/privacy_setting_page.dart';
 import 'package:iquokka/pages/my/setting/page/subscription_manage_page.dart';
 import 'package:iquokka/pages/my/vip/page/vip_agreement_page.dart';
+import 'package:iquokka/pages/my/vip/page/vip_buy_page.dart';
 import 'package:iquokka/pages/today/main/bindings/home_binding.dart';
 import 'package:iquokka/pages/today/main/page/home_page.dart';
 import 'package:iquokka/pages/today/practice/page/practice_detail_page.dart';
@@ -50,6 +51,7 @@ class AppRouters {
   static final String sentenceListPage = "/SentenceListPage";
   static final String aiSettingPage = "/AiSettingPage";
   static final String selfhelpResourcePage = "/SelfhelpResourcePage";
+  static final String vipBuyPage = "/VipBuyPage";
 
 
   static final List<GetPage> routers = [
@@ -72,5 +74,6 @@ class AppRouters {
     GetPage(name: sentenceListPage, page: ()=> SentenceListPage()),
     GetPage(name: aiSettingPage, page: ()=> AiSettingPage()),
     GetPage(name: selfhelpResourcePage, page: ()=> SelfhelpResourcePage()),
+    GetPage(name: vipBuyPage, page: ()=> VipBuyPage()),
   ];
 }

+ 2 - 2
ohos/build-profile.json5

@@ -6,9 +6,9 @@
         "type": "HarmonyOS",
         "material": {
           "storeFile": "/Users/xiaobai/Desktop/FlutterAPP/Harmony/profile/p12/ohos.p12",
-          "storePassword": "0000001C8F5B0109C110ACEA8E1C4533A5399D25BE4B73559076B8B0483494BABB87CB3DC23B50977AF728C6",
+          "storePassword": "0000001CBC7CCF57A46DE18751896D6BAB34CD8C51D86A5554CBEB87187B60894B72AEC3550B7A4EB576D0AA",
           "keyAlias": "ohosAlias",
-          "keyPassword": "0000001CA588EC1F68E2882840CB1E8A07C509A01F39DB697ACA5A6411D50B53246E9595B369951C446254EF",
+          "keyPassword": "0000001CAAF77C5DAEA0CF6CC99BA299CBC0B2E6DABA6A41A8BE623121341D6F6D2322F04533AD45296F510F",
           "signAlg": "SHA256withECDSA",
           "profile": "/Users/xiaobai/Desktop/FlutterAPP/Harmony/profile/iquokka_release_profileRelease.p7b",
           "certpath": "/Users/xiaobai/Desktop/FlutterAPP/Harmony/profile/iquokka_release.cer"