|
|
@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; |
|
|
|
import 'package:huixiang/generated/l10n.dart'; |
|
|
|
import 'package:huixiang/generated/l10n.dart'; |
|
|
|
import 'package:huixiang/retrofit/data/user_info.dart'; |
|
|
|
import 'package:huixiang/retrofit/data/user_info.dart'; |
|
|
|
import 'package:huixiang/utils/font_weight.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:huixiang/view_widget/custom_image.dart'; |
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
import 'package:huixiang/view_widget/login_tips_dialog.dart'; |
|
|
|
import 'package:huixiang/view_widget/login_tips_dialog.dart'; |
|
|
@ -93,6 +94,11 @@ class _MineView extends State<MineView> { |
|
|
|
} else if (await Permission.camera.isGranted) { |
|
|
|
} else if (await Permission.camera.isGranted) { |
|
|
|
// http://pos.app.gznl.top/placeorder/?tableId=1315903669597634560&tenantCode=1166&shopId=1300372027722432512 |
|
|
|
// http://pos.app.gznl.top/placeorder/?tableId=1315903669597634560&tenantCode=1166&shopId=1300372027722432512 |
|
|
|
var result = await Navigator.of(context).pushNamed('/router/qr_scan'); |
|
|
|
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(); |
|
|
|
// String result = await scanner.scan(); |
|
|
|
Uri uri = Uri.parse(result); |
|
|
|
Uri uri = Uri.parse(result); |
|
|
|
String tableId = uri.queryParameters["tableId"]; |
|
|
|
String tableId = uri.queryParameters["tableId"]; |
|
|
@ -119,6 +125,16 @@ class _MineView extends State<MineView> { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
activityShowAlertDialog(String result) { |
|
|
|
|
|
|
|
//显示对话框 |
|
|
|
|
|
|
|
showDialog( |
|
|
|
|
|
|
|
context: context, |
|
|
|
|
|
|
|
builder: (BuildContext context) { |
|
|
|
|
|
|
|
return ActivityCoupons(result); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
///我的信息部分 |
|
|
|
///我的信息部分 |
|
|
|
Widget mineView() { |
|
|
|
Widget mineView() { |
|
|
|
return Container( |
|
|
|
return Container( |
|
|
|