diff --git a/doraemon/views/partial/resources/banner.hbs b/doraemon/views/partial/resources/banner.hbs index b7389c7..afed324 100644 --- a/doraemon/views/partial/resources/banner.hbs +++ b/doraemon/views/partial/resources/banner.hbs @@ -1,7 +1,7 @@ {{#if singleOne}} {{#data}} <div class="banner-list"> - <a href="{{url}}"> + <a href="{{url}}" id="{{../template_id}}" name="{{../template_intro}}"> <img src="{{image2 src w=640 h=200 q=60 mode=3}}" alt=""> </a> </div> @@ -11,7 +11,7 @@ <ul class="banner-list swiper-wrapper clearfix"> {{#data}} <li class="swiper-slide"> - <a href="{{url}}"> + <a href="{{url}}" id="{{../template_id}}" name="{{../template_intro}}"> <img src="{{image2 src w=640 h=200 q=60 mode=3}}" alt=""> </a> </li> diff --git a/doraemon/views/partial/resources/thumb-row.hbs b/doraemon/views/partial/resources/thumb-row.hbs index 15406fc..f4eff39 100644 --- a/doraemon/views/partial/resources/thumb-row.hbs +++ b/doraemon/views/partial/resources/thumb-row.hbs @@ -1,6 +1,6 @@ <div class="thumb-row"> {{# data}} - <a href="{{url}}"> + <a href="{{url}}" id="{{../template_id}}" name="{{../template_intro}}"> <div class="thumb-row-box" style="background-image:url({{image2 src w=275 h=160 q=60}})"></div> </a> {{/ data}} diff --git a/public/js/home/index.page.js b/public/js/home/index.page.js index 60275c6..5d84383 100644 --- a/public/js/home/index.page.js +++ b/public/js/home/index.page.js @@ -43,15 +43,18 @@ $('.yoho-page').on('touchstart', '.list-item, .type-item, .order-title', functio // 埋点 $('.res-c').on('click', 'a', function() { + var $this = $(this); + var index = $this.index() + 1; + var pIndex = $this.parent('div').index() + 1; + var url = $this.attr('href'); + var name = $this.attr('name'); + var id = $this.attr('id'); + window._yas.sendCustomInfo({ - - // op: 'YB_CHOOSE_FOR_YOU_Y', - // appop: isAppOp ? 'YB_CHOOSE_FOR_YOU' : '', // app内打开wap的埋点场合 - // param: JSON.stringify(parameter), - // REC_POSE: RECPOSE, - // PRD_ID: $(this).closest('.good-info').data('id'), - // PRD_NUM: index % pageNum === 0 ? pageNum : index % pageNum, - // ACTION_ID: 1, - // PAGE_NUM: Math.ceil(index / pageNum) + I_INDEX: index, + F_URL: encodeURIComponent(url), + F_NAME: name, + F_INDEX: pIndex, + F_ID: id }, true); });