Browse Source

积分兑换:兑换数量去掉;

首页部分更改,新增判断没数据不显示该板块
new_revision_app
wurong 2 years ago
parent
commit
fd35f3efa6
  1. 3
      lib/home/home_page.dart
  2. 184
      lib/order/exchange_order_page.dart

3
lib/home/home_page.dart

@ -537,9 +537,11 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
// }),
///
if(coupons != null && coupons.length != 0)
DiscountZone(coupons),
///-
if(homeRank != null && homeRank.commodityZone.length != 0)
HomeRecommendGoods(homeRank),
///
@ -550,6 +552,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
WelfareCore(),
///
if(homeRank != null && homeRank.commodityList.length != 0)
TopSellingList(homeRank),
// ///

184
lib/order/exchange_order_page.dart

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

Loading…
Cancel
Save