diff --git a/lib/constants/saas_api.dart b/lib/constants/saas_api.dart index bbdd5708..e3110241 100644 --- a/lib/constants/saas_api.dart +++ b/lib/constants/saas_api.dart @@ -37,6 +37,8 @@ class SAASAPI { static _Pay pay = _Pay(); static _LifePay lifePay = _LifePay(); static _Balance balance = _Balance(); + static _CommunityIntroduce communityIntroduce = _CommunityIntroduce(); + static _ConveniencePhone conveniencePhone = _ConveniencePhone(); ///二级分类 static _ProfileApi profile = _ProfileApi(); @@ -340,3 +342,13 @@ class _Balance { ///app用户交易记录 String get tradeRecordList => '/app/user/tradeRecord/tradeRecordList'; } + +class _CommunityIntroduce { + ///社区介绍 + String get info => '/app/user/communityIntroduction/introductionInfo'; +} + +class _ConveniencePhone { + ///查询app便民电话 + String get list => '/app/user/conveniencePhone/list'; +} diff --git a/lib/models/community_introduce/community_introduce_model.dart b/lib/models/community_introduce/community_introduce_model.dart index d7cbc9bd..98f8f983 100644 --- a/lib/models/community_introduce/community_introduce_model.dart +++ b/lib/models/community_introduce/community_introduce_model.dart @@ -7,34 +7,28 @@ part 'community_introduce_model.g.dart'; @JsonSerializable() class CommunityIontroduceModel extends Equatable { - final int id; final String name; final String content; - final String createDate; final List? imgList; - CommunityIontroduceModel({ - required this.id, - required this.name, - required this.content, - required this.createDate, - this.imgList, - }); - factory CommunityIontroduceModel.fromJson(Map json) => _$CommunityIontroduceModelFromJson(json); factory CommunityIontroduceModel.init() => - CommunityIontroduceModel(id: -1, name: '', content: '', createDate: ''); + CommunityIontroduceModel(name: '', content: '', imgList: []); @override List get props { return [ - id, name, content, - createDate, imgList, ]; } + + const CommunityIontroduceModel({ + required this.name, + required this.content, + this.imgList, + }); } diff --git a/lib/models/community_introduce/community_introduce_model.g.dart b/lib/models/community_introduce/community_introduce_model.g.dart index 4b874e03..cb4e3805 100644 --- a/lib/models/community_introduce/community_introduce_model.g.dart +++ b/lib/models/community_introduce/community_introduce_model.g.dart @@ -9,10 +9,8 @@ part of 'community_introduce_model.dart'; CommunityIontroduceModel _$CommunityIontroduceModelFromJson( Map json) => CommunityIontroduceModel( - id: json['id'] as int, name: json['name'] as String, content: json['content'] as String, - createDate: json['createDate'] as String, imgList: (json['imgList'] as List?) ?.map((e) => ImgModel.fromJson(e as Map)) .toList(), diff --git a/lib/pages/community_introduce/community_introduce_page.dart b/lib/pages/community_introduce/community_introduce_page.dart index 05e95dbf..9e5a00d3 100644 --- a/lib/pages/community_introduce/community_introduce_page.dart +++ b/lib/pages/community_introduce/community_introduce_page.dart @@ -33,7 +33,7 @@ class _CommunityIntroducePageState extends State { header: MaterialHeader(), onRefresh: () async { BaseModel baseModel = - await NetUtil().get(API.manager.communityIntroduceInfo); + await NetUtil().get(SAASAPI.communityIntroduce.info); if (baseModel.success && baseModel.data != null) { _model = CommunityIontroduceModel.fromJson(baseModel.data); } diff --git a/lib/ui/function_and_service/task/publish_task_page.dart b/lib/ui/function_and_service/task/publish_task_page.dart index 90d959fc..ae2e9a86 100644 --- a/lib/ui/function_and_service/task/publish_task_page.dart +++ b/lib/ui/function_and_service/task/publish_task_page.dart @@ -130,7 +130,6 @@ class _PublishTaskPageState extends State { BotToast.showText(text: base.msg); } } catch (e) { - print(22222); print(e.toString()); } } diff --git a/lib/utils/application_utils.dart b/lib/utils/application_utils.dart index 92dd6e52..df6f6d29 100644 --- a/lib/utils/application_utils.dart +++ b/lib/utils/application_utils.dart @@ -170,8 +170,8 @@ class ApplicationUtil { title: '社区介绍', imgPath: Assets.newIcon.icSqjs.path, onTap: () { - BotToast.showText(text: '此功能升级中,敬请期待'); - return; + // BotToast.showText(text: '此功能升级中,敬请期待'); + // return; Get.to(() => CommunityIntroducePage()); }), // AppElement('家政服务', R.ASSETS_ICONS_FUNC_JZFW_PNG, () => HouseKeepingPage()),