From 9bd7cb08a8ab2d0da8ed0310c217ceef349c0f51 Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Fri, 3 Dec 2021 21:01:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E5=91=98=E7=AD=89=E7=BA=A7=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/mine/mine_vip/mine_vip_core.dart | 6 +++--- lib/view_widget/mine_vip_view.dart | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/mine/mine_vip/mine_vip_core.dart b/lib/mine/mine_vip/mine_vip_core.dart index c2902ed6..cf2ea8ae 100644 --- a/lib/mine/mine_vip/mine_vip_core.dart +++ b/lib/mine/mine_vip/mine_vip_core.dart @@ -257,9 +257,9 @@ class _MineVipCore extends State { ? "vip" : "", padding: 6.w, - rank: !(ranks != null && ranks.isNotEmpty) - ? 0 - : widget.arguments["expendAmount"] ?? 0, + // rank: !(ranks != null && ranks.isNotEmpty) + // ? 0 + // : widget.arguments["expendAmount"] ?? 0, rankMax: !(ranks != null && ranks.isNotEmpty) ? 0 : ranks[position].rankOrigin, diff --git a/lib/view_widget/mine_vip_view.dart b/lib/view_widget/mine_vip_view.dart index b1c4daf3..81596f5a 100644 --- a/lib/view_widget/mine_vip_view.dart +++ b/lib/view_widget/mine_vip_view.dart @@ -221,7 +221,7 @@ class MineVipView extends StatelessWidget { // rank > rankMax // ? S.of(context).dangqiandengji // : "${S.of(context).jifen_(rankMax - rank)} ${S.of(context).daoxiayidengji}", - (vipLevel == 3)?"":((vipLevel < curLevel)?"":(((rank ?? 0) > rankMax || curLevel == 3 || curLevel ==2) + !(showRank??true)?"":((vipLevel < curLevel)?"":(((rank ?? 0) > rankMax || curLevel == 3 || curLevel ==2) ? S.of(context).dangqiandengji : "消费¥${rankMax - (rank ?? 0)}元 ${S.of(context).daoxiayidengji}")), overflow: TextOverflow.ellipsis, @@ -237,7 +237,7 @@ class MineVipView extends StatelessWidget { TextSpan( children: [ TextSpan( - text: vipLevel == 3?"":((vipLevel <= curLevel)?rankMax.toString():rank.toString()), + text: !(showRank??true)?(vipLevel == 3?"":rankMax.toString()):((vipLevel < curLevel)?rankMax.toString():rank.toString()), style: TextStyle( fontSize: 26.sp, fontWeight: MyFontWeight.semi_bold, @@ -253,15 +253,15 @@ class MineVipView extends StatelessWidget { color: textColor, ), ), - // if ((rank ?? 0) <= rankMax) - // TextSpan( - // text: rankMax > 0 ? "/$rankMax" : "/0", - // style: TextStyle( - // fontSize: 14.sp, - // fontWeight: MyFontWeight.regular, - // color: textColor, - // ), - // ), + if ((rank ?? 0) <= rankMax && (showRank??true)) + TextSpan( + text: rankMax > 0 ? "/$rankMax" : "/0", + style: TextStyle( + fontSize: 14.sp, + fontWeight: MyFontWeight.regular, + color: textColor, + ), + ), ], ), ),