Browse Source

Merge remote-tracking branch 'origin/remove_uniapp' into remove_uniapp

ff_new
fmk 3 years ago
parent
commit
93eaaae2d5
  1. 16
      lib/mine/mine_view/mine_view.dart

16
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/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(

Loading…
Cancel
Save