社区介绍模块

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

@ -37,6 +37,8 @@ class SAASAPI {
static _Pay pay = _Pay(); static _Pay pay = _Pay();
static _LifePay lifePay = _LifePay(); static _LifePay lifePay = _LifePay();
static _Balance balance = _Balance(); static _Balance balance = _Balance();
static _CommunityIntroduce communityIntroduce = _CommunityIntroduce();
static _ConveniencePhone conveniencePhone = _ConveniencePhone();
/// ///
static _ProfileApi profile = _ProfileApi(); static _ProfileApi profile = _ProfileApi();
@ -340,3 +342,13 @@ class _Balance {
///app ///app
String get tradeRecordList => '/app/user/tradeRecord/tradeRecordList'; 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() @JsonSerializable()
class CommunityIontroduceModel extends Equatable { class CommunityIontroduceModel extends Equatable {
final int id;
final String name; final String name;
final String content; final String content;
final String createDate;
final List<ImgModel>? imgList; 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) => factory CommunityIontroduceModel.fromJson(Map<String, dynamic> json) =>
_$CommunityIontroduceModelFromJson(json); _$CommunityIontroduceModelFromJson(json);
factory CommunityIontroduceModel.init() => factory CommunityIontroduceModel.init() =>
CommunityIontroduceModel(id: -1, name: '', content: '', createDate: ''); CommunityIontroduceModel(name: '', content: '', imgList: []);
@override @override
List<Object?> get props { List<Object?> get props {
return [ return [
id,
name, name,
content, content,
createDate,
imgList, imgList,
]; ];
} }
const CommunityIontroduceModel({
required this.name,
required this.content,
this.imgList,
});
} }

@ -9,10 +9,8 @@ part of 'community_introduce_model.dart';
CommunityIontroduceModel _$CommunityIontroduceModelFromJson( CommunityIontroduceModel _$CommunityIontroduceModelFromJson(
Map<String, dynamic> json) => Map<String, dynamic> json) =>
CommunityIontroduceModel( CommunityIontroduceModel(
id: json['id'] as int,
name: json['name'] as String, name: json['name'] as String,
content: json['content'] as String, content: json['content'] as String,
createDate: json['createDate'] as String,
imgList: (json['imgList'] as List<dynamic>?) imgList: (json['imgList'] as List<dynamic>?)
?.map((e) => ImgModel.fromJson(e as Map<String, dynamic>)) ?.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(), .toList(),

@ -33,7 +33,7 @@ class _CommunityIntroducePageState extends State<CommunityIntroducePage> {
header: MaterialHeader(), header: MaterialHeader(),
onRefresh: () async { onRefresh: () async {
BaseModel baseModel = BaseModel baseModel =
await NetUtil().get(API.manager.communityIntroduceInfo); await NetUtil().get(SAASAPI.communityIntroduce.info);
if (baseModel.success && baseModel.data != null) { if (baseModel.success && baseModel.data != null) {
_model = CommunityIontroduceModel.fromJson(baseModel.data); _model = CommunityIontroduceModel.fromJson(baseModel.data);
} }

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

@ -170,8 +170,8 @@ class ApplicationUtil {
title: '社区介绍', title: '社区介绍',
imgPath: Assets.newIcon.icSqjs.path, imgPath: Assets.newIcon.icSqjs.path,
onTap: () { onTap: () {
BotToast.showText(text: '此功能升级中,敬请期待'); // BotToast.showText(text: '此功能升级中,敬请期待');
return; // return;
Get.to(() => CommunityIntroducePage()); Get.to(() => CommunityIntroducePage());
}), }),
// AppElement('家政服务', R.ASSETS_ICONS_FUNC_JZFW_PNG, () => HouseKeepingPage()), // AppElement('家政服务', R.ASSETS_ICONS_FUNC_JZFW_PNG, () => HouseKeepingPage()),

Loading…
Cancel
Save