Merge branch 'release/5.4.1' into gray
Showing
8 changed files
with
52 additions
and
17 deletions
@@ -12,7 +12,7 @@ use Configs\ChannelConfig; | @@ -12,7 +12,7 @@ use Configs\ChannelConfig; | ||
12 | */ | 12 | */ |
13 | class HelperHome | 13 | class HelperHome |
14 | { | 14 | { |
15 | - | 15 | + |
16 | /** | 16 | /** |
17 | * 格式化喜欢的品牌 | 17 | * 格式化喜欢的品牌 |
18 | * @param $brandInfo | 18 | * @param $brandInfo |
@@ -42,19 +42,23 @@ class HelperHome | @@ -42,19 +42,23 @@ class HelperHome | ||
42 | } | 42 | } |
43 | 43 | ||
44 | /** | 44 | /** |
45 | - * 格式化新品上架数据(个人中心) | 45 | + * 格式化新品上架数据(个人中心, 支付成功) |
46 | * @param $product | 46 | * @param $product |
47 | * @return array | 47 | * @return array |
48 | */ | 48 | */ |
49 | - public static function formatNew($product) | 49 | + public static function formatNew($product, $size = array()) |
50 | { | 50 | { |
51 | $result = array(); | 51 | $result = array(); |
52 | foreach ($product as $key => $val) { | 52 | foreach ($product as $key => $val) { |
53 | - $img = (isset($val['default_images']) && $val['default_images'])?Images::getImageUrl($val['default_images'], 100, 100) : ''; | 53 | + if (!empty($size)) { |
54 | + $img = (isset($val['default_images']) && $val['default_images'])?Images::getImageUrl($val['default_images'], $size['width'], $size['height']) : ''; | ||
55 | + } else { | ||
56 | + $img = (isset($val['default_images']) && $val['default_images'])?Images::getImageUrl($val['default_images'], 100, 100) : ''; | ||
54 | 57 | ||
55 | - // 强制对图片进行切图规则处理 redmine:12390 | ||
56 | - if (strpos($img, 'imageView')) { | ||
57 | - $img = strstr($img, 'imageView', true) . 'imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center/quality/90'; | 58 | + // 强制对图片进行切图规则处理 redmine:12390 |
59 | + if (strpos($img, 'imageView')) { | ||
60 | + $img = strstr($img, 'imageView', true) . 'imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center/quality/90'; | ||
61 | + } | ||
58 | } | 62 | } |
59 | 63 | ||
60 | $result[] = array( | 64 | $result[] = array( |
@@ -13,7 +13,7 @@ var _gaq = _gaq || []; | @@ -13,7 +13,7 @@ var _gaq = _gaq || []; | ||
13 | (function() { | 13 | (function() { |
14 | _gaq.push(['_setAccount', 'UA-48997038-32']); | 14 | _gaq.push(['_setAccount', 'UA-48997038-32']); |
15 | _gaq.push(['_trackPageview']); | 15 | _gaq.push(['_trackPageview']); |
16 | - var ga = document.createElement('script'); | 16 | + var ga = document.createElement('script'); |
17 | ga.type = 'text/javascript'; ga.async = true; | 17 | ga.type = 'text/javascript'; ga.async = true; |
18 | ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | 18 | ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
19 | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | 19 | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
@@ -34,6 +34,20 @@ var _gaq = _gaq || []; | @@ -34,6 +34,20 @@ var _gaq = _gaq || []; | ||
34 | })(window,document,'script','py','MC..o8vMMWxEXDCiqYckD81lUX'); | 34 | })(window,document,'script','py','MC..o8vMMWxEXDCiqYckD81lUX'); |
35 | py('set','user',{'id':'0'}); | 35 | py('set','user',{'id':'0'}); |
36 | py('event','viewPage'); | 36 | py('event','viewPage'); |
37 | + | ||
38 | + // 品众 | ||
39 | + (function () { | ||
40 | + var _fxcmd=_fxcmd||[]; | ||
41 | + _fxcmd.sid='bb3b16fa1106a6ab8619da0095755f32'; | ||
42 | + _fxcmd.trackAll=false; | ||
43 | + | ||
44 | + var _pzfx=document['createElement']('script'); | ||
45 | + _pzfx.type='text/javascript'; | ||
46 | + _pzfx.async=true; | ||
47 | + _pzfx.src='//static.w3t.cn/fx/1/1/fx.js'; | ||
48 | + var sc=document.getElementsByTagName('script')[0]; | ||
49 | + sc.parentNode.insertBefore(_pzfx,sc); | ||
50 | + })(); | ||
37 | } | 51 | } |
38 | if (window.addEventListener) { | 52 | if (window.addEventListener) { |
39 | window.addEventListener('load', async_load, false); | 53 | window.addEventListener('load', async_load, false); |
@@ -41,4 +55,4 @@ var _gaq = _gaq || []; | @@ -41,4 +55,4 @@ var _gaq = _gaq || []; | ||
41 | window.attachEvent('onload', async_load); | 55 | window.attachEvent('onload', async_load); |
42 | } | 56 | } |
43 | })(); | 57 | })(); |
44 | -</script> | ||
58 | +</script> |
@@ -823,6 +823,7 @@ $('.to-play input.submit').click(function() { | @@ -823,6 +823,7 @@ $('.to-play input.submit').click(function() { | ||
823 | isContinueBuy: isContinueBuy | 823 | isContinueBuy: isContinueBuy |
824 | } | 824 | } |
825 | }).then(function(d) { | 825 | }).then(function(d) { |
826 | + var newUser; | ||
826 | 827 | ||
827 | $loading.hide(); | 828 | $loading.hide(); |
828 | if (d.code === 200) { | 829 | if (d.code === 200) { |
@@ -877,6 +878,18 @@ $('.to-play input.submit').click(function() { | @@ -877,6 +878,18 @@ $('.to-play input.submit').click(function() { | ||
877 | 'items': pinyouItems | 878 | 'items': pinyouItems |
878 | }).track('MC.2z.Rg-AQqSqQi2GykX12LUxI0'); | 879 | }).track('MC.2z.Rg-AQqSqQi2GykX12LUxI0'); |
879 | } | 880 | } |
881 | + // 品众 | ||
882 | + if (_fxcmd) { | ||
883 | + newUser = window.cookie('__NEW_USER') || 0; | ||
884 | + | ||
885 | + _fxcmd.push(['trackOrder', { | ||
886 | + oid: d.data.order_code, | ||
887 | + otp: d.data.order_amount, | ||
888 | + u_info: window.getUid(), | ||
889 | + u_type: newUser | ||
890 | + }, []]); | ||
891 | + window.setCookie('__NEW_USER', 0); | ||
892 | + } | ||
880 | window.location.href = d.data.payUrl; | 893 | window.location.href = d.data.payUrl; |
881 | } | 894 | } |
882 | } else { | 895 | } else { |
@@ -456,7 +456,7 @@ var Order = { | @@ -456,7 +456,7 @@ var Order = { | ||
456 | } else if (expressId === '2') { | 456 | } else if (expressId === '2') { |
457 | $('.express-list.sf').removeClass('hide'); | 457 | $('.express-list.sf').removeClass('hide'); |
458 | } | 458 | } |
459 | - | 459 | + |
460 | } else { | 460 | } else { |
461 | new dialog.Alert(data.message).show(); | 461 | new dialog.Alert(data.message).show(); |
462 | } | 462 | } |
@@ -487,7 +487,7 @@ var Order = { | @@ -487,7 +487,7 @@ var Order = { | ||
487 | $('.play-juan').removeClass('is-select'); | 487 | $('.play-juan').removeClass('is-select'); |
488 | 488 | ||
489 | } else { | 489 | } else { |
490 | - | 490 | + |
491 | e.$loading.show(); | 491 | e.$loading.show(); |
492 | 492 | ||
493 | options = { | 493 | options = { |
@@ -978,7 +978,7 @@ function rejustReceiptInfo() { | @@ -978,7 +978,7 @@ function rejustReceiptInfo() { | ||
978 | 978 | ||
979 | if ($('#input-mobile').val() !== invoiceMobileStar) { | 979 | if ($('#input-mobile').val() !== invoiceMobileStar) { |
980 | $('#input-mobile').val(invoiceMobileStar); | 980 | $('#input-mobile').val(invoiceMobileStar); |
981 | - }; | 981 | + }; |
982 | } | 982 | } |
983 | 983 | ||
984 | $receiptInfoSaveBtn.click(function(){ | 984 | $receiptInfoSaveBtn.click(function(){ |
@@ -1040,6 +1040,9 @@ $('#input-mobile').bind('input propertychange', function() { | @@ -1040,6 +1040,9 @@ $('#input-mobile').bind('input propertychange', function() { | ||
1040 | } | 1040 | } |
1041 | }); | 1041 | }); |
1042 | 1042 | ||
1043 | +// 获取用户是否新客(品众统计)写cookie | ||
1044 | +$.ajax({type: 'GET', url: '/home/newuser'}); | ||
1045 | + | ||
1043 | // 订单确认页默认埋点 | 1046 | // 订单确认页默认埋点 |
1044 | window.addPoint('YB_SC_ORDER_ENSURE'); | 1047 | window.addPoint('YB_SC_ORDER_ENSURE'); |
1045 | 1048 |
@@ -82,13 +82,14 @@ class IndexModel | @@ -82,13 +82,14 @@ class IndexModel | ||
82 | * @param $udid | 82 | * @param $udid |
83 | * @param $recPos | 83 | * @param $recPos |
84 | * @param $limit | 84 | * @param $limit |
85 | + * @param $size 图片尺寸 | ||
85 | * @return array | 86 | * @return array |
86 | */ | 87 | */ |
87 | - public static function preferenceData($channel, $uid, $udid, $recPos, $limit) | 88 | + public static function preferenceData($channel, $uid, $udid, $recPos, $limit, $size = array()) |
88 | { | 89 | { |
89 | $response = UserData::newPreference($channel, $uid, $udid, $recPos, $limit); | 90 | $response = UserData::newPreference($channel, $uid, $udid, $recPos, $limit); |
90 | if ($response['code'] === 200) { | 91 | if ($response['code'] === 200) { |
91 | - return HelperHome::formatNew($response['data']['product_list']); | 92 | + return HelperHome::formatNew($response['data']['product_list'], $size); |
92 | } else { | 93 | } else { |
93 | return array(); | 94 | return array(); |
94 | } | 95 | } |
@@ -388,7 +388,7 @@ class NoticeController extends WebAction | @@ -388,7 +388,7 @@ class NoticeController extends WebAction | ||
388 | break; | 388 | break; |
389 | } | 389 | } |
390 | 390 | ||
391 | - $dealResult['data']['bestForYou'] = IndexModel::preferenceData($channelNum, $uid, $udid, '100004', 15); | 391 | + $dealResult['data']['bestForYou'] = IndexModel::preferenceData($channelNum, $uid, $udid, '100004', 15, array('width' => 190, 'height' => 256)); |
392 | 392 | ||
393 | $data = array( | 393 | $data = array( |
394 | 'payNotice' => $dealResult['data'], | 394 | 'payNotice' => $dealResult['data'], |
@@ -166,7 +166,7 @@ class PayreturnController extends WebAction | @@ -166,7 +166,7 @@ class PayreturnController extends WebAction | ||
166 | break; | 166 | break; |
167 | } | 167 | } |
168 | 168 | ||
169 | - $dealResult['data']['bestForYou'] = IndexModel::preferenceData($channelNum, $uid, $udid, '100004', 15); | 169 | + $dealResult['data']['bestForYou'] = IndexModel::preferenceData($channelNum, $uid, $udid, '100004', 15, array('width' => 190, 'height' => 256)); |
170 | 170 | ||
171 | $data = array('payNotice' => $dealResult['data'], 'point' => $point, 'paySuccessPage' => true); | 171 | $data = array('payNotice' => $dealResult['data'], 'point' => $point, 'paySuccessPage' => true); |
172 | 172 |
@@ -88,7 +88,7 @@ class PayController extends WebAction | @@ -88,7 +88,7 @@ class PayController extends WebAction | ||
88 | break; | 88 | break; |
89 | } | 89 | } |
90 | 90 | ||
91 | - $data['bestForYou'] = IndexModel::preferenceData($channelNum, $uid, $udid, '100004', 15); | 91 | + $data['bestForYou'] = IndexModel::preferenceData($channelNum, $uid, $udid, '100004', 15, array('width' => 190, 'height' => 256)); |
92 | 92 | ||
93 | $this->setSimpleHeader(); | 93 | $this->setSimpleHeader(); |
94 | $this->_view->display($view, array( | 94 | $this->_view->display($view, array( |
-
Please register or login to post a comment