|
|
@ -110,7 +110,7 @@ class _MineVipCore extends State<MineVipCore> { |
|
|
|
await apiService?.rankList().catchError((onError) { |
|
|
|
await apiService?.rankList().catchError((onError) { |
|
|
|
refreshController.refreshFailed(); |
|
|
|
refreshController.refreshFailed(); |
|
|
|
refreshController.loadFailed(); |
|
|
|
refreshController.loadFailed(); |
|
|
|
return Future.value(null); |
|
|
|
return BaseListData<Rank>()..isSuccess = false; |
|
|
|
}); |
|
|
|
}); |
|
|
|
if (rankData?.isSuccess ?? false) { |
|
|
|
if (rankData?.isSuccess ?? false) { |
|
|
|
ranks.clear(); |
|
|
|
ranks.clear(); |
|
|
@ -138,7 +138,7 @@ class _MineVipCore extends State<MineVipCore> { |
|
|
|
await apiService?.benefitList().catchError((onError) { |
|
|
|
await apiService?.benefitList().catchError((onError) { |
|
|
|
refreshController.refreshFailed(); |
|
|
|
refreshController.refreshFailed(); |
|
|
|
refreshController.loadFailed(); |
|
|
|
refreshController.loadFailed(); |
|
|
|
return Future.value(null); |
|
|
|
return BaseListData<VipBenefit>()..isSuccess = false; |
|
|
|
}); |
|
|
|
}); |
|
|
|
if (baseData?.isSuccess ?? false) { |
|
|
|
if (baseData?.isSuccess ?? false) { |
|
|
|
setState(() { |
|
|
|
setState(() { |
|
|
@ -158,7 +158,7 @@ class _MineVipCore extends State<MineVipCore> { |
|
|
|
await apiService?.vipBenefit().catchError((onError) { |
|
|
|
await apiService?.vipBenefit().catchError((onError) { |
|
|
|
refreshController.refreshFailed(); |
|
|
|
refreshController.refreshFailed(); |
|
|
|
refreshController.loadFailed(); |
|
|
|
refreshController.loadFailed(); |
|
|
|
return Future.value(null); |
|
|
|
return BaseData<VipRuleDetails>()..isSuccess = false; |
|
|
|
}); |
|
|
|
}); |
|
|
|
if (baseData?.isSuccess ?? false) { |
|
|
|
if (baseData?.isSuccess ?? false) { |
|
|
|
setState(() { |
|
|
|
setState(() { |
|
|
@ -181,8 +181,9 @@ class _MineVipCore extends State<MineVipCore> { |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
BaseData<WxPay>? baseData = await apiService?.rankBuy( |
|
|
|
BaseData<WxPay>? baseData = await apiService?.rankBuy({ |
|
|
|
{"buyType": 2, "rankId": ranks[checkIndex].id}).catchError((onError) { |
|
|
|
"buyType": 2, "rankId": ranks[checkIndex].id, |
|
|
|
|
|
|
|
}).catchError((onError) { |
|
|
|
return BaseData<WxPay>()..isSuccess = false; |
|
|
|
return BaseData<WxPay>()..isSuccess = false; |
|
|
|
}); |
|
|
|
}); |
|
|
|
if (baseData?.isSuccess ?? false) { |
|
|
|
if (baseData?.isSuccess ?? false) { |
|
|
@ -248,6 +249,7 @@ class _MineVipCore extends State<MineVipCore> { |
|
|
|
SizedBox(height: 40.h), |
|
|
|
SizedBox(height: 40.h), |
|
|
|
Container( |
|
|
|
Container( |
|
|
|
child: Row( |
|
|
|
child: Row( |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
Expanded( |
|
|
|
Expanded( |
|
|
|
child: GestureDetector( |
|
|
|
child: GestureDetector( |
|
|
@ -278,13 +280,13 @@ class _MineVipCore extends State<MineVipCore> { |
|
|
|
), |
|
|
|
), |
|
|
|
Container( |
|
|
|
Container( |
|
|
|
alignment: Alignment.center, |
|
|
|
alignment: Alignment.center, |
|
|
|
margin: EdgeInsets.only(right: 16.w), |
|
|
|
margin: EdgeInsets.only(right: 16.w, bottom: 10.h), |
|
|
|
child: GestureDetector( |
|
|
|
child: GestureDetector( |
|
|
|
onTap: () { |
|
|
|
onTap: () { |
|
|
|
// Navigator.of(context).pushNamed('/router/integral_detailed_page'); |
|
|
|
// Navigator.of(context).pushNamed('/router/integral_detailed_page'); |
|
|
|
}, |
|
|
|
}, |
|
|
|
child: Text( |
|
|
|
child: Text( |
|
|
|
"${S.of(context).dangqianzhukadengji} : ${userInfo?.masterCardRankName}", |
|
|
|
"${S.of(context).dangqianzhukadengji} : ${userInfo?.masterCardRankName ?? userInfo?.memberRankVo?.rankName ?? ""}", |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
color: Colors.white, |
|
|
|
color: Colors.white, |
|
|
|
fontSize: 16.sp, |
|
|
|
fontSize: 16.sp, |
|
|
@ -363,7 +365,6 @@ class _MineVipCore extends State<MineVipCore> { |
|
|
|
itemCount: (ranks.isNotEmpty) ? ranks.length : 1, |
|
|
|
itemCount: (ranks.isNotEmpty) ? ranks.length : 1, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
///会员权益 |
|
|
|
///会员权益 |
|
|
|
Container( |
|
|
|
Container( |
|
|
|
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), |
|
|
|
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), |
|
|
@ -415,7 +416,6 @@ class _MineVipCore extends State<MineVipCore> { |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
///会员规则说明 |
|
|
|
///会员规则说明 |
|
|
|
Container( |
|
|
|
Container( |
|
|
|
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), |
|
|
|
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), |
|
|
@ -474,7 +474,6 @@ class _MineVipCore extends State<MineVipCore> { |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
///会员级别对照表 |
|
|
|
///会员级别对照表 |
|
|
|
Container( |
|
|
|
Container( |
|
|
|
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), |
|
|
|
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), |
|
|
@ -535,7 +534,6 @@ class _MineVipCore extends State<MineVipCore> { |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
|
|
|
|
///会员如何获得积分 |
|
|
|
///会员如何获得积分 |
|
|
|
Container( |
|
|
|
Container( |
|
|
|
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), |
|
|
|
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), |
|
|
@ -605,12 +603,11 @@ class _MineVipCore extends State<MineVipCore> { |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
)), |
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
if (ranks.length > checkIndex && |
|
|
|
if (ranks.length > checkIndex && widget.arguments["rankLevel"] < ranks[checkIndex].level && ranks[checkIndex].price != "0.00") |
|
|
|
widget.arguments["rankLevel"] < ranks[checkIndex].level && |
|
|
|
|
|
|
|
ranks[checkIndex].price != "0.00") |
|
|
|
|
|
|
|
Align( |
|
|
|
Align( |
|
|
|
alignment: Alignment.bottomCenter, |
|
|
|
alignment: Alignment.bottomCenter, |
|
|
|
child: InkWell( |
|
|
|
child: InkWell( |
|
|
@ -651,11 +648,9 @@ class _MineVipCore extends State<MineVipCore> { |
|
|
|
|
|
|
|
|
|
|
|
Widget vipCar(int position) { |
|
|
|
Widget vipCar(int position) { |
|
|
|
return Container( |
|
|
|
return Container( |
|
|
|
margin: EdgeInsets.fromLTRB(16.w, 16.h, 8.w, 8.h), |
|
|
|
margin: EdgeInsets.fromLTRB(12.w, 8.h, 12.w, 8.h), |
|
|
|
width: MediaQuery.of(context).size.width - 32.w, |
|
|
|
width: MediaQuery.of(context).size.width - 24.w, |
|
|
|
height: ((MediaQuery.of(context).size.width - 32.w) / |
|
|
|
height: ((MediaQuery.of(context).size.width - 16.w) / 2.11 * AppUtils.textScale(context)), |
|
|
|
2.11 * |
|
|
|
|
|
|
|
AppUtils.textScale(context)), |
|
|
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
decoration: BoxDecoration( |
|
|
|
gradient: LinearGradient( |
|
|
|
gradient: LinearGradient( |
|
|
|
colors: [ |
|
|
|
colors: [ |
|
|
@ -678,14 +673,13 @@ class _MineVipCore extends State<MineVipCore> { |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
child: Column( |
|
|
|
child: Column( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
Row( |
|
|
|
Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
Container( |
|
|
|
Container( |
|
|
|
height: 86.w, |
|
|
|
height: 86, |
|
|
|
child: Column( |
|
|
|
child: Column( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
@ -718,10 +712,7 @@ class _MineVipCore extends State<MineVipCore> { |
|
|
|
child: Text( |
|
|
|
child: Text( |
|
|
|
"VIP ${ranks[position].rankName ?? ""}", |
|
|
|
"VIP ${ranks[position].rankName ?? ""}", |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
color: Color(int.parse( |
|
|
|
color: Color(int.parse((ranks[position].textColor ?? "").replaceAll("#", "FF"), radix: 16)), |
|
|
|
(ranks[position].textColor ?? "") |
|
|
|
|
|
|
|
.replaceAll("#", "FF"), |
|
|
|
|
|
|
|
radix: 16)), |
|
|
|
|
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
fontSize: 22.sp, |
|
|
|
fontSize: 22.sp, |
|
|
|
), |
|
|
|
), |
|
|
@ -731,11 +722,11 @@ class _MineVipCore extends State<MineVipCore> { |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
Container( |
|
|
|
Container( |
|
|
|
margin: EdgeInsets.only(right: 11.w, bottom: 9.h), |
|
|
|
margin: EdgeInsets.only(right: 11.w, bottom: 9), |
|
|
|
child: Image.asset( |
|
|
|
child: Image.asset( |
|
|
|
"assets/image/icon_mine_huixiang_logo.webp", |
|
|
|
"assets/image/icon_mine_huixiang_logo.webp", |
|
|
|
width: 86.w, |
|
|
|
width: 86, |
|
|
|
height: 86.w, |
|
|
|
height: 86, |
|
|
|
fit: BoxFit.contain, |
|
|
|
fit: BoxFit.contain, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
@ -749,41 +740,26 @@ class _MineVipCore extends State<MineVipCore> { |
|
|
|
bottom: 12.h, |
|
|
|
bottom: 12.h, |
|
|
|
), |
|
|
|
), |
|
|
|
child: Column( |
|
|
|
child: Column( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround, |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
if (userInfo?.memberRankVo?.rankName != |
|
|
|
if (userInfo?.memberRankVo?.rankName != ranks[position].rankName || (userInfo?.memberRankVo?.rankName == "共创会员" && ranks[position].rankName == "共创会员")) |
|
|
|
ranks[position].rankName || |
|
|
|
|
|
|
|
(userInfo?.memberRankVo?.rankName == "共创会员" && |
|
|
|
|
|
|
|
ranks[position].rankName == "共创会员")) |
|
|
|
|
|
|
|
Align( |
|
|
|
Align( |
|
|
|
alignment: Alignment.centerRight, |
|
|
|
alignment: Alignment.centerRight, |
|
|
|
child: Text( |
|
|
|
child: Text( |
|
|
|
(ranks[position].rankName == "共创会员") |
|
|
|
(ranks[position].rankName == "共创会员") ? (userInfo?.memberRankVo?.rankName == "共创会员" ? "永久VIP" |
|
|
|
? (userInfo?.memberRankVo?.rankName == "共创会员" |
|
|
|
|
|
|
|
? "永久VIP" |
|
|
|
|
|
|
|
: "¥${AppUtils.calculateDouble(double.tryParse("${ranks[position].price}") ?? 0)}/永久") |
|
|
|
: "¥${AppUtils.calculateDouble(double.tryParse("${ranks[position].price}") ?? 0)}/永久") |
|
|
|
: (ranks[position].originScore ?? 0).toString(), |
|
|
|
: (ranks[position].originScore ?? 0).toString(), |
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
color: Color(int.parse( |
|
|
|
color: Color(int.parse((ranks[position].textColor ?? "").replaceAll("#", "FF"), radix: 16)), |
|
|
|
(ranks[position].textColor ?? "") |
|
|
|
fontWeight: ranks[position].rankName == "共创会员" ? MyFontWeight.regular : MyFontWeight.bold, |
|
|
|
.replaceAll("#", "FF"), |
|
|
|
fontSize: ranks[position].rankName == "共创会员" ? 14.sp : 20.sp, |
|
|
|
radix: 16)), |
|
|
|
|
|
|
|
fontWeight: ranks[position].rankName == "共创会员" |
|
|
|
|
|
|
|
? MyFontWeight.regular |
|
|
|
|
|
|
|
: MyFontWeight.bold, |
|
|
|
|
|
|
|
fontSize: ranks[position].rankName == "共创会员" |
|
|
|
|
|
|
|
? 14.sp |
|
|
|
|
|
|
|
: 20.sp, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
if (userInfo?.memberRankVo?.rankName == |
|
|
|
if (userInfo?.memberRankVo?.rankName == ranks[position].rankName && (userInfo?.memberRankVo?.rankName != "共创会员" && ranks[position].rankName != "共创会员")) ... [ |
|
|
|
ranks[position].rankName && |
|
|
|
|
|
|
|
(userInfo?.memberRankVo?.rankName != "共创会员" && |
|
|
|
|
|
|
|
ranks[position].rankName != "共创会员")) |
|
|
|
|
|
|
|
Padding( |
|
|
|
Padding( |
|
|
|
padding: EdgeInsets.only(bottom: 12.h), |
|
|
|
padding: EdgeInsets.only(bottom: 8), |
|
|
|
child: Row( |
|
|
|
child: Row( |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
Expanded( |
|
|
|
Expanded( |
|
|
@ -833,12 +809,8 @@ class _MineVipCore extends State<MineVipCore> { |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
if (userInfo?.memberRankVo?.rankName == |
|
|
|
|
|
|
|
ranks[position].rankName && |
|
|
|
|
|
|
|
(userInfo?.memberRankVo?.rankName != "共创会员" && |
|
|
|
|
|
|
|
ranks[position].rankName != "共创会员")) |
|
|
|
|
|
|
|
Container( |
|
|
|
Container( |
|
|
|
height: 8.h, |
|
|
|
height: 8, |
|
|
|
child: ClipRRect( |
|
|
|
child: ClipRRect( |
|
|
|
borderRadius: BorderRadius.circular(6.5), |
|
|
|
borderRadius: BorderRadius.circular(6.5), |
|
|
|
child: LinearProgressIndicator( |
|
|
|
child: LinearProgressIndicator( |
|
|
@ -862,38 +834,29 @@ class _MineVipCore extends State<MineVipCore> { |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
Row( |
|
|
|
Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
Text( |
|
|
|
Text( |
|
|
|
S.of(context).kaitongriqi( |
|
|
|
S.of(context).kaitongriqi((widget.arguments["createTime"] != null && widget.arguments["createTime"] != "") ? widget.arguments["createTime"].split(" ")[0] : widget.arguments["createTime"]), |
|
|
|
(widget.arguments["createTime"] != null && |
|
|
|
|
|
|
|
widget.arguments["createTime"] != "") |
|
|
|
|
|
|
|
? widget.arguments["createTime"].split(" ")[0] |
|
|
|
|
|
|
|
: widget.arguments["createTime"]), |
|
|
|
|
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
fontSize: 12.sp, |
|
|
|
fontSize: 12.sp, |
|
|
|
color: Color(int.parse( |
|
|
|
color: Color(int.parse(("${ranks[position].textColor}").replaceAll("#", "FF"), radix: 16)), |
|
|
|
("${ranks[position].textColor}") |
|
|
|
), |
|
|
|
.replaceAll("#", "FF"), |
|
|
|
|
|
|
|
radix: 16))), |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
Icon( |
|
|
|
Icon( |
|
|
|
Icons.qr_code, |
|
|
|
Icons.qr_code, |
|
|
|
size: 24, |
|
|
|
size: 24, |
|
|
|
color: Color(int.parse( |
|
|
|
color: Color(int.parse(("${ranks[position].textColor}").replaceAll("#", "FF"), radix: 16)), |
|
|
|
("${ranks[position].textColor}") |
|
|
|
|
|
|
|
.replaceAll("#", "FF"), |
|
|
|
|
|
|
|
radix: 16)), |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
flex: 1, |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|