|
|
@ -728,97 +728,97 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> { |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
Container( |
|
|
|
// Container( |
|
|
|
margin: EdgeInsets.only(left: 16, right: 16, bottom: 8), |
|
|
|
// margin: EdgeInsets.only(left: 16, right: 16, bottom: 8), |
|
|
|
padding: EdgeInsets.all(20), |
|
|
|
// padding: EdgeInsets.all(20), |
|
|
|
decoration: BoxDecoration( |
|
|
|
// decoration: BoxDecoration( |
|
|
|
color: Colors.white, |
|
|
|
// color: Colors.white, |
|
|
|
boxShadow: [ |
|
|
|
// boxShadow: [ |
|
|
|
BoxShadow( |
|
|
|
// BoxShadow( |
|
|
|
color: Colors.black.withAlpha(12), |
|
|
|
// color: Colors.black.withAlpha(12), |
|
|
|
offset: Offset(0, 3), |
|
|
|
// offset: Offset(0, 3), |
|
|
|
blurRadius: 14, |
|
|
|
// blurRadius: 14, |
|
|
|
spreadRadius: 0, |
|
|
|
// spreadRadius: 0, |
|
|
|
) |
|
|
|
// ) |
|
|
|
], |
|
|
|
// ], |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(8)), |
|
|
|
// borderRadius: BorderRadius.all(Radius.circular(8)), |
|
|
|
), |
|
|
|
// ), |
|
|
|
child: Column( |
|
|
|
// child: Column( |
|
|
|
children: [ |
|
|
|
// children: [ |
|
|
|
Row( |
|
|
|
// Row( |
|
|
|
children: [ |
|
|
|
// children: [ |
|
|
|
Expanded( |
|
|
|
// Expanded( |
|
|
|
child: Text( |
|
|
|
// child: Text( |
|
|
|
"兑换数量", |
|
|
|
// "兑换数量", |
|
|
|
style: TextStyle( |
|
|
|
// style: TextStyle( |
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
// fontWeight: MyFontWeight.regular, |
|
|
|
fontSize: 14.sp, |
|
|
|
// fontSize: 14.sp, |
|
|
|
color: Color(0xFF353535)), |
|
|
|
// color: Color(0xFF353535)), |
|
|
|
)), |
|
|
|
// )), |
|
|
|
InkWell( |
|
|
|
// InkWell( |
|
|
|
onTap: () { |
|
|
|
// onTap: () { |
|
|
|
setState(() { |
|
|
|
// setState(() { |
|
|
|
if (buyNum > 1) buyNum -= 1; |
|
|
|
// if (buyNum > 1) buyNum -= 1; |
|
|
|
}); |
|
|
|
// }); |
|
|
|
}, |
|
|
|
// }, |
|
|
|
child: Image.asset( |
|
|
|
// child: Image.asset( |
|
|
|
"assets/image/reduce.webp", |
|
|
|
// "assets/image/reduce.webp", |
|
|
|
width: 22, |
|
|
|
// width: 22, |
|
|
|
height: 22, |
|
|
|
// height: 22, |
|
|
|
), |
|
|
|
// ), |
|
|
|
), |
|
|
|
// ), |
|
|
|
Container( |
|
|
|
// Container( |
|
|
|
width: 30, |
|
|
|
// width: 30, |
|
|
|
alignment: Alignment.center, |
|
|
|
// alignment: Alignment.center, |
|
|
|
child: Text( |
|
|
|
// child: Text( |
|
|
|
buyNum.toString(), |
|
|
|
// buyNum.toString(), |
|
|
|
style: TextStyle( |
|
|
|
// style: TextStyle( |
|
|
|
color: Colors.black, |
|
|
|
// color: Colors.black, |
|
|
|
fontSize: 14.sp, |
|
|
|
// fontSize: 14.sp, |
|
|
|
fontWeight: MyFontWeight.medium, |
|
|
|
// fontWeight: MyFontWeight.medium, |
|
|
|
), |
|
|
|
// ), |
|
|
|
), |
|
|
|
// ), |
|
|
|
), |
|
|
|
// ), |
|
|
|
InkWell( |
|
|
|
// InkWell( |
|
|
|
onTap: () { |
|
|
|
// onTap: () { |
|
|
|
setState(() { |
|
|
|
// setState(() { |
|
|
|
if (widget.arguments["payType"] == 1 |
|
|
|
// if (widget.arguments["payType"] == 1 |
|
|
|
? (double.parse(widget |
|
|
|
// ? (double.parse(widget |
|
|
|
.arguments["oneBean"]) * |
|
|
|
// .arguments["oneBean"]) * |
|
|
|
(buyNum + 1)) > |
|
|
|
// (buyNum + 1)) > |
|
|
|
double.parse(happyBean) |
|
|
|
// double.parse(happyBean) |
|
|
|
: (widget.arguments["payType"] == 2 |
|
|
|
// : (widget.arguments["payType"] == 2 |
|
|
|
? (double.parse(widget.arguments[ |
|
|
|
// ? (double.parse(widget.arguments[ |
|
|
|
"onePrice"]) * |
|
|
|
// "onePrice"]) * |
|
|
|
(buyNum + 1)) > |
|
|
|
// (buyNum + 1)) > |
|
|
|
double.parse(points) |
|
|
|
// double.parse(points) |
|
|
|
: (widget.arguments["price"] == |
|
|
|
// : (widget.arguments["price"] == |
|
|
|
null || |
|
|
|
// null || |
|
|
|
widget.arguments["price"] == |
|
|
|
// widget.arguments["price"] == |
|
|
|
"0" |
|
|
|
// "0" |
|
|
|
? false |
|
|
|
// ? false |
|
|
|
: (double.parse(widget |
|
|
|
// : (double.parse(widget |
|
|
|
.arguments["price"]) * |
|
|
|
// .arguments["price"]) * |
|
|
|
(buyNum + 1)) > |
|
|
|
// (buyNum + 1)) > |
|
|
|
double.parse(points)))) { |
|
|
|
// double.parse(points)))) { |
|
|
|
SmartDialog.showToast("您的积分不足", |
|
|
|
// SmartDialog.showToast("您的积分不足", |
|
|
|
alignment: Alignment.center); |
|
|
|
// alignment: Alignment.center); |
|
|
|
return; |
|
|
|
// return; |
|
|
|
} |
|
|
|
// } |
|
|
|
buyNum += 1; |
|
|
|
// buyNum += 1; |
|
|
|
}); |
|
|
|
// }); |
|
|
|
}, |
|
|
|
// }, |
|
|
|
child: Image.asset( |
|
|
|
// child: Image.asset( |
|
|
|
"assets/image/add.webp", |
|
|
|
// "assets/image/add.webp", |
|
|
|
width: 22, |
|
|
|
// width: 22, |
|
|
|
height: 22, |
|
|
|
// height: 22, |
|
|
|
), |
|
|
|
// ), |
|
|
|
), |
|
|
|
// ), |
|
|
|
], |
|
|
|
// ], |
|
|
|
), |
|
|
|
// ), |
|
|
|
], |
|
|
|
// ], |
|
|
|
), |
|
|
|
// ), |
|
|
|
), |
|
|
|
// ), |
|
|
|
if (widget.arguments["payType"] == 4 || |
|
|
|
if (widget.arguments["payType"] == 4 || |
|
|
|
(widget.arguments["payType"] == 3 && |
|
|
|
(widget.arguments["payType"] == 3 && |
|
|
|
widget.arguments["money"] != "0.00")) |
|
|
|
widget.arguments["money"] != "0.00")) |
|
|
@ -1170,7 +1170,7 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> { |
|
|
|
"payType": (widget.arguments["payType"] == 1) |
|
|
|
"payType": (widget.arguments["payType"] == 1) |
|
|
|
? 2 |
|
|
|
? 2 |
|
|
|
: ((widget.arguments["payType"] == 2) ? 1 : 3), |
|
|
|
: ((widget.arguments["payType"] == 2) ? 1 : 3), |
|
|
|
"number": buyNum, |
|
|
|
"number": 1, |
|
|
|
"useTyped": widget.arguments["useTyped"], |
|
|
|
"useTyped": widget.arguments["useTyped"], |
|
|
|
"payChannel": |
|
|
|
"payChannel": |
|
|
|
handleNeedPay().contains("元") ? (checkIndex == 3 ? "1" : "4") : "0", |
|
|
|
handleNeedPay().contains("元") ? (checkIndex == 3 ? "1" : "4") : "0", |
|
|
|