|
|
@ -17,6 +17,7 @@ import 'package:huixiang/view_widget/my_appbar.dart'; |
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
import 'package:pull_to_refresh/pull_to_refresh.dart'; |
|
|
|
import 'package:pull_to_refresh/pull_to_refresh.dart'; |
|
|
|
import 'package:shared_preferences/shared_preferences.dart'; |
|
|
|
import 'package:shared_preferences/shared_preferences.dart'; |
|
|
|
|
|
|
|
import 'package:shimmer/shimmer.dart'; |
|
|
|
|
|
|
|
|
|
|
|
import '../retrofit/data/member_recharge_list.dart'; |
|
|
|
import '../retrofit/data/member_recharge_list.dart'; |
|
|
|
import '../retrofit/data/rechargeActLists.dart'; |
|
|
|
import '../retrofit/data/rechargeActLists.dart'; |
|
|
@ -55,6 +56,7 @@ class _MineShopRecharge extends State<MineShopRecharge> { |
|
|
|
String storeId; |
|
|
|
String storeId; |
|
|
|
String minToken; |
|
|
|
String minToken; |
|
|
|
final RefreshController refreshController = RefreshController(); |
|
|
|
final RefreshController refreshController = RefreshController(); |
|
|
|
|
|
|
|
int networkStatus = 0; |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
void dispose() { |
|
|
|
void dispose() { |
|
|
@ -87,9 +89,12 @@ class _MineShopRecharge extends State<MineShopRecharge> { |
|
|
|
"id": widget.arguments["id"], |
|
|
|
"id": widget.arguments["id"], |
|
|
|
"latitude": "", |
|
|
|
"latitude": "", |
|
|
|
"longitude": "", |
|
|
|
"longitude": "", |
|
|
|
}).catchError((onError) {}); |
|
|
|
}).catchError((onError) { |
|
|
|
|
|
|
|
networkStatus = -1; |
|
|
|
|
|
|
|
}); |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
vipCard = baseData.data; |
|
|
|
vipCard = baseData.data; |
|
|
|
|
|
|
|
networkStatus = 1; |
|
|
|
} |
|
|
|
} |
|
|
|
} finally { |
|
|
|
} finally { |
|
|
|
if (isSingle) |
|
|
|
if (isSingle) |
|
|
@ -129,9 +134,12 @@ class _MineShopRecharge extends State<MineShopRecharge> { |
|
|
|
queryRechargeActList() async { |
|
|
|
queryRechargeActList() async { |
|
|
|
try { |
|
|
|
try { |
|
|
|
BaseData<List<MemberRechargeList>> baseData = |
|
|
|
BaseData<List<MemberRechargeList>> baseData = |
|
|
|
await minService.memberRechargeList().catchError((onError) {}); |
|
|
|
await minService.memberRechargeList().catchError((onError) { |
|
|
|
|
|
|
|
networkStatus = -1; |
|
|
|
|
|
|
|
}); |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
memberRechargeList = baseData.data; |
|
|
|
memberRechargeList = baseData.data; |
|
|
|
|
|
|
|
networkStatus = 1; |
|
|
|
} |
|
|
|
} |
|
|
|
} finally { |
|
|
|
} finally { |
|
|
|
addLoadCount(); |
|
|
|
addLoadCount(); |
|
|
@ -224,7 +232,7 @@ class _MineShopRecharge extends State<MineShopRecharge> { |
|
|
|
Widget build(BuildContext context) { |
|
|
|
Widget build(BuildContext context) { |
|
|
|
return Scaffold( |
|
|
|
return Scaffold( |
|
|
|
appBar: MyAppBar( |
|
|
|
appBar: MyAppBar( |
|
|
|
title: "店铺充值", |
|
|
|
title: S.of(context).dianpuchongzhi, |
|
|
|
titleColor: Colors.black, |
|
|
|
titleColor: Colors.black, |
|
|
|
background: Colors.white, |
|
|
|
background: Colors.white, |
|
|
|
brightness: Brightness.dark, |
|
|
|
brightness: Brightness.dark, |
|
|
@ -242,158 +250,163 @@ class _MineShopRecharge extends State<MineShopRecharge> { |
|
|
|
controller: refreshController, |
|
|
|
controller: refreshController, |
|
|
|
onRefresh: _onRefresh, |
|
|
|
onRefresh: _onRefresh, |
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
child: Column( |
|
|
|
child: networkStatus == 0 |
|
|
|
children: [ |
|
|
|
? skeletonScreen() |
|
|
|
shopRechargeCard(), |
|
|
|
: Column( |
|
|
|
(memberRechargeList != null && |
|
|
|
children: [ |
|
|
|
(memberRechargeList?.length ?? 0) > 0) |
|
|
|
shopRechargeCard(), |
|
|
|
? Expanded( |
|
|
|
(memberRechargeList != null && |
|
|
|
child: ListView.builder( |
|
|
|
(memberRechargeList?.length ?? 0) > 0) |
|
|
|
padding: EdgeInsets.zero, |
|
|
|
? Expanded( |
|
|
|
itemCount: (memberRechargeList != null && |
|
|
|
child: ListView.builder( |
|
|
|
(memberRechargeList?.length ?? 0) > 0) |
|
|
|
padding: EdgeInsets.zero, |
|
|
|
? memberRechargeList.length |
|
|
|
itemCount: (memberRechargeList != null && |
|
|
|
: 0, |
|
|
|
(memberRechargeList?.length ?? 0) > 0) |
|
|
|
scrollDirection: Axis.vertical, |
|
|
|
? memberRechargeList.length |
|
|
|
shrinkWrap: true, |
|
|
|
: 0, |
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
scrollDirection: Axis.vertical, |
|
|
|
itemBuilder: (context, position) { |
|
|
|
shrinkWrap: true, |
|
|
|
return GestureDetector( |
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
onTap: () { |
|
|
|
itemBuilder: (context, position) { |
|
|
|
setState(() { |
|
|
|
return GestureDetector( |
|
|
|
selectIndex = position; |
|
|
|
onTap: () { |
|
|
|
}); |
|
|
|
setState(() { |
|
|
|
|
|
|
|
selectIndex = position; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
child: rechargeItem( |
|
|
|
|
|
|
|
memberRechargeList[position], position)); |
|
|
|
}, |
|
|
|
}, |
|
|
|
child: rechargeItem( |
|
|
|
)) |
|
|
|
memberRechargeList[position], position)); |
|
|
|
: NoDataView( |
|
|
|
}, |
|
|
|
src: "assets/image/xiao_fei.webp", |
|
|
|
)) |
|
|
|
isShowBtn: false, |
|
|
|
: NoDataView( |
|
|
|
text: "当前店铺暂无充值套餐~", |
|
|
|
src: "assets/image/xiao_fei.webp", |
|
|
|
|
|
|
|
isShowBtn: false, |
|
|
|
|
|
|
|
text: "当前店铺暂无充值套餐~", |
|
|
|
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
|
|
|
margin: |
|
|
|
|
|
|
|
EdgeInsets.only(top: 90.h, left: 60.w, right: 60.w), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
if (memberRechargeList != null && |
|
|
|
|
|
|
|
(memberRechargeList?.length ?? 0) > 0) |
|
|
|
|
|
|
|
Container( |
|
|
|
|
|
|
|
width: double.infinity, |
|
|
|
|
|
|
|
margin: EdgeInsets.only(left: 16, right: 16), |
|
|
|
|
|
|
|
padding: EdgeInsets.only( |
|
|
|
|
|
|
|
top: 20.h, |
|
|
|
|
|
|
|
bottom: 24.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
child: Column( |
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround, |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
Padding( |
|
|
|
|
|
|
|
padding: EdgeInsets.only(bottom: 16.h), |
|
|
|
|
|
|
|
child: Text( |
|
|
|
|
|
|
|
S.of(context).zhifufangshi, |
|
|
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
|
|
fontSize: 16.sp, |
|
|
|
fontSize: 16.sp, |
|
|
|
color: Colors.black, |
|
|
|
margin: EdgeInsets.only( |
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
top: 90.h, left: 60.w, right: 60.w), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
if (memberRechargeList != null && |
|
|
|
|
|
|
|
(memberRechargeList?.length ?? 0) > 0) |
|
|
|
|
|
|
|
Container( |
|
|
|
|
|
|
|
width: double.infinity, |
|
|
|
|
|
|
|
margin: EdgeInsets.only(left: 16, right: 16), |
|
|
|
|
|
|
|
padding: EdgeInsets.only( |
|
|
|
|
|
|
|
top: 20.h, |
|
|
|
|
|
|
|
bottom: 24.h, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
child: Column( |
|
|
|
GestureDetector( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround, |
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
|
|
|
onTap: () { |
|
|
|
|
|
|
|
setState(() { |
|
|
|
|
|
|
|
checkIndex = 2; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
child: Row( |
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
Image.asset("assets/image/icon_we_chat.webp"), |
|
|
|
Padding( |
|
|
|
Expanded( |
|
|
|
padding: EdgeInsets.only(bottom: 16.h), |
|
|
|
flex: 1, |
|
|
|
child: Text( |
|
|
|
child: Padding( |
|
|
|
S.of(context).zhifufangshi, |
|
|
|
padding: EdgeInsets.only(left: 8.w), |
|
|
|
style: TextStyle( |
|
|
|
child: Text( |
|
|
|
fontSize: 16.sp, |
|
|
|
S.of(context).weixinzhifu, |
|
|
|
color: Colors.black, |
|
|
|
style: TextStyle( |
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
fontSize: 14.sp, |
|
|
|
|
|
|
|
color: Color(0xff353535), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
checkView(2), |
|
|
|
GestureDetector( |
|
|
|
], |
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
), |
|
|
|
onTap: () { |
|
|
|
), |
|
|
|
setState(() { |
|
|
|
SizedBox(height: 10.h), |
|
|
|
checkIndex = 2; |
|
|
|
GestureDetector( |
|
|
|
}); |
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
}, |
|
|
|
onTap: () { |
|
|
|
child: Row( |
|
|
|
setState(() { |
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
checkIndex = 3; |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
}); |
|
|
|
children: [ |
|
|
|
}, |
|
|
|
Image.asset("assets/image/icon_we_chat.webp"), |
|
|
|
child: Row( |
|
|
|
Expanded( |
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
flex: 1, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
child: Padding( |
|
|
|
children: [ |
|
|
|
padding: EdgeInsets.only(left: 8.w), |
|
|
|
Image.asset("assets/image/icon_alipay.webp"), |
|
|
|
child: Text( |
|
|
|
Expanded( |
|
|
|
S.of(context).weixinzhifu, |
|
|
|
flex: 1, |
|
|
|
style: TextStyle( |
|
|
|
child: Padding( |
|
|
|
fontSize: 14.sp, |
|
|
|
padding: EdgeInsets.only(left: 8.w), |
|
|
|
color: Color(0xff353535), |
|
|
|
child: Text( |
|
|
|
), |
|
|
|
S.of(context).zhifubao, |
|
|
|
), |
|
|
|
style: TextStyle( |
|
|
|
), |
|
|
|
fontSize: 14.sp, |
|
|
|
|
|
|
|
color: Color(0xff353535), |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
checkView(2), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
SizedBox(height: 10.h), |
|
|
|
|
|
|
|
GestureDetector( |
|
|
|
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
|
|
|
onTap: () { |
|
|
|
|
|
|
|
setState(() { |
|
|
|
|
|
|
|
checkIndex = 3; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
child: Row( |
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
Image.asset("assets/image/icon_alipay.webp"), |
|
|
|
|
|
|
|
Expanded( |
|
|
|
|
|
|
|
flex: 1, |
|
|
|
|
|
|
|
child: Padding( |
|
|
|
|
|
|
|
padding: EdgeInsets.only(left: 8.w), |
|
|
|
|
|
|
|
child: Text( |
|
|
|
|
|
|
|
S.of(context).zhifubao, |
|
|
|
|
|
|
|
style: TextStyle( |
|
|
|
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
|
|
|
color: Color(0xff353535), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
checkView(3), |
|
|
|
|
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
checkView(3), |
|
|
|
|
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
if (memberRechargeList != null && |
|
|
|
), |
|
|
|
(memberRechargeList?.length ?? 0) > 0) |
|
|
|
), |
|
|
|
Align( |
|
|
|
if (memberRechargeList != null && |
|
|
|
alignment: Alignment.bottomCenter, |
|
|
|
(memberRechargeList?.length ?? 0) > 0) |
|
|
|
child: GestureDetector( |
|
|
|
Align( |
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
alignment: Alignment.bottomCenter, |
|
|
|
onTap: () { |
|
|
|
child: GestureDetector( |
|
|
|
shopRecharge(); |
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
}, |
|
|
|
onTap: () { |
|
|
|
child: Container( |
|
|
|
shopRecharge(); |
|
|
|
height: 56.h, |
|
|
|
}, |
|
|
|
width: double.infinity, |
|
|
|
child: Container( |
|
|
|
alignment: Alignment.center, |
|
|
|
height: 56.h, |
|
|
|
decoration: BoxDecoration( |
|
|
|
width: double.infinity, |
|
|
|
color: Color(0xFF32A060), |
|
|
|
alignment: Alignment.center, |
|
|
|
borderRadius: BorderRadius.circular(27), |
|
|
|
decoration: BoxDecoration( |
|
|
|
), |
|
|
|
color: Color(0xFF32A060), |
|
|
|
margin: EdgeInsets.only( |
|
|
|
borderRadius: BorderRadius.circular(27), |
|
|
|
top: 12.h, |
|
|
|
), |
|
|
|
left: 16.w, |
|
|
|
margin: EdgeInsets.only( |
|
|
|
right: 16.w, |
|
|
|
top: 12.h, left: 16.w, right: 16.w, bottom: 21.h), |
|
|
|
bottom: 21.h), |
|
|
|
child: Text( |
|
|
|
child: Text( |
|
|
|
S.of(context).querenchongzhi, |
|
|
|
S.of(context).querenchongzhi, |
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 16.sp, |
|
|
|
fontSize: 16.sp, |
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
color: Colors.white, |
|
|
|
color: Colors.white, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
) |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
) |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
)); |
|
|
|
)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -410,6 +423,334 @@ class _MineShopRecharge extends State<MineShopRecharge> { |
|
|
|
return 0xFF32A060; |
|
|
|
return 0xFF32A060; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
///整体骨架屏 |
|
|
|
|
|
|
|
Widget skeletonScreen() { |
|
|
|
|
|
|
|
return Container( |
|
|
|
|
|
|
|
child: Column( |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
Column( |
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
Container( |
|
|
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
|
|
borderRadius: new BorderRadius.only( |
|
|
|
|
|
|
|
topLeft: Radius.circular(6), |
|
|
|
|
|
|
|
topRight: Radius.circular(6), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
color: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
height: 62.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Container( |
|
|
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
|
|
borderRadius: new BorderRadius.only( |
|
|
|
|
|
|
|
bottomRight: Radius.circular(6), |
|
|
|
|
|
|
|
topRight: Radius.circular(6), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
color: Colors.white, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
padding: EdgeInsets.all(12.h), |
|
|
|
|
|
|
|
child: Column( |
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
Row( |
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
Shimmer.fromColors( |
|
|
|
|
|
|
|
baseColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
highlightColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
|
|
color: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
width: 68.w, |
|
|
|
|
|
|
|
height: 17.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Shimmer.fromColors( |
|
|
|
|
|
|
|
baseColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
highlightColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
|
|
color: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
width: 120.w, |
|
|
|
|
|
|
|
height: 17.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
SizedBox( |
|
|
|
|
|
|
|
height: 4.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Row( |
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
Shimmer.fromColors( |
|
|
|
|
|
|
|
baseColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
highlightColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
|
|
color: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
width: 99.w, |
|
|
|
|
|
|
|
height: 34.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Spacer(), |
|
|
|
|
|
|
|
Shimmer.fromColors( |
|
|
|
|
|
|
|
baseColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
highlightColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
|
|
color: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
width: 48.w, |
|
|
|
|
|
|
|
height: 17.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
SizedBox( |
|
|
|
|
|
|
|
width: 2, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Image.asset( |
|
|
|
|
|
|
|
"assets/image/icon_right_z.webp", |
|
|
|
|
|
|
|
width: 16, |
|
|
|
|
|
|
|
height: 16, |
|
|
|
|
|
|
|
color: Color(0xFF262626), |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Expanded( |
|
|
|
|
|
|
|
child: ListView.builder( |
|
|
|
|
|
|
|
itemCount: 4, |
|
|
|
|
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
|
|
|
|
shrinkWrap: true, |
|
|
|
|
|
|
|
itemBuilder: (context, position) { |
|
|
|
|
|
|
|
return Container( |
|
|
|
|
|
|
|
width: double.infinity, |
|
|
|
|
|
|
|
height: 69.h, |
|
|
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
|
|
borderRadius: BorderRadius.circular(4), |
|
|
|
|
|
|
|
color: Colors.white), |
|
|
|
|
|
|
|
margin: EdgeInsets.only(bottom: 14.h, left: 14.w, right: 14.w), |
|
|
|
|
|
|
|
padding: EdgeInsets.only(left: 16), |
|
|
|
|
|
|
|
child: Flex( |
|
|
|
|
|
|
|
direction: Axis.horizontal, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
Row( |
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
Shimmer.fromColors( |
|
|
|
|
|
|
|
baseColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
highlightColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
|
|
color: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
width: 20.w, |
|
|
|
|
|
|
|
height: 15.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
SizedBox( |
|
|
|
|
|
|
|
width: 10.w, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Shimmer.fromColors( |
|
|
|
|
|
|
|
baseColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
highlightColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
|
|
color: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
width: 50.w, |
|
|
|
|
|
|
|
height: 25.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Container( |
|
|
|
|
|
|
|
width: 1.w, |
|
|
|
|
|
|
|
height: 37.h, |
|
|
|
|
|
|
|
color: Color(0xFF979797), |
|
|
|
|
|
|
|
margin: EdgeInsets.only(right: 16.w, left: 12), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Expanded( |
|
|
|
|
|
|
|
flex: 2, |
|
|
|
|
|
|
|
child: Column( |
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
Row( |
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
Shimmer.fromColors( |
|
|
|
|
|
|
|
baseColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
highlightColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
|
|
color: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
width: 50.w, |
|
|
|
|
|
|
|
height: 17.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
SizedBox( |
|
|
|
|
|
|
|
width: 10.w, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Shimmer.fromColors( |
|
|
|
|
|
|
|
baseColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
highlightColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
|
|
color: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
width: 48.w, |
|
|
|
|
|
|
|
height: 25.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
SizedBox( |
|
|
|
|
|
|
|
height: 4.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Row( |
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
Shimmer.fromColors( |
|
|
|
|
|
|
|
baseColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
highlightColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
|
|
color: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
width: 50.w, |
|
|
|
|
|
|
|
height: 17.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Icon( |
|
|
|
|
|
|
|
Icons.chevron_right, |
|
|
|
|
|
|
|
size: 20, |
|
|
|
|
|
|
|
color: Color(0xFF868686), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
)) |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
)); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
)), |
|
|
|
|
|
|
|
Column( |
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround, |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
Padding( |
|
|
|
|
|
|
|
padding: EdgeInsets.only(bottom: 16.h), |
|
|
|
|
|
|
|
child: Shimmer.fromColors( |
|
|
|
|
|
|
|
baseColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
highlightColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
|
|
color: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
width: 64.w, |
|
|
|
|
|
|
|
height: 21.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Row( |
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
Shimmer.fromColors( |
|
|
|
|
|
|
|
baseColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
highlightColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
|
|
color: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
width: 20.h, |
|
|
|
|
|
|
|
height: 20.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Padding( |
|
|
|
|
|
|
|
padding: EdgeInsets.only(left: 8.w), |
|
|
|
|
|
|
|
child: Shimmer.fromColors( |
|
|
|
|
|
|
|
baseColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
highlightColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
|
|
color: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
width: 51.w, |
|
|
|
|
|
|
|
height: 17.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Spacer(), |
|
|
|
|
|
|
|
Shimmer.fromColors( |
|
|
|
|
|
|
|
baseColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
highlightColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
|
|
color: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
borderRadius: BorderRadius.circular(100), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
width: 15.h, |
|
|
|
|
|
|
|
height: 15.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
SizedBox(height: 10.h), |
|
|
|
|
|
|
|
Row( |
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
Shimmer.fromColors( |
|
|
|
|
|
|
|
baseColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
highlightColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
|
|
color: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
width: 20.h, |
|
|
|
|
|
|
|
height: 20.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Padding( |
|
|
|
|
|
|
|
padding: EdgeInsets.only(left: 8.w), |
|
|
|
|
|
|
|
child: Shimmer.fromColors( |
|
|
|
|
|
|
|
baseColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
highlightColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
|
|
color: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
width: 51.w, |
|
|
|
|
|
|
|
height: 17.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Spacer(), |
|
|
|
|
|
|
|
Shimmer.fromColors( |
|
|
|
|
|
|
|
baseColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
highlightColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
|
|
color: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
borderRadius: BorderRadius.circular(100), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
width: 15.h, |
|
|
|
|
|
|
|
height: 15.h, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
Shimmer.fromColors( |
|
|
|
|
|
|
|
baseColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
highlightColor: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
child: Container( |
|
|
|
|
|
|
|
height: 56.h, |
|
|
|
|
|
|
|
width: double.infinity, |
|
|
|
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
|
|
|
color: Color(0XFFD8D8D8), |
|
|
|
|
|
|
|
borderRadius: BorderRadius.circular(27), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
margin: EdgeInsets.only( |
|
|
|
|
|
|
|
top: 12.h, left: 16.w, right: 16.w, bottom: 21.h), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
///卡片详情 |
|
|
|
///卡片详情 |
|
|
|
Widget shopRechargeCard() { |
|
|
|
Widget shopRechargeCard() { |
|
|
|
return GestureDetector( |
|
|
|
return GestureDetector( |
|
|
@ -617,9 +958,7 @@ class _MineShopRecharge extends State<MineShopRecharge> { |
|
|
|
), |
|
|
|
), |
|
|
|
TextSpan( |
|
|
|
TextSpan( |
|
|
|
text: |
|
|
|
text: |
|
|
|
"${((memberRechargeList?.limitNum ?? 0) != 0 && ((memberRechargeList?.limitNum ?? 0) - (memberRechargeList?.useNum ?? 0) <= 0)) ? |
|
|
|
"${((memberRechargeList?.limitNum ?? 0) != 0 && ((memberRechargeList?.limitNum ?? 0) - (memberRechargeList?.useNum ?? 0) <= 0)) ? (AppUtils.calculateDouble(double.tryParse(memberRechargeList.rechargeMoney) ?? 0)) : (AppUtils.calculateDouble((double.tryParse(memberRechargeList.rechargeMoney) ?? 0) + (double.tryParse(memberRechargeList.giftdMoney) ?? 0) + ((double.tryParse(memberRechargeList.rechargeMoney) ?? 0) - ((double.tryParse(memberRechargeList.rechargeMoney) ?? 0) * (discount / 100)))))}元", |
|
|
|
(AppUtils.calculateDouble(double.tryParse(memberRechargeList.rechargeMoney) ?? 0)) : |
|
|
|
|
|
|
|
(AppUtils.calculateDouble((double.tryParse(memberRechargeList.rechargeMoney) ?? 0) + (double.tryParse(memberRechargeList.giftdMoney) ?? 0) + ((double.tryParse(memberRechargeList.rechargeMoney) ?? 0) - ((double.tryParse(memberRechargeList.rechargeMoney) ?? 0) * (discount / 100)))))}元", |
|
|
|
|
|
|
|
style: TextStyle( |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 18.sp, |
|
|
|
fontSize: 18.sp, |
|
|
|
fontFamily: 'JDZhengHT', |
|
|
|
fontFamily: 'JDZhengHT', |
|
|
@ -677,7 +1016,7 @@ class _MineShopRecharge extends State<MineShopRecharge> { |
|
|
|
checkIndex != index |
|
|
|
checkIndex != index |
|
|
|
? "assets/image/icon_radio_unselected.webp" |
|
|
|
? "assets/image/icon_radio_unselected.webp" |
|
|
|
: "assets/image/icon_radio_selected.webp", |
|
|
|
: "assets/image/icon_radio_selected.webp", |
|
|
|
width: 15.w, |
|
|
|
width: 15.h, |
|
|
|
height: 15.h, |
|
|
|
height: 15.h, |
|
|
|
), |
|
|
|
), |
|
|
|
); |
|
|
|
); |
|
|
|