|
|
|
@ -110,7 +110,7 @@ class _MineVipCore extends State<MineVipCore> {
|
|
|
|
|
await apiService?.rankList().catchError((onError) { |
|
|
|
|
refreshController.refreshFailed(); |
|
|
|
|
refreshController.loadFailed(); |
|
|
|
|
return Future.value(null); |
|
|
|
|
return BaseListData<Rank>()..isSuccess = false; |
|
|
|
|
}); |
|
|
|
|
if (rankData?.isSuccess ?? false) { |
|
|
|
|
ranks.clear(); |
|
|
|
@ -138,7 +138,7 @@ class _MineVipCore extends State<MineVipCore> {
|
|
|
|
|
await apiService?.benefitList().catchError((onError) { |
|
|
|
|
refreshController.refreshFailed(); |
|
|
|
|
refreshController.loadFailed(); |
|
|
|
|
return Future.value(null); |
|
|
|
|
return BaseListData<VipBenefit>()..isSuccess = false; |
|
|
|
|
}); |
|
|
|
|
if (baseData?.isSuccess ?? false) { |
|
|
|
|
setState(() { |
|
|
|
@ -158,7 +158,7 @@ class _MineVipCore extends State<MineVipCore> {
|
|
|
|
|
await apiService?.vipBenefit().catchError((onError) { |
|
|
|
|
refreshController.refreshFailed(); |
|
|
|
|
refreshController.loadFailed(); |
|
|
|
|
return Future.value(null); |
|
|
|
|
return BaseData<VipRuleDetails>()..isSuccess = false; |
|
|
|
|
}); |
|
|
|
|
if (baseData?.isSuccess ?? false) { |
|
|
|
|
setState(() { |
|
|
|
@ -181,8 +181,9 @@ class _MineVipCore extends State<MineVipCore> {
|
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
BaseData<WxPay>? baseData = await apiService?.rankBuy( |
|
|
|
|
{"buyType": 2, "rankId": ranks[checkIndex].id}).catchError((onError) { |
|
|
|
|
BaseData<WxPay>? baseData = await apiService?.rankBuy({ |
|
|
|
|
"buyType": 2, "rankId": ranks[checkIndex].id, |
|
|
|
|
}).catchError((onError) { |
|
|
|
|
return BaseData<WxPay>()..isSuccess = false; |
|
|
|
|
}); |
|
|
|
|
if (baseData?.isSuccess ?? false) { |
|
|
|
@ -248,6 +249,7 @@ class _MineVipCore extends State<MineVipCore> {
|
|
|
|
|
SizedBox(height: 40.h), |
|
|
|
|
Container( |
|
|
|
|
child: Row( |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Expanded( |
|
|
|
|
child: GestureDetector( |
|
|
|
@ -278,13 +280,13 @@ class _MineVipCore extends State<MineVipCore> {
|
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
margin: EdgeInsets.only(right: 16.w), |
|
|
|
|
margin: EdgeInsets.only(right: 16.w, bottom: 10.h), |
|
|
|
|
child: GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
// Navigator.of(context).pushNamed('/router/integral_detailed_page'); |
|
|
|
|
}, |
|
|
|
|
child: Text( |
|
|
|
|
"${S.of(context).dangqianzhukadengji} : ${userInfo?.masterCardRankName}", |
|
|
|
|
"${S.of(context).dangqianzhukadengji} : ${userInfo?.masterCardRankName ?? userInfo?.memberRankVo?.rankName ?? ""}", |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Colors.white, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
@ -297,320 +299,315 @@ class _MineVipCore extends State<MineVipCore> {
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Expanded( |
|
|
|
|
child: SmartRefresher( |
|
|
|
|
controller: refreshController, |
|
|
|
|
enablePullDown: true, |
|
|
|
|
enablePullUp: false, |
|
|
|
|
header: MyHeader( |
|
|
|
|
color: Colors.white, |
|
|
|
|
), |
|
|
|
|
footer: CustomFooter( |
|
|
|
|
builder: (context, mode) { |
|
|
|
|
return MyFooter(mode); |
|
|
|
|
child: SmartRefresher( |
|
|
|
|
controller: refreshController, |
|
|
|
|
enablePullDown: true, |
|
|
|
|
enablePullUp: false, |
|
|
|
|
header: MyHeader( |
|
|
|
|
color: Colors.white, |
|
|
|
|
), |
|
|
|
|
footer: CustomFooter( |
|
|
|
|
builder: (context, mode) { |
|
|
|
|
return MyFooter(mode); |
|
|
|
|
}, |
|
|
|
|
), |
|
|
|
|
onRefresh: () { |
|
|
|
|
_onRefresh(); |
|
|
|
|
}, |
|
|
|
|
), |
|
|
|
|
onRefresh: () { |
|
|
|
|
_onRefresh(); |
|
|
|
|
}, |
|
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
|
scrollController: ScrollController(), |
|
|
|
|
child: SingleChildScrollView( |
|
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
|
child: Column( |
|
|
|
|
children: [ |
|
|
|
|
///会员卡 |
|
|
|
|
if (ranks.length > 0) |
|
|
|
|
Container( |
|
|
|
|
height: (MediaQuery.of(context).size.width) / |
|
|
|
|
1.78 * |
|
|
|
|
AppUtils.textScale(context), |
|
|
|
|
child: Swiper( |
|
|
|
|
viewportFraction: 0.95, |
|
|
|
|
loop: false, |
|
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
|
index: checkIndex, |
|
|
|
|
controller: controller, |
|
|
|
|
onIndexChanged: (index) { |
|
|
|
|
setState(() { |
|
|
|
|
checkIndex = index; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
itemBuilder: (context, position) { |
|
|
|
|
return vipCar(position); |
|
|
|
|
// MineVipView( |
|
|
|
|
// vipLevel: !(ranks != null && ranks.isNotEmpty) |
|
|
|
|
// ? widget.arguments["rankLevel"] |
|
|
|
|
// : position + 1, |
|
|
|
|
// curLevel: widget.arguments["rankLevel"], |
|
|
|
|
// tag: (widget.arguments["rankLevel"] == (position + 1) || |
|
|
|
|
// !(ranks != null && ranks.isNotEmpty)) |
|
|
|
|
// ? "vip" |
|
|
|
|
// : "", |
|
|
|
|
// padding: 6.w, |
|
|
|
|
// // rank: !(ranks != null && ranks.isNotEmpty) |
|
|
|
|
// // ? 0 |
|
|
|
|
// // : widget.arguments["expendAmount"] ?? 0, |
|
|
|
|
// rankMax: !(ranks != null && ranks.isNotEmpty) |
|
|
|
|
// ? 0 |
|
|
|
|
// : ranks[position].rankOrigin, |
|
|
|
|
// createTime: widget.arguments["createTime"], |
|
|
|
|
// showRank: false, |
|
|
|
|
// price: !(ranks != null && ranks.isNotEmpty) |
|
|
|
|
// ? "0" |
|
|
|
|
// : ranks[position].price, |
|
|
|
|
// ); |
|
|
|
|
}, |
|
|
|
|
itemCount: (ranks.isNotEmpty) ? ranks.length : 1, |
|
|
|
|
scrollController: ScrollController(), |
|
|
|
|
child: SingleChildScrollView( |
|
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
|
child: Column( |
|
|
|
|
children: [ |
|
|
|
|
///会员卡 |
|
|
|
|
if (ranks.length > 0) |
|
|
|
|
Container( |
|
|
|
|
height: (MediaQuery.of(context).size.width) / |
|
|
|
|
1.78 * |
|
|
|
|
AppUtils.textScale(context), |
|
|
|
|
child: Swiper( |
|
|
|
|
viewportFraction: 0.95, |
|
|
|
|
loop: false, |
|
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
|
index: checkIndex, |
|
|
|
|
controller: controller, |
|
|
|
|
onIndexChanged: (index) { |
|
|
|
|
setState(() { |
|
|
|
|
checkIndex = index; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
itemBuilder: (context, position) { |
|
|
|
|
return vipCar(position); |
|
|
|
|
// MineVipView( |
|
|
|
|
// vipLevel: !(ranks != null && ranks.isNotEmpty) |
|
|
|
|
// ? widget.arguments["rankLevel"] |
|
|
|
|
// : position + 1, |
|
|
|
|
// curLevel: widget.arguments["rankLevel"], |
|
|
|
|
// tag: (widget.arguments["rankLevel"] == (position + 1) || |
|
|
|
|
// !(ranks != null && ranks.isNotEmpty)) |
|
|
|
|
// ? "vip" |
|
|
|
|
// : "", |
|
|
|
|
// padding: 6.w, |
|
|
|
|
// // rank: !(ranks != null && ranks.isNotEmpty) |
|
|
|
|
// // ? 0 |
|
|
|
|
// // : widget.arguments["expendAmount"] ?? 0, |
|
|
|
|
// rankMax: !(ranks != null && ranks.isNotEmpty) |
|
|
|
|
// ? 0 |
|
|
|
|
// : ranks[position].rankOrigin, |
|
|
|
|
// createTime: widget.arguments["createTime"], |
|
|
|
|
// showRank: false, |
|
|
|
|
// price: !(ranks != null && ranks.isNotEmpty) |
|
|
|
|
// ? "0" |
|
|
|
|
// : ranks[position].price, |
|
|
|
|
// ); |
|
|
|
|
}, |
|
|
|
|
itemCount: (ranks.isNotEmpty) ? ranks.length : 1, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
///会员权益 |
|
|
|
|
Container( |
|
|
|
|
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), |
|
|
|
|
padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: Colors.white, |
|
|
|
|
borderRadius: BorderRadius.only( |
|
|
|
|
topLeft: Radius.circular(8), |
|
|
|
|
topRight: Radius.circular(8), |
|
|
|
|
///会员权益 |
|
|
|
|
Container( |
|
|
|
|
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), |
|
|
|
|
padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: Colors.white, |
|
|
|
|
borderRadius: BorderRadius.only( |
|
|
|
|
topLeft: Radius.circular(8), |
|
|
|
|
topRight: Radius.circular(8), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
children: [ |
|
|
|
|
Container( |
|
|
|
|
width: 4.w, |
|
|
|
|
height: 18.h, |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
gradient: new LinearGradient( |
|
|
|
|
begin: Alignment.bottomCenter, |
|
|
|
|
end: Alignment.topCenter, |
|
|
|
|
colors: [ |
|
|
|
|
Color(0xFF000000), |
|
|
|
|
Color(0xFF585858), |
|
|
|
|
], |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
children: [ |
|
|
|
|
Container( |
|
|
|
|
width: 4.w, |
|
|
|
|
height: 18.h, |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
gradient: new LinearGradient( |
|
|
|
|
begin: Alignment.bottomCenter, |
|
|
|
|
end: Alignment.topCenter, |
|
|
|
|
colors: [ |
|
|
|
|
Color(0xFF000000), |
|
|
|
|
Color(0xFF585858), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
width: 4.w, |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
S.of(context).huiyuanquanyi, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
color: Colors.black, |
|
|
|
|
SizedBox( |
|
|
|
|
width: 4.w, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 12.h, |
|
|
|
|
), |
|
|
|
|
vipLegalRight(), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
///会员规则说明 |
|
|
|
|
Container( |
|
|
|
|
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), |
|
|
|
|
padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: Colors.white, |
|
|
|
|
borderRadius: BorderRadius.only( |
|
|
|
|
topLeft: Radius.circular(8), |
|
|
|
|
topRight: Radius.circular(8), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
children: [ |
|
|
|
|
Container( |
|
|
|
|
width: 4.w, |
|
|
|
|
height: 18.h, |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
gradient: new LinearGradient( |
|
|
|
|
begin: Alignment.bottomCenter, |
|
|
|
|
end: Alignment.topCenter, |
|
|
|
|
colors: [ |
|
|
|
|
Color(0xFF000000), |
|
|
|
|
Color(0xFF585858), |
|
|
|
|
], |
|
|
|
|
Text( |
|
|
|
|
S.of(context).huiyuanquanyi, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
color: Colors.black, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
width: 4.w, |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
S.of(context).huiyuanguize, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
color: Colors.black, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 12.h, |
|
|
|
|
), |
|
|
|
|
if (vipRuleDetails?.qa?.isNotEmpty ?? false) |
|
|
|
|
Container( |
|
|
|
|
color: Colors.white, |
|
|
|
|
padding: EdgeInsets.only(left: 8.w), |
|
|
|
|
child: Html( |
|
|
|
|
data: vipRuleDetails?.qa ?? "", |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
///会员级别对照表 |
|
|
|
|
Container( |
|
|
|
|
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), |
|
|
|
|
padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: Colors.white, |
|
|
|
|
borderRadius: BorderRadius.only( |
|
|
|
|
topLeft: Radius.circular(8), |
|
|
|
|
topRight: Radius.circular(8), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 12.h, |
|
|
|
|
), |
|
|
|
|
vipLegalRight(), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
children: [ |
|
|
|
|
Container( |
|
|
|
|
width: 4.w, |
|
|
|
|
height: 18.h, |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
gradient: new LinearGradient( |
|
|
|
|
begin: Alignment.bottomCenter, |
|
|
|
|
end: Alignment.topCenter, |
|
|
|
|
colors: [ |
|
|
|
|
Color(0xFF000000), |
|
|
|
|
Color(0xFF585858), |
|
|
|
|
], |
|
|
|
|
///会员规则说明 |
|
|
|
|
Container( |
|
|
|
|
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), |
|
|
|
|
padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: Colors.white, |
|
|
|
|
borderRadius: BorderRadius.only( |
|
|
|
|
topLeft: Radius.circular(8), |
|
|
|
|
topRight: Radius.circular(8), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
children: [ |
|
|
|
|
Container( |
|
|
|
|
width: 4.w, |
|
|
|
|
height: 18.h, |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
gradient: new LinearGradient( |
|
|
|
|
begin: Alignment.bottomCenter, |
|
|
|
|
end: Alignment.topCenter, |
|
|
|
|
colors: [ |
|
|
|
|
Color(0xFF000000), |
|
|
|
|
Color(0xFF585858), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
width: 4.w, |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
S.of(context).huiyuanjibieduizhao, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
color: Colors.black, |
|
|
|
|
SizedBox( |
|
|
|
|
width: 4.w, |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
S.of(context).huiyuanguize, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
color: Colors.black, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 12.h, |
|
|
|
|
), |
|
|
|
|
if (vipRuleDetails?.qa?.isNotEmpty ?? false) |
|
|
|
|
Container( |
|
|
|
|
color: Colors.white, |
|
|
|
|
padding: EdgeInsets.only(left: 8.w), |
|
|
|
|
child: Html( |
|
|
|
|
data: vipRuleDetails?.qa ?? "", |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 12.h, |
|
|
|
|
), |
|
|
|
|
MImage( |
|
|
|
|
vipRuleDetails?.contrast ?? "", |
|
|
|
|
width: double.infinity, |
|
|
|
|
height: 281.h, |
|
|
|
|
errorSrc: "assets/image/default_1.webp", |
|
|
|
|
fadeSrc: "assets/image/default_1.webp", |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 16.h, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
|
|
|
|
|
///会员如何获得积分 |
|
|
|
|
Container( |
|
|
|
|
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: Colors.white, |
|
|
|
|
borderRadius: BorderRadius.only( |
|
|
|
|
topLeft: Radius.circular(8), |
|
|
|
|
topRight: Radius.circular(8), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Container( |
|
|
|
|
padding: |
|
|
|
|
EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
///会员级别对照表 |
|
|
|
|
Container( |
|
|
|
|
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), |
|
|
|
|
padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: Colors.white, |
|
|
|
|
borderRadius: BorderRadius.only( |
|
|
|
|
topLeft: Radius.circular(8), |
|
|
|
|
topRight: Radius.circular(8), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
children: [ |
|
|
|
|
Container( |
|
|
|
|
width: 4.w, |
|
|
|
|
height: 18.h, |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
gradient: new LinearGradient( |
|
|
|
|
begin: Alignment.bottomCenter, |
|
|
|
|
end: Alignment.topCenter, |
|
|
|
|
colors: [ |
|
|
|
|
Color(0xFF000000), |
|
|
|
|
Color(0xFF585858), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
width: 4.w, |
|
|
|
|
Container( |
|
|
|
|
width: 4.w, |
|
|
|
|
height: 18.h, |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
gradient: new LinearGradient( |
|
|
|
|
begin: Alignment.bottomCenter, |
|
|
|
|
end: Alignment.topCenter, |
|
|
|
|
colors: [ |
|
|
|
|
Color(0xFF000000), |
|
|
|
|
Color(0xFF585858), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
S.of(context).huiyuanhuodejifen, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
color: Colors.black, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 12.h, |
|
|
|
|
width: 4.w, |
|
|
|
|
), |
|
|
|
|
if (vipRuleDetails?.rule?.isNotEmpty ?? false) |
|
|
|
|
Container( |
|
|
|
|
color: Colors.white, |
|
|
|
|
child: Html( |
|
|
|
|
data: vipRuleDetails?.rule ?? "", |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
S.of(context).huiyuanjibieduizhao, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
color: Colors.black, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 12.h, |
|
|
|
|
), |
|
|
|
|
MImage( |
|
|
|
|
vipRuleDetails?.contrast ?? "", |
|
|
|
|
width: double.infinity, |
|
|
|
|
height: 281.h, |
|
|
|
|
errorSrc: "assets/image/default_1.webp", |
|
|
|
|
fadeSrc: "assets/image/default_1.webp", |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 16.h, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
///会员如何获得积分 |
|
|
|
|
Container( |
|
|
|
|
margin: EdgeInsets.fromLTRB(0, 16.h, 0, 0), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: Colors.white, |
|
|
|
|
borderRadius: BorderRadius.only( |
|
|
|
|
topLeft: Radius.circular(8), |
|
|
|
|
topRight: Radius.circular(8), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Container( |
|
|
|
|
padding: |
|
|
|
|
EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
children: [ |
|
|
|
|
Container( |
|
|
|
|
width: 4.w, |
|
|
|
|
height: 18.h, |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
gradient: new LinearGradient( |
|
|
|
|
begin: Alignment.bottomCenter, |
|
|
|
|
end: Alignment.topCenter, |
|
|
|
|
colors: [ |
|
|
|
|
Color(0xFF000000), |
|
|
|
|
Color(0xFF585858), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
width: 4.w, |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
S.of(context).huiyuanhuodejifen, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
color: Colors.black, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 12.h, |
|
|
|
|
), |
|
|
|
|
if (vipRuleDetails?.rule?.isNotEmpty ?? false) |
|
|
|
|
Container( |
|
|
|
|
color: Colors.white, |
|
|
|
|
child: Html( |
|
|
|
|
data: vipRuleDetails?.rule ?? "", |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
)), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
if (ranks.length > checkIndex && |
|
|
|
|
widget.arguments["rankLevel"] < ranks[checkIndex].level && |
|
|
|
|
ranks[checkIndex].price != "0.00") |
|
|
|
|
if (ranks.length > checkIndex && widget.arguments["rankLevel"] < ranks[checkIndex].level && ranks[checkIndex].price != "0.00") |
|
|
|
|
Align( |
|
|
|
|
alignment: Alignment.bottomCenter, |
|
|
|
|
child: InkWell( |
|
|
|
@ -651,11 +648,9 @@ class _MineVipCore extends State<MineVipCore> {
|
|
|
|
|
|
|
|
|
|
Widget vipCar(int position) { |
|
|
|
|
return Container( |
|
|
|
|
margin: EdgeInsets.fromLTRB(16.w, 16.h, 8.w, 8.h), |
|
|
|
|
width: MediaQuery.of(context).size.width - 32.w, |
|
|
|
|
height: ((MediaQuery.of(context).size.width - 32.w) / |
|
|
|
|
2.11 * |
|
|
|
|
AppUtils.textScale(context)), |
|
|
|
|
margin: EdgeInsets.fromLTRB(12.w, 8.h, 12.w, 8.h), |
|
|
|
|
width: MediaQuery.of(context).size.width - 24.w, |
|
|
|
|
height: ((MediaQuery.of(context).size.width - 16.w) / 2.11 * AppUtils.textScale(context)), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
gradient: LinearGradient( |
|
|
|
|
colors: [ |
|
|
|
@ -678,14 +673,13 @@ class _MineVipCore extends State<MineVipCore> {
|
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Container( |
|
|
|
|
height: 86.w, |
|
|
|
|
height: 86, |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
@ -718,10 +712,7 @@ class _MineVipCore extends State<MineVipCore> {
|
|
|
|
|
child: Text( |
|
|
|
|
"VIP ${ranks[position].rankName ?? ""}", |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(int.parse( |
|
|
|
|
(ranks[position].textColor ?? "") |
|
|
|
|
.replaceAll("#", "FF"), |
|
|
|
|
radix: 16)), |
|
|
|
|
color: Color(int.parse((ranks[position].textColor ?? "").replaceAll("#", "FF"), radix: 16)), |
|
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
|
fontSize: 22.sp, |
|
|
|
|
), |
|
|
|
@ -731,11 +722,11 @@ class _MineVipCore extends State<MineVipCore> {
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
margin: EdgeInsets.only(right: 11.w, bottom: 9.h), |
|
|
|
|
margin: EdgeInsets.only(right: 11.w, bottom: 9), |
|
|
|
|
child: Image.asset( |
|
|
|
|
"assets/image/icon_mine_huixiang_logo.webp", |
|
|
|
|
width: 86.w, |
|
|
|
|
height: 86.w, |
|
|
|
|
width: 86, |
|
|
|
|
height: 86, |
|
|
|
|
fit: BoxFit.contain, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
@ -749,151 +740,123 @@ class _MineVipCore extends State<MineVipCore> {
|
|
|
|
|
bottom: 12.h, |
|
|
|
|
), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround, |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
children: [ |
|
|
|
|
if (userInfo?.memberRankVo?.rankName != |
|
|
|
|
ranks[position].rankName || |
|
|
|
|
(userInfo?.memberRankVo?.rankName == "共创会员" && |
|
|
|
|
ranks[position].rankName == "共创会员")) |
|
|
|
|
if (userInfo?.memberRankVo?.rankName != ranks[position].rankName || (userInfo?.memberRankVo?.rankName == "共创会员" && ranks[position].rankName == "共创会员")) |
|
|
|
|
Align( |
|
|
|
|
alignment: Alignment.centerRight, |
|
|
|
|
child: Text( |
|
|
|
|
(ranks[position].rankName == "共创会员") |
|
|
|
|
? (userInfo?.memberRankVo?.rankName == "共创会员" |
|
|
|
|
? "永久VIP" |
|
|
|
|
: "¥${AppUtils.calculateDouble(double.tryParse("${ranks[position].price}") ?? 0)}/永久") |
|
|
|
|
(ranks[position].rankName == "共创会员") ? (userInfo?.memberRankVo?.rankName == "共创会员" ? "永久VIP" |
|
|
|
|
: "¥${AppUtils.calculateDouble(double.tryParse("${ranks[position].price}") ?? 0)}/永久") |
|
|
|
|
: (ranks[position].originScore ?? 0).toString(), |
|
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(int.parse( |
|
|
|
|
(ranks[position].textColor ?? "") |
|
|
|
|
.replaceAll("#", "FF"), |
|
|
|
|
radix: 16)), |
|
|
|
|
fontWeight: ranks[position].rankName == "共创会员" |
|
|
|
|
? MyFontWeight.regular |
|
|
|
|
: MyFontWeight.bold, |
|
|
|
|
fontSize: ranks[position].rankName == "共创会员" |
|
|
|
|
? 14.sp |
|
|
|
|
: 20.sp, |
|
|
|
|
color: Color(int.parse((ranks[position].textColor ?? "").replaceAll("#", "FF"), radix: 16)), |
|
|
|
|
fontWeight: ranks[position].rankName == "共创会员" ? MyFontWeight.regular : MyFontWeight.bold, |
|
|
|
|
fontSize: ranks[position].rankName == "共创会员" ? 14.sp : 20.sp, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
if (userInfo?.memberRankVo?.rankName == |
|
|
|
|
ranks[position].rankName && |
|
|
|
|
(userInfo?.memberRankVo?.rankName != "共创会员" && |
|
|
|
|
ranks[position].rankName != "共创会员")) |
|
|
|
|
Padding( |
|
|
|
|
padding: EdgeInsets.only(bottom: 12.h), |
|
|
|
|
child: Row( |
|
|
|
|
children: [ |
|
|
|
|
Expanded( |
|
|
|
|
child: Text( |
|
|
|
|
"消费满 ¥${userInfo?.memberRankVo?.nextOrigin ?? "0"} 升级为 ${userInfo?.memberRankVo?.nextName ?? ""}", |
|
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(int.parse( |
|
|
|
|
(ranks[position].textColor ?? "") |
|
|
|
|
.replaceAll("#", "FF"), |
|
|
|
|
radix: 16)), |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
if (userInfo?.memberRankVo?.rankName == ranks[position].rankName && (userInfo?.memberRankVo?.rankName != "共创会员" && ranks[position].rankName != "共创会员")) ... [ |
|
|
|
|
Padding( |
|
|
|
|
padding: EdgeInsets.only(bottom: 8), |
|
|
|
|
child: Row( |
|
|
|
|
children: [ |
|
|
|
|
Expanded( |
|
|
|
|
child: Text( |
|
|
|
|
"消费满 ¥${userInfo?.memberRankVo?.nextOrigin ?? "0"} 升级为 ${userInfo?.memberRankVo?.nextName ?? ""}", |
|
|
|
|
overflow: TextOverflow.ellipsis, |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Color(int.parse( |
|
|
|
|
(ranks[position].textColor ?? "") |
|
|
|
|
.replaceAll("#", "FF"), |
|
|
|
|
radix: 16)), |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Text.rich( |
|
|
|
|
TextSpan( |
|
|
|
|
children: [ |
|
|
|
|
TextSpan( |
|
|
|
|
text: |
|
|
|
|
"${AppUtils.calculateDouble(double.tryParse("${userInfo?.expendAmount}") ?? 0)}", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 24.sp, |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
color: Color(int.parse( |
|
|
|
|
(ranks[position].textColor ?? "") |
|
|
|
|
.replaceAll("#", "FF"), |
|
|
|
|
radix: 16)), |
|
|
|
|
Text.rich( |
|
|
|
|
TextSpan( |
|
|
|
|
children: [ |
|
|
|
|
TextSpan( |
|
|
|
|
text: |
|
|
|
|
"${AppUtils.calculateDouble(double.tryParse("${userInfo?.expendAmount}") ?? 0)}", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 24.sp, |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
color: Color(int.parse( |
|
|
|
|
(ranks[position].textColor ?? "") |
|
|
|
|
.replaceAll("#", "FF"), |
|
|
|
|
radix: 16)), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
TextSpan( |
|
|
|
|
text: |
|
|
|
|
"/${userInfo?.memberRankVo?.nextOrigin ?? "0"}", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
color: Color(int.parse( |
|
|
|
|
(ranks[position].textColor ?? "") |
|
|
|
|
.replaceAll("#", "FF"), |
|
|
|
|
radix: 16)), |
|
|
|
|
TextSpan( |
|
|
|
|
text: |
|
|
|
|
"/${userInfo?.memberRankVo?.nextOrigin ?? "0"}", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
color: Color(int.parse( |
|
|
|
|
(ranks[position].textColor ?? "") |
|
|
|
|
.replaceAll("#", "FF"), |
|
|
|
|
radix: 16)), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
if (userInfo?.memberRankVo?.rankName == |
|
|
|
|
ranks[position].rankName && |
|
|
|
|
(userInfo?.memberRankVo?.rankName != "共创会员" && |
|
|
|
|
ranks[position].rankName != "共创会员")) |
|
|
|
|
Container( |
|
|
|
|
height: 8.h, |
|
|
|
|
child: ClipRRect( |
|
|
|
|
borderRadius: BorderRadius.circular(6.5), |
|
|
|
|
child: LinearProgressIndicator( |
|
|
|
|
value: (userInfo?.memberRankVo?.nextOrigin ?? 0) > |
|
|
|
|
((double.tryParse( |
|
|
|
|
"${userInfo?.expendAmount}") ?? |
|
|
|
|
0) |
|
|
|
|
.toInt()) |
|
|
|
|
? ((checkIndex < (rankNameIndex ?? 0)) |
|
|
|
|
? (userInfo?.memberRankVo?.nextOrigin ?? 0) / |
|
|
|
|
(userInfo?.memberRankVo?.nextOrigin ?? 0) |
|
|
|
|
: ((double.tryParse( |
|
|
|
|
"${userInfo?.expendAmount}") ?? |
|
|
|
|
0) |
|
|
|
|
.toInt()) / |
|
|
|
|
(userInfo?.memberRankVo?.nextOrigin ?? 0)) |
|
|
|
|
: 0, |
|
|
|
|
backgroundColor: Colors.white, |
|
|
|
|
color: AppUtils.getLighterColor( |
|
|
|
|
ranks[position].color ?? ""), |
|
|
|
|
Container( |
|
|
|
|
height: 8, |
|
|
|
|
child: ClipRRect( |
|
|
|
|
borderRadius: BorderRadius.circular(6.5), |
|
|
|
|
child: LinearProgressIndicator( |
|
|
|
|
value: (userInfo?.memberRankVo?.nextOrigin ?? 0) > |
|
|
|
|
((double.tryParse( |
|
|
|
|
"${userInfo?.expendAmount}") ?? |
|
|
|
|
0) |
|
|
|
|
.toInt()) |
|
|
|
|
? ((checkIndex < (rankNameIndex ?? 0)) |
|
|
|
|
? (userInfo?.memberRankVo?.nextOrigin ?? 0) / |
|
|
|
|
(userInfo?.memberRankVo?.nextOrigin ?? 0) |
|
|
|
|
: ((double.tryParse( |
|
|
|
|
"${userInfo?.expendAmount}") ?? |
|
|
|
|
0) |
|
|
|
|
.toInt()) / |
|
|
|
|
(userInfo?.memberRankVo?.nextOrigin ?? 0)) |
|
|
|
|
: 0, |
|
|
|
|
backgroundColor: Colors.white, |
|
|
|
|
color: AppUtils.getLighterColor( |
|
|
|
|
ranks[position].color ?? ""), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Row( |
|
|
|
|
], |
|
|
|
|
Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Text( |
|
|
|
|
S.of(context).kaitongriqi( |
|
|
|
|
(widget.arguments["createTime"] != null && |
|
|
|
|
widget.arguments["createTime"] != "") |
|
|
|
|
? widget.arguments["createTime"].split(" ")[0] |
|
|
|
|
: widget.arguments["createTime"]), |
|
|
|
|
S.of(context).kaitongriqi((widget.arguments["createTime"] != null && widget.arguments["createTime"] != "") ? widget.arguments["createTime"].split(" ")[0] : widget.arguments["createTime"]), |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
color: Color(int.parse( |
|
|
|
|
("${ranks[position].textColor}") |
|
|
|
|
.replaceAll("#", "FF"), |
|
|
|
|
radix: 16))), |
|
|
|
|
color: Color(int.parse(("${ranks[position].textColor}").replaceAll("#", "FF"), radix: 16)), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Icon( |
|
|
|
|
Icons.qr_code, |
|
|
|
|
size: 24, |
|
|
|
|
color: Color(int.parse( |
|
|
|
|
("${ranks[position].textColor}") |
|
|
|
|
.replaceAll("#", "FF"), |
|
|
|
|
radix: 16)), |
|
|
|
|
color: Color(int.parse(("${ranks[position].textColor}").replaceAll("#", "FF"), radix: 16)), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
flex: 1, |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|