diff --git a/lib/mine/mine_view/mine_view.dart b/lib/mine/mine_view/mine_view.dart index 9650f6d0..c05c043e 100644 --- a/lib/mine/mine_view/mine_view.dart +++ b/lib/mine/mine_view/mine_view.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/retrofit/data/user_info.dart'; import 'package:huixiang/utils/font_weight.dart'; +import 'package:huixiang/view_widget/activity_coupons.dart'; import 'package:huixiang/view_widget/custom_image.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:huixiang/view_widget/login_tips_dialog.dart'; @@ -93,6 +94,11 @@ class _MineView extends State { } else if (await Permission.camera.isGranted) { // http://pos.app.gznl.top/placeorder/?tableId=1315903669597634560&tenantCode=1166&shopId=1300372027722432512 var result = await Navigator.of(context).pushNamed('/router/qr_scan'); + if(result.toString().contains("type\":\"coupon")){ + ///活动优惠券赠送弹窗 + activityShowAlertDialog(result.toString()); + return; + } // String result = await scanner.scan(); Uri uri = Uri.parse(result); String tableId = uri.queryParameters["tableId"]; @@ -119,6 +125,16 @@ class _MineView extends State { } } + activityShowAlertDialog(String result) { + //显示对话框 + showDialog( + context: context, + builder: (BuildContext context) { + return ActivityCoupons(result); + }, + ); + } + ///我的信息部分 Widget mineView() { return Container(