广告点击添加
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:hgdj/hj_model/video_model.dart';
|
||||
import 'package:hgdj/hj_utils/api_service/common_service.dart';
|
||||
import 'package:hgdj/routers/jump_router.dart';
|
||||
|
||||
import '../../../hj_model/splash/ads_model.dart';
|
||||
@@ -14,7 +15,10 @@ class FeedAdView extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
final AdsInfoModel? adv = mediaInfo?.randomAdsInfo;
|
||||
return GestureDetector(
|
||||
onTap: () => pushToPageByLink(adv?.href),
|
||||
onTap: () {
|
||||
pushToPageByLink(adv?.href);
|
||||
CommonService.adsClick(adv?.id);
|
||||
},
|
||||
// 强制全屏铺满(与视频页一致),避免 iOS 上未撑满导致显示不全
|
||||
child: SizedBox.expand(
|
||||
child: NetworkImageLoader(
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:hgdj/hj_model/splash/ads_model.dart';
|
||||
import 'package:hgdj/hj_utils/api_service/common_service.dart';
|
||||
import 'package:hgdj/routers/jump_router.dart';
|
||||
import 'package:hgdj/tools_base/ad_manager.dart';
|
||||
import 'package:hgdj/tools_base/widget/net_image_widget.dart';
|
||||
@@ -35,7 +36,10 @@ class _FloatAdViewState extends State<FloatAdView> {
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () => pushToPageByLink(ad.href),
|
||||
onTap: () {
|
||||
pushToPageByLink(ad.href);
|
||||
CommonService.adsClick(ad.id);
|
||||
},
|
||||
child: NetworkImageLoader(
|
||||
imageUrl: cover,
|
||||
width: 70,
|
||||
|
||||
Reference in New Issue
Block a user