|
|
|
@ -13,6 +13,7 @@ import 'package:huixiang/retrofit/retrofit_api.dart';
|
|
|
|
|
import 'package:huixiang/utils/font_weight.dart'; |
|
|
|
|
import 'package:huixiang/utils/min.dart'; |
|
|
|
|
import 'package:huixiang/view_widget/my_appbar.dart'; |
|
|
|
|
import 'package:huixiang/view_widget/round_button.dart'; |
|
|
|
|
import 'package:shared_preferences/shared_preferences.dart'; |
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
|
|
|
|
|
@ -226,6 +227,85 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
|
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
margin: |
|
|
|
|
EdgeInsets.only(left: 16, right: 16, top: 26, bottom: 8), |
|
|
|
|
padding: EdgeInsets.all(20), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: Colors.white, |
|
|
|
|
boxShadow: [ |
|
|
|
|
BoxShadow( |
|
|
|
|
color: Colors.black.withAlpha(12), |
|
|
|
|
offset: Offset(0, 3), |
|
|
|
|
blurRadius: 14, |
|
|
|
|
spreadRadius: 0, |
|
|
|
|
) |
|
|
|
|
], |
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(8)), |
|
|
|
|
), |
|
|
|
|
child: Column( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
Row( |
|
|
|
|
children: [ |
|
|
|
|
Image.asset( |
|
|
|
|
"assets/image/icon_order_exchange_info.png", |
|
|
|
|
width: 24, |
|
|
|
|
height: 24, |
|
|
|
|
), |
|
|
|
|
SizedBox(width: 4), |
|
|
|
|
Text( |
|
|
|
|
S.of(context).duihuanxinxi, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
|
fontSize: 16, |
|
|
|
|
color: Color(0xFF353535)), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 18.h, |
|
|
|
|
), |
|
|
|
|
Row( |
|
|
|
|
children: [ |
|
|
|
|
Text( |
|
|
|
|
S.of(context).lingqufangshi, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
color: Color(0xFF353535), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
width: 12.w, |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
widget.arguments["useTyped"] == 1 |
|
|
|
|
? S.of(context).ziti |
|
|
|
|
: widget.arguments["useTyped"] == 2 |
|
|
|
|
? S.of(context).peisong |
|
|
|
|
: S.of(context).xianshangfafang, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
color: Color(0xFF353535), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 12.h, |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
"非实物商品兑换后领取到卡包即可使用!", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
|
fontWeight: MyFontWeight.medium |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
margin: |
|
|
|
|
EdgeInsets.only(left: 16, right: 16, top: 8, bottom: 16), |
|
|
|
@ -318,38 +398,62 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
|
|
|
|
|
SizedBox( |
|
|
|
|
height: 12.h, |
|
|
|
|
), |
|
|
|
|
// Row( |
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
// children: [ |
|
|
|
|
// Text( |
|
|
|
|
// "商品积分", |
|
|
|
|
// style: |
|
|
|
|
// TextStyle(fontSize: 14, color: Color(0xFF353535)), |
|
|
|
|
// ), |
|
|
|
|
// SizedBox( |
|
|
|
|
// width: 12, |
|
|
|
|
// ), |
|
|
|
|
// Text( |
|
|
|
|
// S.of(context).jifen_(widget.arguments["price"]), |
|
|
|
|
// style: TextStyle( |
|
|
|
|
// fontSize: 12, |
|
|
|
|
// color: Colors.black, |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
// ], |
|
|
|
|
// ), |
|
|
|
|
// SizedBox( |
|
|
|
|
// height: 12, |
|
|
|
|
// ), |
|
|
|
|
Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Text( |
|
|
|
|
"实付积分", |
|
|
|
|
"应付数额", |
|
|
|
|
style: |
|
|
|
|
TextStyle(fontSize: 14, color: Color(0xFF353535),fontWeight: MyFontWeight.regular), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
width: 12, |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
S.of(context).jifen_(widget.arguments["price"]), |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 14.sp, color: Color(0xFF353535)), |
|
|
|
|
fontSize: 12, |
|
|
|
|
color: Colors.black, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 12, |
|
|
|
|
), |
|
|
|
|
Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Text( |
|
|
|
|
"现金抵扣积分", |
|
|
|
|
style: |
|
|
|
|
TextStyle(fontSize: 14, color: Color(0xFF353535),fontWeight: MyFontWeight.regular), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
width: 12, |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
S.of(context).jifen_(widget.arguments["price"]), |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 12, |
|
|
|
|
color: Colors.black, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 12, |
|
|
|
|
), |
|
|
|
|
Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Text( |
|
|
|
|
"合计", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 14.sp, color: Color(0xFF353535),fontWeight: MyFontWeight.regular), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
width: 12.w, |
|
|
|
@ -432,7 +536,7 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
|
|
|
|
|
left: 16.w, |
|
|
|
|
right: 16.w, |
|
|
|
|
top: 12.h, |
|
|
|
|
bottom:5.h, |
|
|
|
|
bottom:20.h, |
|
|
|
|
), |
|
|
|
|
padding: EdgeInsets.only( |
|
|
|
|
left: 16.w, |
|
|
|
@ -577,29 +681,124 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
|
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
// GestureDetector( |
|
|
|
|
// onTap: () { |
|
|
|
|
// if (!storeIsSelected) return; |
|
|
|
|
// creditOrder(); |
|
|
|
|
// }, |
|
|
|
|
// child: Container( |
|
|
|
|
// padding: EdgeInsets.only(top: 16, bottom: 16), |
|
|
|
|
// decoration: BoxDecoration( |
|
|
|
|
// color: MaterialStateColor.resolveWith((states) => |
|
|
|
|
// storeIsSelected ? Color(0xFF32A060) : Color(0xFFD8D8D8)), |
|
|
|
|
// borderRadius: BorderRadius.only( |
|
|
|
|
// topLeft: Radius.circular(4), |
|
|
|
|
// topRight: Radius.circular(4))), |
|
|
|
|
// alignment: Alignment.center, |
|
|
|
|
// child: Text( |
|
|
|
|
// S.of(context).querenduihuan, |
|
|
|
|
// style: TextStyle( |
|
|
|
|
// fontSize: 16.sp, |
|
|
|
|
// color: MaterialStateColor.resolveWith((states) => |
|
|
|
|
// storeIsSelected ? Colors.white : Color(0xFFA0A0A0)), |
|
|
|
|
// fontWeight: FontWeight.bold), |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
Container( |
|
|
|
|
height: 54.h, |
|
|
|
|
color: Colors.white, |
|
|
|
|
child: Row( |
|
|
|
|
children: [ |
|
|
|
|
Spacer(), |
|
|
|
|
Padding(padding: EdgeInsets.only(top: 7,right: 16), |
|
|
|
|
child:Column( |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Text( |
|
|
|
|
S.of(context).heji, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
color: Colors.black, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
"¥0.0", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
)), |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
child: RoundButton( |
|
|
|
|
width: 103.w, |
|
|
|
|
height: 54.h, |
|
|
|
|
text: S.current.jiesuan, |
|
|
|
|
textColor: Colors.white, |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
backgroup: Color(0xFF32A060), |
|
|
|
|
radius: 0, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 5.h), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
height: 54.h, |
|
|
|
|
color: Colors.white, |
|
|
|
|
child: Row( |
|
|
|
|
children: [ |
|
|
|
|
Spacer(), |
|
|
|
|
Padding(padding: EdgeInsets.only(top: 7,right: 16), |
|
|
|
|
child:Column( |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Text( |
|
|
|
|
S.of(context).heji, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
color: Colors.black, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
S.of(context).jifen_(widget.arguments["price"]), |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
)), |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
if (!storeIsSelected) return; |
|
|
|
|
creditOrder(); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
padding: EdgeInsets.only(top: 16, bottom: 16), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
color: MaterialStateColor.resolveWith((states) => |
|
|
|
|
storeIsSelected ? Color(0xFF32A060) : Color(0xFFD8D8D8)), |
|
|
|
|
borderRadius: BorderRadius.only( |
|
|
|
|
topLeft: Radius.circular(4), |
|
|
|
|
topRight: Radius.circular(4))), |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
child: Text( |
|
|
|
|
S.of(context).querenduihuan, |
|
|
|
|
style: TextStyle( |
|
|
|
|
child: RoundButton( |
|
|
|
|
width: 103.w, |
|
|
|
|
height: 54.h, |
|
|
|
|
text: S.current.duihuan, |
|
|
|
|
textColor: Colors.white, |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
backgroup: Color(0xFF32A060), |
|
|
|
|
radius: 0, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
color: MaterialStateColor.resolveWith((states) => |
|
|
|
|
storeIsSelected ? Colors.white : Color(0xFFA0A0A0)), |
|
|
|
|
fontWeight: FontWeight.bold), |
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 5.h), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|