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

like页埋点添加

parent 841b1bc5
...@@ -223,3 +223,13 @@ void onClickButton(buttonName, [params]) { ...@@ -223,3 +223,13 @@ void onClickButton(buttonName, [params]) {
...?params ...?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:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.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/service/remote/entity/LikePageEntity.dart';
import 'package:gmalpha_flutter/NewMessageModel/util/message_date.dart'; import 'package:gmalpha_flutter/NewMessageModel/util/message_date.dart';
import 'package:gmalpha_flutter/res/value/ALColors.dart'; import 'package:gmalpha_flutter/res/value/ALColors.dart';
...@@ -30,7 +31,18 @@ class LikeListItem extends StatelessWidget { ...@@ -30,7 +31,18 @@ class LikeListItem extends StatelessWidget {
} }
Widget listItemHead() { Widget listItemHead() {
var businessId;
if(item.likeContent != null){
businessId = item.likeContent.id.toString() ;
}
else{
businessId = item.userId.toString();
}
return ClipOval( return ClipOval(
child: GestureDetector(
onTap: () {
onClickLike('head_photo',{'business_id':businessId,'tab_name':''});
},
child: Container( child: Container(
color: ALColors.ColorE4E4E4, color: ALColors.ColorE4E4E4,
child: CachedNetworkImage( child: CachedNetworkImage(
...@@ -40,6 +52,8 @@ class LikeListItem extends StatelessWidget { ...@@ -40,6 +52,8 @@ class LikeListItem extends StatelessWidget {
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
) )
)
); );
} }
...@@ -53,7 +67,18 @@ class LikeListItem extends StatelessWidget { ...@@ -53,7 +67,18 @@ class LikeListItem extends StatelessWidget {
commentImg = 'http://alpha.iyanzhi.com/topic/2019/08/16/63ef62d019-w'; 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( return Container(
child: GestureDetector(
onTap: () {
onClickLike('photo',{'business_id':businessId,'tab_name':''});
},
child: Container( child: Container(
color: ALColors.ColorE4E4E4, color: ALColors.ColorE4E4E4,
child: CachedNetworkImage( child: CachedNetworkImage(
...@@ -63,6 +88,7 @@ class LikeListItem extends StatelessWidget { ...@@ -63,6 +88,7 @@ class LikeListItem extends StatelessWidget {
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
) )
),
); );
} }
...@@ -85,7 +111,18 @@ class LikeListItem extends StatelessWidget { ...@@ -85,7 +111,18 @@ class LikeListItem extends StatelessWidget {
else{ else{
textTop = 0.0 ; textTop = 0.0 ;
} }
var businessId;
if(item.likeContent != null){
businessId = item.likeContent.id.toString() ;
}
else{
businessId = item.userId.toString();
}
return Expanded( return Expanded(
child: GestureDetector(
onTap: () {
onClickLike('like_message',{'business_id':businessId,'tab_name':''});
},
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
...@@ -100,6 +137,7 @@ class LikeListItem extends StatelessWidget { ...@@ -100,6 +137,7 @@ class LikeListItem extends StatelessWidget {
) )
], ],
), ),
)
); );
} }
......
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