Commit 2fa3f27c authored by 何碧荣's avatar 何碧荣

like页埋点添加

parent 841b1bc5
......@@ -222,4 +222,14 @@ void onClickButton(buttonName, [params]) {
'button_name': buttonName,
...?params
});
}
void onClickLike(buttonName, [params]) {
RouterCenterImpl()
.findBuriedRouter()
?.onEvent('on_click_button', {
'page_name': 'like_list',
'button_name': buttonName,
...?params
});
}
\ No newline at end of file
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:gmalpha_flutter/NewMessageModel/page/common.dart';
import 'package:gmalpha_flutter/NewMessageModel/service/remote/entity/LikePageEntity.dart';
import 'package:gmalpha_flutter/NewMessageModel/util/message_date.dart';
import 'package:gmalpha_flutter/res/value/ALColors.dart';
......@@ -8,7 +9,7 @@ import 'package:gmalpha_flutter/res/value/ALColors.dart';
class LikeListItem extends StatelessWidget {
final Data item;
LikeListItem(this.item);
Text myText(
String text,
Color color,
......@@ -30,16 +31,29 @@ class LikeListItem extends StatelessWidget {
}
Widget listItemHead() {
var businessId;
if(item.likeContent != null){
businessId = item.likeContent.id.toString() ;
}
else{
businessId = item.userId.toString();
}
return ClipOval(
child: Container(
color: ALColors.ColorE4E4E4,
child: CachedNetworkImage(
width: 42.0,
height: 42.0,
imageUrl: item.icon,
fit: BoxFit.cover,
),
)
child: GestureDetector(
onTap: () {
onClickLike('head_photo',{'business_id':businessId,'tab_name':''});
},
child: Container(
color: ALColors.ColorE4E4E4,
child: CachedNetworkImage(
width: 42.0,
height: 42.0,
imageUrl: item.icon,
fit: BoxFit.cover,
),
)
)
);
}
......@@ -53,16 +67,28 @@ class LikeListItem extends StatelessWidget {
commentImg = 'http://alpha.iyanzhi.com/topic/2019/08/16/63ef62d019-w';
}
}
var businessId;
if(item.likeContent != null){
businessId = item.likeContent.id.toString() ;
}
else{
businessId = item.userId.toString();
}
return Container(
child: Container(
color: ALColors.ColorE4E4E4,
child: CachedNetworkImage(
width: 42.0,
height: 42.0,
imageUrl: commentImg,
fit: BoxFit.cover,
),
)
child: GestureDetector(
onTap: () {
onClickLike('photo',{'business_id':businessId,'tab_name':''});
},
child: Container(
color: ALColors.ColorE4E4E4,
child: CachedNetworkImage(
width: 42.0,
height: 42.0,
imageUrl: commentImg,
fit: BoxFit.cover,
),
)
),
);
}
......@@ -85,21 +111,33 @@ class LikeListItem extends StatelessWidget {
else{
textTop = 0.0 ;
}
var businessId;
if(item.likeContent != null){
businessId = item.likeContent.id.toString() ;
}
else{
businessId = item.userId.toString();
}
return Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.only(left: ScreenUtil.instance.setWidth(10.0)),
padding: EdgeInsets.only(top: ScreenUtil.instance.setHeight(textTop)),
child: myText('${item.name??""}${item.content??""}${commentInfo??""}', ALColors.Color666666, 13.0),
child: GestureDetector(
onTap: () {
onClickLike('like_message',{'business_id':businessId,'tab_name':''});
},
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.only(left: ScreenUtil.instance.setWidth(10.0)),
padding: EdgeInsets.only(top: ScreenUtil.instance.setHeight(textTop)),
child: myText('${item.name??""}${item.content??""}${commentInfo??""}', ALColors.Color666666, 13.0),
),
Padding(
padding: EdgeInsets.only(left: ScreenUtil.instance.setWidth(10.0), top: ScreenUtil.instance.setHeight(3.0)),
child: myText('${commenTime??""}', ALColors.Color999999, 10.0)
)
],
),
Padding(
padding: EdgeInsets.only(left: ScreenUtil.instance.setWidth(10.0), top: ScreenUtil.instance.setHeight(3.0)),
child: myText('${commenTime??""}', ALColors.Color999999, 10.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