Browse Source

vip页面优化,

优惠券如果是0就不显示;
dart3_last
wurong 2 years ago
parent
commit
8eb3784de3
  1. 8
      lib/vip/vip_view/vip_top.dart

8
lib/vip/vip_view/vip_top.dart

@ -20,9 +20,9 @@ import 'package:tobias/tobias.dart' as tobias;
class VipTop extends StatefulWidget {
final VipCardHome vipCardHome;
final Function onRefresh;
final Function queryVipHome;
VipTop(this.vipCardHome, this.onRefresh);
VipTop(this.vipCardHome, this.queryVipHome);
@override
State<StatefulWidget> createState() {
@ -42,7 +42,7 @@ class _VipTop extends State<VipTop> {
payListen = weChatResponseEventHandler.listen((event) async {
print("payCallback: ${event.errCode}");
if (event.errCode == 0) {
widget.onRefresh();
widget.queryVipHome();
SmartDialog.showToast("支付成功", alignment: Alignment.center);
} else {
SmartDialog.showToast("支付失败", alignment: Alignment.center);
@ -96,7 +96,7 @@ class _VipTop extends State<VipTop> {
tobias.aliPay(baseData.data["body"]).then((payRes) {
if (payRes['resultStatus'] == 9000 ||
payRes['resultStatus'] == '9000') {
widget.onRefresh();
widget.queryVipHome();
SmartDialog.showToast("支付成功",
alignment: Alignment.center);
} else {

Loading…
Cancel
Save