Showing
5 changed files
with
43 additions
and
16 deletions
| @@ -548,7 +548,7 @@ | @@ -548,7 +548,7 @@ | ||
| 548 | CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements; | 548 | CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements; |
| 549 | CODE_SIGN_IDENTITY = "Apple Development"; | 549 | CODE_SIGN_IDENTITY = "Apple Development"; |
| 550 | CODE_SIGN_STYLE = Automatic; | 550 | CODE_SIGN_STYLE = Automatic; |
| 551 | - CURRENT_PROJECT_VERSION = 5239; | 551 | + CURRENT_PROJECT_VERSION = 52394; |
| 552 | DEVELOPMENT_TEAM = 8J59HM8B82; | 552 | DEVELOPMENT_TEAM = 8J59HM8B82; |
| 553 | ENABLE_BITCODE = NO; | 553 | ENABLE_BITCODE = NO; |
| 554 | FLUTTER_BUILD_MODE = release; | 554 | FLUTTER_BUILD_MODE = release; |
| @@ -696,7 +696,7 @@ | @@ -696,7 +696,7 @@ | ||
| 696 | CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements"; | 696 | CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements"; |
| 697 | CODE_SIGN_IDENTITY = "Apple Development"; | 697 | CODE_SIGN_IDENTITY = "Apple Development"; |
| 698 | CODE_SIGN_STYLE = Automatic; | 698 | CODE_SIGN_STYLE = Automatic; |
| 699 | - CURRENT_PROJECT_VERSION = 5239; | 699 | + CURRENT_PROJECT_VERSION = 52394; |
| 700 | DEVELOPMENT_TEAM = 8J59HM8B82; | 700 | DEVELOPMENT_TEAM = 8J59HM8B82; |
| 701 | ENABLE_BITCODE = NO; | 701 | ENABLE_BITCODE = NO; |
| 702 | FLUTTER_BUILD_MODE = debug; | 702 | FLUTTER_BUILD_MODE = debug; |
| @@ -732,7 +732,7 @@ | @@ -732,7 +732,7 @@ | ||
| 732 | CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; | 732 | CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; |
| 733 | CODE_SIGN_IDENTITY = "Apple Development"; | 733 | CODE_SIGN_IDENTITY = "Apple Development"; |
| 734 | CODE_SIGN_STYLE = Automatic; | 734 | CODE_SIGN_STYLE = Automatic; |
| 735 | - CURRENT_PROJECT_VERSION = 5239; | 735 | + CURRENT_PROJECT_VERSION = 52394; |
| 736 | DEVELOPMENT_TEAM = 8J59HM8B82; | 736 | DEVELOPMENT_TEAM = 8J59HM8B82; |
| 737 | ENABLE_BITCODE = NO; | 737 | ENABLE_BITCODE = NO; |
| 738 | FLUTTER_BUILD_MODE = release; | 738 | FLUTTER_BUILD_MODE = release; |
| @@ -16,6 +16,10 @@ import 'package:permission_handler/permission_handler.dart'; | @@ -16,6 +16,10 @@ import 'package:permission_handler/permission_handler.dart'; | ||
| 16 | // import 'package:demo/widgets/network_state/page_loading.dart'; | 16 | // import 'package:demo/widgets/network_state/page_loading.dart'; |
| 17 | 17 | ||
| 18 | class MapChoicePointPage extends StatefulWidget { | 18 | class MapChoicePointPage extends StatefulWidget { |
| 19 | + final String long; | ||
| 20 | + final String lat; | ||
| 21 | + MapChoicePointPage({Key key, this.long, this.lat}) : super(key: key); | ||
| 22 | + | ||
| 19 | @override | 23 | @override |
| 20 | _MapChoicePointPageState createState() => _MapChoicePointPageState(); | 24 | _MapChoicePointPageState createState() => _MapChoicePointPageState(); |
| 21 | } | 25 | } |
| @@ -37,6 +41,13 @@ class _MapChoicePointPageState extends State<MapChoicePointPage> { | @@ -37,6 +41,13 @@ class _MapChoicePointPageState extends State<MapChoicePointPage> { | ||
| 37 | void initState() { | 41 | void initState() { |
| 38 | super.initState(); | 42 | super.initState(); |
| 39 | 43 | ||
| 44 | + if (widget.long != null && widget.long != '') { | ||
| 45 | + longitude = double.parse(widget.long); | ||
| 46 | + } | ||
| 47 | + if (widget.lat != null && widget.lat != '') { | ||
| 48 | + latitude = double.parse(widget.lat); | ||
| 49 | + } | ||
| 50 | + | ||
| 40 | WidgetsBinding.instance.addPostFrameCallback((_) async { | 51 | WidgetsBinding.instance.addPostFrameCallback((_) async { |
| 41 | _requestLocationPermission(); | 52 | _requestLocationPermission(); |
| 42 | }); | 53 | }); |
| @@ -96,14 +107,16 @@ class _MapChoicePointPageState extends State<MapChoicePointPage> { | @@ -96,14 +107,16 @@ class _MapChoicePointPageState extends State<MapChoicePointPage> { | ||
| 96 | // App.sp.setString("lng", "118.17630045"); | 107 | // App.sp.setString("lng", "118.17630045"); |
| 97 | 108 | ||
| 98 | } else { | 109 | } else { |
| 99 | - latitude = location.latLng.latitude; | ||
| 100 | - longitude = location.latLng.longitude; | ||
| 101 | - if (_controller != null) { | ||
| 102 | - _controller.setCenterCoordinate( | ||
| 103 | - LatLng(location.latLng.latitude, location.latLng.longitude)); | 110 | + if (widget.long == null || widget.long == '') { |
| 111 | + latitude = location.latLng.latitude; | ||
| 112 | + longitude = location.latLng.longitude; | ||
| 113 | + if (_controller != null) { | ||
| 114 | + _controller.setCenterCoordinate( | ||
| 115 | + LatLng(location.latLng.latitude, location.latLng.longitude)); | ||
| 116 | + } | ||
| 117 | + | ||
| 118 | + setState(() {}); | ||
| 104 | } | 119 | } |
| 105 | - | ||
| 106 | - setState(() {}); | ||
| 107 | } | 120 | } |
| 108 | }); | 121 | }); |
| 109 | } else { | 122 | } else { |
| @@ -1885,9 +1885,15 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { | @@ -1885,9 +1885,15 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> { | ||
| 1885 | onPressed: () { | 1885 | onPressed: () { |
| 1886 | Utils.getPickPermission( | 1886 | Utils.getPickPermission( |
| 1887 | context, () async { | 1887 | context, () async { |
| 1888 | + //有经纬度带过去 | ||
| 1889 | + | ||
| 1888 | Map temp = await NavigatorUtil | 1890 | Map temp = await NavigatorUtil |
| 1889 | .goMapChoicePointPage( | 1891 | .goMapChoicePointPage( |
| 1890 | - context); | 1892 | + context, |
| 1893 | + long: mapAddress[ | ||
| 1894 | + 'lng'].toString(), | ||
| 1895 | + lat: mapAddress[ | ||
| 1896 | + 'lat'].toString()); | ||
| 1891 | if (temp != null) { | 1897 | if (temp != null) { |
| 1892 | mapAddress = temp; | 1898 | mapAddress = temp; |
| 1893 | 1899 |
| @@ -355,9 +355,15 @@ class NavigatorUtil { | @@ -355,9 +355,15 @@ class NavigatorUtil { | ||
| 355 | } | 355 | } |
| 356 | 356 | ||
| 357 | /// 地图选择页 | 357 | /// 地图选择页 |
| 358 | - static Future<dynamic> goMapChoicePointPage(BuildContext context, | ||
| 359 | - {replace = false, String urlStr}) { | ||
| 360 | - return _navigateTo(context, "${Routes.map_choice_point}", replace: replace); | 358 | + static Future<dynamic> goMapChoicePointPage( |
| 359 | + BuildContext context, { | ||
| 360 | + replace = false, | ||
| 361 | + String long, | ||
| 362 | + String lat, | ||
| 363 | + }) { | ||
| 364 | + return _navigateTo( | ||
| 365 | + context, "${Routes.map_choice_point}?long=${long}&lat=${lat}", | ||
| 366 | + replace: replace); | ||
| 361 | } | 367 | } |
| 362 | 368 | ||
| 363 | /// 店铺名称 | 369 | /// 店铺名称 |
| @@ -773,8 +773,10 @@ var mapChoicePointPageHandler = new Handler( | @@ -773,8 +773,10 @@ var mapChoicePointPageHandler = new Handler( | ||
| 773 | handlerFunc: (BuildContext context, Map<String, List<Object>> params) { | 773 | handlerFunc: (BuildContext context, Map<String, List<Object>> params) { |
| 774 | // CouponSunModel couponSunModel = CouponSunModel.fromJson(json.decode( | 774 | // CouponSunModel couponSunModel = CouponSunModel.fromJson(json.decode( |
| 775 | // FluroConvertUtils.fluroCnParamsDecode(params["couponSunModel"].first))); | 775 | // FluroConvertUtils.fluroCnParamsDecode(params["couponSunModel"].first))); |
| 776 | - // String urlStr = FluroConvertUtils.fluroCnParamsDecode(params["urlStr"].first); | ||
| 777 | - return MapChoicePointPage(); | 776 | + |
| 777 | + String long = params['long'].first; | ||
| 778 | + String lat = params['lat'].first; | ||
| 779 | + return MapChoicePointPage(long: long, lat: lat); | ||
| 778 | }); | 780 | }); |
| 779 | 781 | ||
| 780 | ///店铺名称 | 782 | ///店铺名称 |
-
Please register or login to post a comment