From 1c8938b464cc4ecce96604c2bb5fa48ea3cc7bc9 Mon Sep 17 00:00:00 2001 From: PH2 <1293456824@qq.com> Date: Fri, 30 Apr 2021 11:01:33 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=95=86=E5=93=81=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9C=AA=E5=8A=A0=E8=BD=BD=E5=AE=8C=E6=AF=95?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E8=BF=9B=E8=A1=8C=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/widgets/goods_details/coupon/counpon_widget.dart | 4 ++++ .../footer/goods_details_footer_widget.dart | 10 ++++++++-- lib/widgets/goods_details/store/store_widget.dart | 2 ++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/widgets/goods_details/coupon/counpon_widget.dart b/lib/widgets/goods_details/coupon/counpon_widget.dart index e25ecc3..ef41388 100644 --- a/lib/widgets/goods_details/coupon/counpon_widget.dart +++ b/lib/widgets/goods_details/coupon/counpon_widget.dart @@ -58,6 +58,10 @@ class _CounponWidgetContainerState extends State { /// 点击领取 void _onJump(CounponModel model) async{ + if (EmptyUtil.isEmpty(model?.convertArgs)) { + Fluttertoast.showToast(msg: '商品信息正在加载中,请稍后再试~'); + return; + } TurnChainUtil.openReceiveCoupon(context, _user, model?.good_id, model.provider, model?.convertArgs?.toJson()); } diff --git a/lib/widgets/goods_details/footer/goods_details_footer_widget.dart b/lib/widgets/goods_details/footer/goods_details_footer_widget.dart index 8346a41..ea5bb6d 100644 --- a/lib/widgets/goods_details/footer/goods_details_footer_widget.dart +++ b/lib/widgets/goods_details/footer/goods_details_footer_widget.dart @@ -100,7 +100,10 @@ class _GoodsDetailsFooterContainerState extends State<_GoodsDetailsFooterContain /// 分享 void _shareOnClick(GoodsDetailsFooterModel model) async { - if (EmptyUtil.isEmpty(model?.share_value)) return; + if (EmptyUtil.isEmpty(model?.share_value)) { + Fluttertoast.showToast(msg: '商品信息正在加载中,请稍后再试~'); + return; + } Map result = await TurnChainUtil.getShareTurnChain(context, _user, model?.good_id, model.provider, model.convertArgs.toJson()); if (!EmptyUtil.isEmpty(result)) { model.shareUrlArgs.buyUrl = result['open_app_url']; @@ -110,7 +113,10 @@ class _GoodsDetailsFooterContainerState extends State<_GoodsDetailsFooterContain /// 自购省 void _saveMoneyOnClick(GoodsDetailsFooterModel model) async { - if (EmptyUtil.isEmpty(model?.self_buy_value)) return; + if (EmptyUtil.isEmpty(model?.self_buy_value)) { + Fluttertoast.showToast(msg: '商品信息正在加载中,请稍后再试~'); + return; + } await TurnChainUtil.openReceiveCoupon(context, _user, model?.good_id, model?.provider, model?.convertArgs?.toJson(), isFree: widget?.isFree); } diff --git a/lib/widgets/goods_details/store/store_widget.dart b/lib/widgets/goods_details/store/store_widget.dart index 236d72b..da392ce 100644 --- a/lib/widgets/goods_details/store/store_widget.dart +++ b/lib/widgets/goods_details/store/store_widget.dart @@ -56,6 +56,8 @@ class _StoreContainerState extends State { Logger.log("店铺:" + model.shop_url); if (!EmptyUtil.isEmpty(model.shop_url)) { RouterUtil.openWebview(model.shop_url, context); + } else { + Fluttertoast.showToast(msg: '商品信息正在加载中,请稍后再试~'); } }