parent
bf6fcbc4c1
commit
6aaf03a993
@ -0,0 +1,21 @@
|
|||||||
|
class SystemMessageDetailModel {
|
||||||
|
int id;
|
||||||
|
String title;
|
||||||
|
String content;
|
||||||
|
|
||||||
|
SystemMessageDetailModel({this.id, this.title, this.content});
|
||||||
|
|
||||||
|
SystemMessageDetailModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
id = json['id'];
|
||||||
|
title = json['title'];
|
||||||
|
content = json['content'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['id'] = this.id;
|
||||||
|
data['title'] = this.title;
|
||||||
|
data['content'] = this.content;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
@ -1,11 +1,14 @@
|
|||||||
import 'package:akuCommunity/constants/api.dart';
|
import 'package:akuCommunity/constants/api.dart';
|
||||||
import 'package:akuCommunity/model/message/message_center_model.dart';
|
import 'package:akuCommunity/model/message/system_message_detail_model.dart';
|
||||||
import 'package:akuCommunity/service/net.dart';
|
import 'package:akuCommunity/utils/network/base_model.dart';
|
||||||
import 'package:dio/dio.dart';
|
import 'package:akuCommunity/utils/network/net_util.dart';
|
||||||
|
|
||||||
class MessageFunc {
|
class MessageFunc {
|
||||||
// static Future<MessageCenterModel> messageCenter() async {
|
static Future<SystemMessageDetailModel> getSystemMessageDetial(int id) async {
|
||||||
// Response response = await Net().dio.get(API.message.center);
|
BaseModel baseModel =
|
||||||
// return MessageCenterModel.fromJson(response.data);
|
await NetUtil().get(API.message.getSystemMessageDetial, params: {
|
||||||
// }
|
'sysMessageId': id,
|
||||||
|
});
|
||||||
|
return SystemMessageDetailModel.fromJson(baseModel.data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in new issue