Authored by 郝肖肖

个人中心为您优选埋点

... ... @@ -50,10 +50,13 @@ class HelperHome
{
$result = array();
foreach ($product as $key => $val) {
$result[$key]['href'] = Helpers::getUrlBySkc($val['product_id'], $val['goods_list'][0]['product_skc'], $val['cn_alphabet']);
$result[$key]['thumb'] = (isset($val['default_images']) && $val['default_images'])?Images::getImageUrl($val['default_images'], 400, 500):'';
$result[$key]['name'] = $val['product_name'];
$result[$key]['price'] = $val['sales_price'];
$result[] = array(
'href' => Helpers::getUrlBySkc($val['product_id'], $val['goods_list'][0]['product_skc'], $val['cn_alphabet']),
'thumb' => (isset($val['default_images']) && $val['default_images'])?Images::getImageUrl($val['default_images'], 400, 500) : '',
'name' => $val['product_name'],
'price' => $val['sales_price'],
'productId' => $val['product_id'],
);
}
return $result;
}
... ...
... ... @@ -97,7 +97,7 @@
<ul class="clearfix">
{{# recommend}}
<li>
<a href="{{href}}">
<a href="{{href}}" data-id='{{productId}}'>
<img class="thumb" src="{{thumb}}">
<p class="name">{{name}}</p>
<span class="price">¥{{price}}</span>
... ...
... ... @@ -68,7 +68,8 @@ function pageChange(self, $ul, page, itemWith, curPage, num) {
naItemWith = $naUl.children('li:last-child').outerWidth(),
rcItemWith = $rcUl.children('li:last-child').outerWidth(),
naCurPage = 1,
rcCurPage = 1;
rcCurPage = 1,
PRDID = [];
$naUl.width($naUl.width() * naPage);
$rcUl.width($rcUl.width() * rcPage);
... ... @@ -101,4 +102,30 @@ function pageChange(self, $ul, page, itemWith, curPage, num) {
pageChange($this, $rcUl, rcPage, rcItemWith, rcCurPage, 6);
}
});
//为您优选埋点 start
$rcUl.find('li').each(function() {
PRDID.push($(this).find('a').data('id'));
});
window.givePoint({
'REC_POSE': 120004,
'PRD_ID': PRDID.join(','),
'PRD_NUM': $rcUl.find('li').length,
'ACTION_ID': 0,
'page_num': 1
});
$rcUl.find('li a').unbind('click').bind('click', function() {
window.givePoint({
'REC_POSE': 120004,
'PRD_ID': $(this).data('id'),
'PRD_NUM': $(this).closest('li').index(),
'ACTION_ID': 1,
'page_num': 1
});
return true;
});
//为您优选埋点 end
}());
\ No newline at end of file
... ...
... ... @@ -7,13 +7,13 @@ define('SUB_DOMAIN', '.yohobuy.com'); // 子域名后缀
define('USE_CACHE', false); // 缓存的开关
define('APPLICATION_PATH', dirname(__DIR__)); // 应用目录
define('ROOT_PATH', dirname(dirname(APPLICATION_PATH))); // 根目录
defined('APPLICATION_ENV') || define('APPLICATION_ENV', 'developer');
defined('APPLICATION_ENV') || define('APPLICATION_ENV', 'production');
define('API_URL', 'http://testapi.yoho.cn:28078/');
define('SERVICE_URL', 'http://testservice.yoho.cn:28077/');
define('API_URL', 'http://api.yoho.yohoops.org/');
define('SERVICE_URL', 'http://service.yoho.yohoops.org/');
define('YOHOBUY_URL', 'http://www.yohobuy.com/');
define('SERVICE_NOTIFY', 'http://testservice.yoho.cn:28077/');
define('API_OLD', 'http://test2.open.yohobuy.com/');
define('SERVICE_NOTIFY', 'http://service.yoho.cn/');
define('API_OLD', 'http://api2.open.yohobuy.com/');
$application = new Application(APPLICATION_PATH . '/configs/application.developer.ini');
$application->bootstrap()->run();
\ No newline at end of file
... ...