Browse Source

门店列表ip异常定位处理;

dart3
wurong 5 months ago
parent
commit
fdc7fd0a80
  1. 4
      lib/data/address.dart
  2. 1
      lib/union/union_page.dart
  3. 2
      lib/utils/location.dart

4
lib/data/address.dart

@ -13,8 +13,8 @@ class Address {
String? cityInfo;
String? id;
bool? isDefault;
String? latitude;
String? longitude;
dynamic latitude;
dynamic longitude;
String? mid;
String? phone;
String? province;

1
lib/union/union_page.dart

@ -134,6 +134,7 @@ class UnionPageState extends State<UnionPage>
if (address != null) {
await saveLatLng(
latLng!, address.province, address.city, address.area);
areaName = address.city?.replaceAll("", "");
}
LocationInstance.getInstance().stopLocation();
} else {

2
lib/utils/location.dart

@ -311,7 +311,7 @@ class LocationInstance {
Future<Address?>? getAddress(double lat, double lang) async {
var result = await ApiService(Dio()).geocodeRegeo("$lat", "$lang");
print("address_result: $result");
if (result["status"] == 1 &&
if (result["status"] == "1" &&
result["regeocode"] != null &&
result["regeocode"]["addressComponent"] != null) {
Address address = Address.fromJson({

Loading…
Cancel
Save