master
戴余标 3 years ago
parent ee87661707
commit cea5643e0d

@ -95,6 +95,7 @@ class _SelectCommunityState extends State<SelectCommunity> {
onTap: () async { onTap: () async {
var cancel = BotToast.showLoading(); var cancel = BotToast.showLoading();
List<CommunityModel> _communities = []; List<CommunityModel> _communities = [];
try {
var base = await NetUtil().get(SAASAPI.login.allCommunity, params: { var base = await NetUtil().get(SAASAPI.login.allCommunity, params: {
'cityId': UserTool 'cityId': UserTool
.appProvider.pickedCityAndCommunity!.cityModel.district.id, .appProvider.pickedCityAndCommunity!.cityModel.district.id,
@ -104,6 +105,8 @@ class _SelectCommunityState extends State<SelectCommunity> {
.map((e) => CommunityModel.fromJson(e)) .map((e) => CommunityModel.fromJson(e))
.toList(); .toList();
} }
} catch (e) {}
cancel(); cancel();
var _community = await BeeCommunityPicker.pick(context, _communities); var _community = await BeeCommunityPicker.pick(context, _communities);
print(_community?.name); print(_community?.name);

@ -108,6 +108,7 @@ class _NewHomePageState extends State<NewHomePage> {
), ),
SafeArea( SafeArea(
child: EasyRefresh( child: EasyRefresh(
firstRefresh: true,
onRefresh: () async { onRefresh: () async {
await _getAnnounces(); await _getAnnounces();
await _getStatusNum(); await _getStatusNum();

@ -15,8 +15,11 @@ class CommunityModel extends Equatable {
final String address; final String address;
@HiveField(3) @HiveField(3)
final String addressDetails; final String addressDetails;
factory CommunityModel.fromJson(Map<String, dynamic> json) => factory CommunityModel.fromJson(Map<String, dynamic> json) {
_$CommunityModelFromJson(json); return _$CommunityModelFromJson(json);
}
const CommunityModel({ const CommunityModel({
required this.id, required this.id,

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save