Authored by 周少峰

Merge branch 'gray'

... ... @@ -269,9 +269,7 @@ class Helpers
$result['salePrice'] && $result['salePrice'] .= '.00';
}
$result['is_soon_sold_out'] = ($productData['is_soon_sold_out'] === 'Y');
$result['url'] = self::url('/product/pro_' . $productData['product_id'] . '_'
. $productData['goods_list'][0]['goods_id']
. '/' . $productData['cn_alphabet'] . '.html', array(), 'item');
$result['url'] = self::getUrlBySkc($productData['product_id'], $productData['goods_list'][0]['goods_id'], $productData['cn_alphabet']);
// APP访问需要加附加的参数
// 备注:如果以后APP的接口太多,可以把这边参数提取出来,变成一个公共的方法来生成,便于以后管理维护
if ($isApp) {
... ... @@ -790,7 +788,7 @@ class Helpers
// 商品链接
$cnAlphaBet = isset($value['cn_alphabet']) ? $value['cn_alphabet'] : md5($value['product_name']);
$oneGoods['link'] = self::url('/product/pro_' . $value['product_id'] . '_' . $value['goods_id'] . '/' . $cnAlphaBet . '.html', null, 'item');
$oneGoods['link'] = self::getUrlBySkc($value['product_id'], $value['goods_id'], $cnAlphaBet);
$result[] = $oneGoods;
}
... ... @@ -839,7 +837,7 @@ class Helpers
// 商品链接
if (isset($single['goods_id'])) {
$cnAlphaBet = isset($single['cn_alphabet']) ? $single['cn_alphabet'] : md5($single['product_name']);
$oneGoods['subjoinLink'] = self::url('/product/pro_' . $single['product_id'] . '_' . $single['goods_id'] . '/' . $cnAlphaBet . '.html', null, 'item');
$oneGoods['subjoinLink'] = self::getUrlBySkc($single['product_id'], $single['goods_id'], $cnAlphaBet);
} else {
$oneGoods['subjoinLink'] = self::url('/product/show_' . $single['product_id'] . '_' . $single['product_skn'] . '/' . Helpers::makeToken($single['product_skn']) . '.html', null, 'item');
}
... ... @@ -1004,10 +1002,7 @@ class Helpers
*/
public static function getUrlBySkc($product_id, $goods_id, $cn_alphabet='')
{
if (empty($cn_alphabet)) {
$cn_alphabet = 'goods.html';
}
return '//item.yohobuy.com/product/pro_' . $product_id . '_' . $goods_id . '/' . $cn_alphabet. '.html';
return '//item.yohobuy.com/p' . $product_id .'.html';
}
/**
... ... @@ -1064,14 +1059,7 @@ class Helpers
*/
public static function getProductUrl($productId, $productSkn, $productName = '', $cnAlphaBet = '')
{
$cnAlphaBet = empty($cnAlphaBet) ? $cnAlphaBet : md5($productName);
return self::url(
'/product/pro_' . $productId . '_' .
$productSkn . '/' . $cnAlphaBet . '.html',
null,
'item'
);
return self::getUrlBySkc($productId ,$productSkn, $cnAlphaBet);
}
/**
... ...
... ... @@ -377,4 +377,24 @@ _mvq.push(['$logConversion']);
_mvq.push(['$addItem', '', /*商品id*/ '{{cartEnsure.ids}}', '', '']);
_mvq.push(['$logData']);
</script>
<script type='text/javascript'>
setTimeout(function() {
if (typeof (py) != 'undefined') {
py('event','viewCart' ,{
'money':'{{cartEnsure.productAmmount}}',
'items':[
{{#cartEnsure.commonSell.productItem}}
{'id':'{{skn}}','count':'{{productNum}}','price':'{{productPrice}}'},
{{/cartEnsure.commonSell.productItem}}
{{#cartEnsure.preSell.productItem}}
{'id':'{{skn}}','count':'{{productNum}}','price':'{{productPrice}}'},
{{/cartEnsure.preSell.productItem}}
]
}).track('MC.Ok.7NFMIlCH_F_LE2riRlF2r_');
}
}, 3000)
</script>
{{> layout/footer}}
... ...
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
... ... @@ -781,6 +781,7 @@ $('.to-play input.submit').click(function() {
juanCode = !!codeVal ? codeVal : $juangroupInput.closest('li').find('#juancode').val(),
subTip = '',
productSkn = [],
pinyouItems = [],
productSku = [];
if ($invoiceCheck.hasClass('active')) {
... ... @@ -865,8 +866,17 @@ $('.to-play input.submit').click(function() {
productNum += parseInt($(this).html());
productSkn.push($(this).attr('data-skn'));
productSku.push($(this).attr('data-sku'));
pinyouItems.push({id: $(this).attr('data-skn'), count: parseInt($(this).html()), price: $(this).next('.cart-sub-total ').html()})
});
// 埋点
window.addPoint('YB_SC_TOPAY_CLICK', {ORDER_CODE: d.data.order_code, PRD_NUM: productNum, ORDER_AMOUNT: d.data.order_amount, PRO_SKN: productSkn.join(','), PRO_SKU:productSku.join(','), UNIONCOOKIE: encodeURIComponent(d.data.unionKey + '') || ''});
// 品友
if (typeof (py) != 'undefined') {
py('event','order' ,{
'id': d.data.order_code, 'money': d.data.order_amount,
'items': pinyouItems
}).track('MC.2z.Rg-AQqSqQi2GykX12LUxI0');
}
window.location.href = d.data.payUrl;
}
} else {
... ...
{
"name": "web-yohobuy",
"version": "5.4.2",
"version": "5.4.3",
"description": "web yohobuy static",
"keywords": [],
"homepage": "",
... ...
... ... @@ -399,7 +399,7 @@ class CartModel
$build = array();
$build['id'] = $value['id'];
$build['skn'] = $value['product_skn'];
$build['href'] = Helpers::getUrlSafe($value['url']);
$build['href'] = Helpers::getUrlBySkc($value['id'], 0);
$build['title'] = $value['product_name'];
$build['img'] = Helpers::getImageUrl($value['default_pic'], 100, 100);
$build['alt'] = $value['product_name'];
... ... @@ -662,7 +662,7 @@ class CartModel
break;
}
$build['img'] .= '?imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center/quality/90';
$build['href'] = Helpers::url('/product/pro_' . $value['product_id'] . '_' . $goodsId . '/' . $value['cn_alphabet'] . '.html', null, 'item');
$build['href'] = Helpers::getUrlBySkc($value['product_id'], $goodsId, $value['cn_alphabet']);
$result['data']['item'][] = $build;
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets/web"
; 应用的版本号
application.version = "5.4.2"
application.version = "5.4.3"
; 网站SEO信息
application.seo.title = "YOHO!BUY 有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets/web"
; 应用的版本号
application.version = "5.4.2"
application.version = "5.4.3"
; 网站SEO信息
application.seo.title = "YOHO!BUY 有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets/web"
; 应用的版本号
application.version = "5.4.2"
application.version = "5.4.3"
; 网站SEO信息
application.seo.title = "YOHO!BUY 有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证"
... ...
... ... @@ -50,7 +50,7 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets/web"
; 应用的版本号
application.version = "5.4.2"
application.version = "5.4.3"
; 网站SEO信息
application.seo.title = "YOHO!BUY 有货 | 年轻人潮流购物中心,中国潮流购物风向标,官方授权正品保证"
... ...