Commit ed07ea9f authored by 何碧荣's avatar 何碧荣

解决冲突

parents 622ff2c4 101de53c
......@@ -50,10 +50,14 @@ class FocusListItem extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
width:double.infinity,
height: 42.0,
decoration: BoxDecoration(color: ALColors.ColorFFFFFF),
margin: EdgeInsets.only(left: ScreenUtil.instance.setWidth(10.0)),
padding: EdgeInsets.only(top: ScreenUtil.instance.setHeight(10.0)),
child: myText('${item.username??""} 关注了你', ALColors.Color666666, 13.0),
),
],
),
);
......@@ -77,3 +81,4 @@ class FocusListItem extends StatelessWidget {
));
}
}
......@@ -100,6 +100,7 @@ class LikeListItem extends StatelessWidget {
Widget listItemInfo() {
var commentInfo;
var commenTime;
var replyContent;
var textTop;
if (item.type != 2) {
if (item.likeContent.type == 0) {
......@@ -108,6 +109,9 @@ class LikeListItem extends StatelessWidget {
commentInfo = '赞了你的评论';
}
commenTime = MessageDate(item.time).diffTime();
if (item.type == 1) {
replyContent = item.likeContent.replyContent;
}
}
if (item.content != null) {
textTop = 11.0;
......@@ -147,6 +151,14 @@ class LikeListItem extends StatelessWidget {
ALColors.Color666666,
13.0),
),
item.type == 1
? Padding(
padding: EdgeInsets.only(
left: ScreenUtil.instance.setWidth(10.0),
top: ScreenUtil.instance.setHeight(3.0)),
child: myText(
'${replyContent ?? ""}', ALColors.Color999999, 10.0))
: Container(),
Padding(
padding: EdgeInsets.only(
left: ScreenUtil.instance.setWidth(10.0),
......
......@@ -2,17 +2,14 @@ class LikePageEntity {
int error;
String message;
Null extra;
bool noData;
List<Data> data;
LikePageEntity(
{this.error, this.message, this.extra, this.noData, this.data});
LikePageEntity({this.error, this.message, this.extra, this.data});
LikePageEntity.fromJson(Map<String, dynamic> json) {
error = json['error'];
message = json['message'];
extra = json['extra'];
noData = json['noData'];
if (json['data'] != null) {
data = new List<Data>();
json['data'].forEach((v) {
......@@ -26,7 +23,6 @@ class LikePageEntity {
data['error'] = this.error;
data['message'] = this.message;
data['extra'] = this.extra;
data['noData'] = this.noData;
if (this.data != null) {
data['data'] = this.data.map((v) => v.toJson()).toList();
}
......@@ -35,54 +31,54 @@ class LikePageEntity {
}
class Data {
int type;
int id;
String content;
int userId;
String icon;
bool unread;
String name;
String icon;
double time;
int type;
LikeContent likeContent;
int id;
String content;
bool unread;
Data(
{this.type,
this.id,
this.content,
this.userId,
this.icon,
this.unread,
{this.userId,
this.name,
this.icon,
this.time,
this.likeContent});
this.type,
this.likeContent,
this.id,
this.content,
this.unread});
Data.fromJson(Map<String, dynamic> json) {
type = json['type'];
id = json['id'];
content = json['content'];
userId = json['user_id'];
icon = json['icon'];
unread = json['unread'];
name = json['name'];
icon = json['icon'];
time = json['time'];
type = json['type'];
likeContent = json['like_content'] != null
? new LikeContent.fromJson(json['like_content'])
: null;
id = json['id'];
content = json['content'];
unread = json['unread'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['type'] = this.type;
data['id'] = this.id;
data['content'] = this.content;
data['user_id'] = this.userId;
data['icon'] = this.icon;
data['unread'] = this.unread;
data['name'] = this.name;
data['icon'] = this.icon;
data['time'] = this.time;
data['type'] = this.type;
if (this.likeContent != null) {
data['like_content'] = this.likeContent.toJson();
}
data['id'] = this.id;
data['content'] = this.content;
data['unread'] = this.unread;
return data;
}
}
......@@ -92,14 +88,17 @@ class LikeContent {
int id;
int contentType;
String content;
String replyContent;
LikeContent({this.type, this.id, this.contentType, this.content});
LikeContent(
{this.type, this.id, this.contentType, this.content, this.replyContent});
LikeContent.fromJson(Map<String, dynamic> json) {
type = json['type'];
id = json['id'];
contentType = json['content_type'];
content = json['content'];
replyContent = json['reply_content'];
}
Map<String, dynamic> toJson() {
......@@ -108,6 +107,7 @@ class LikeContent {
data['id'] = this.id;
data['content_type'] = this.contentType;
data['content'] = this.content;
data['reply_content'] = this.replyContent;
return data;
}
}
\ No newline at end of file
......@@ -30,6 +30,7 @@ class _LayoutTestState extends State<LayoutTest> {
Widget _renderBoxTest(){
return Container(
color: Colors.greenAccent,
width:double.infinity,
constraints: BoxConstraints(
maxWidth: double.infinity,
minWidth: 200.0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment