社区介绍模块

pull/1/head
张萌 3 years ago
parent d9d3eaf202
commit 6195daa49c

@ -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';
}

@ -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<ImgModel>? imgList;
CommunityIontroduceModel({
required this.id,
required this.name,
required this.content,
required this.createDate,
this.imgList,
});
factory CommunityIontroduceModel.fromJson(Map<String, dynamic> json) =>
_$CommunityIontroduceModelFromJson(json);
factory CommunityIontroduceModel.init() =>
CommunityIontroduceModel(id: -1, name: '', content: '', createDate: '');
CommunityIontroduceModel(name: '', content: '', imgList: []);
@override
List<Object?> get props {
return [
id,
name,
content,
createDate,
imgList,
];
}
const CommunityIontroduceModel({
required this.name,
required this.content,
this.imgList,
});
}

@ -9,10 +9,8 @@ part of 'community_introduce_model.dart';
CommunityIontroduceModel _$CommunityIontroduceModelFromJson(
Map<String, dynamic> 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<dynamic>?)
?.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),

@ -33,7 +33,7 @@ class _CommunityIntroducePageState extends State<CommunityIntroducePage> {
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);
}

@ -130,7 +130,6 @@ class _PublishTaskPageState extends State<PublishTaskPage> {
BotToast.showText(text: base.msg);
}
} catch (e) {
print(22222);
print(e.toString());
}
}

@ -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()),

Loading…
Cancel
Save