Browse Source

会员等级更改

ff_new
w-R 3 years ago
parent
commit
9bd7cb08a8
  1. 6
      lib/mine/mine_vip/mine_vip_core.dart
  2. 22
      lib/view_widget/mine_vip_view.dart

6
lib/mine/mine_vip/mine_vip_core.dart

@ -257,9 +257,9 @@ class _MineVipCore extends State<MineVipCore> {
? "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,

22
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,
),
),
],
),
),

Loading…
Cancel
Save