|
|
|
@ -55,10 +55,13 @@ class UnionListState extends State<UnionList>
|
|
|
|
|
@override |
|
|
|
|
bool get wantKeepAlive => true; |
|
|
|
|
|
|
|
|
|
late String cityName; |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
void initState() { |
|
|
|
|
super.initState(); |
|
|
|
|
powerFlag = false; |
|
|
|
|
cityName = widget.city ?? "所有门店"; |
|
|
|
|
getLocation(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -128,6 +131,11 @@ class UnionListState extends State<UnionList>
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void refreshData(String areaName) { |
|
|
|
|
this.cityName = areaName; |
|
|
|
|
getLocation(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
queryStore() async { |
|
|
|
|
apiService ??= ApiService( |
|
|
|
|
Dio(), |
|
|
|
@ -135,7 +143,7 @@ class UnionListState extends State<UnionList>
|
|
|
|
|
token: SharedInstance.instance.token, |
|
|
|
|
); |
|
|
|
|
BaseListData<Store>? baseData = await apiService?.queryStore({ |
|
|
|
|
"city": widget.city ?? "所有门店", |
|
|
|
|
"city": cityName, |
|
|
|
|
"latitude": (widget.latLng?.latitude ?? "").toString(), |
|
|
|
|
"longitude": (widget.latLng?.longitude ?? "").toString(), |
|
|
|
|
if (widget.searchKey != "") "searchKey": widget.searchKey, |
|
|
|
@ -818,4 +826,5 @@ class UnionListState extends State<UnionList>
|
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|