Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
周少峰
8 years ago
Commit
f29ccb2d6b5cfad2b10ab7caa7dad53e98e523da
2 parents
b5c6cb47
e9229a02
Merge branch 'release/5.4.1' into gray
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
52 additions
and
17 deletions
library/WebPlugin/HelperHome.php
template/www.yohobuy.com/partials/layout/analysis.phtml
web-static/js/order/address.js
web-static/js/order/ensure.js
yohobuy/www.yohobuy.com/application/models/Home/Index.php
yohobuy/www.yohobuy.com/application/modules/Pay/controllers/Notice.php
yohobuy/www.yohobuy.com/application/modules/Pay/controllers/Payreturn.php
yohobuy/www.yohobuy.com/application/modules/Shopping/controllers/Pay.php
library/WebPlugin/HelperHome.php
View file @
f29ccb2
...
...
@@ -12,7 +12,7 @@ use Configs\ChannelConfig;
*/
class
HelperHome
{
/**
* 格式化喜欢的品牌
* @param $brandInfo
...
...
@@ -42,19 +42,23 @@ class HelperHome
}
/**
* 格式化新品上架数据(个人中心)
* 格式化新品上架数据(个人中心
, 支付成功
)
* @param $product
* @return array
*/
public
static
function
formatNew
(
$product
)
public
static
function
formatNew
(
$product
,
$size
=
array
()
)
{
$result
=
array
();
foreach
(
$product
as
$key
=>
$val
)
{
$img
=
(
isset
(
$val
[
'default_images'
])
&&
$val
[
'default_images'
])
?
Images
::
getImageUrl
(
$val
[
'default_images'
],
100
,
100
)
:
''
;
if
(
!
empty
(
$size
))
{
$img
=
(
isset
(
$val
[
'default_images'
])
&&
$val
[
'default_images'
])
?
Images
::
getImageUrl
(
$val
[
'default_images'
],
$size
[
'width'
],
$size
[
'height'
])
:
''
;
}
else
{
$img
=
(
isset
(
$val
[
'default_images'
])
&&
$val
[
'default_images'
])
?
Images
::
getImageUrl
(
$val
[
'default_images'
],
100
,
100
)
:
''
;
// 强制对图片进行切图规则处理 redmine:12390
if
(
strpos
(
$img
,
'imageView'
))
{
$img
=
strstr
(
$img
,
'imageView'
,
true
)
.
'imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center/quality/90'
;
// 强制对图片进行切图规则处理 redmine:12390
if
(
strpos
(
$img
,
'imageView'
))
{
$img
=
strstr
(
$img
,
'imageView'
,
true
)
.
'imageMogr2/thumbnail/100x100/extent/100x100/background/d2hpdGU=/position/center/quality/90'
;
}
}
$result
[]
=
array
(
...
...
template/www.yohobuy.com/partials/layout/analysis.phtml
View file @
f29ccb2
...
...
@@ -13,7 +13,7 @@ var _gaq = _gaq || [];
(function() {
_gaq.push(['_setAccount', 'UA-48997038-32']);
_gaq.push(['_trackPageview']);
var ga = document.createElement('script');
var ga = document.createElement('script');
ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
...
...
@@ -34,6 +34,20 @@ var _gaq = _gaq || [];
})(window,document,'script','py','MC..o8vMMWxEXDCiqYckD81lUX');
py('set','user',{'id':'0'});
py('event','viewPage');
// 品众
(function () {
var _fxcmd=_fxcmd||[];
_fxcmd.sid='bb3b16fa1106a6ab8619da0095755f32';
_fxcmd.trackAll=false;
var _pzfx=document['createElement']('script');
_pzfx.type='text/javascript';
_pzfx.async=true;
_pzfx.src='//static.w3t.cn/fx/1/1/fx.js';
var sc=document.getElementsByTagName('script')[0];
sc.parentNode.insertBefore(_pzfx,sc);
})();
}
if (window.addEventListener) {
window.addEventListener('load', async_load, false);
...
...
@@ -41,4 +55,4 @@ var _gaq = _gaq || [];
window.attachEvent('onload', async_load);
}
})();
</script>
\ No newline at end of file
</script>
...
...
web-static/js/order/address.js
View file @
f29ccb2
...
...
@@ -823,6 +823,7 @@ $('.to-play input.submit').click(function() {
isContinueBuy
:
isContinueBuy
}
}).
then
(
function
(
d
)
{
var
newUser
;
$loading
.
hide
();
if
(
d
.
code
===
200
)
{
...
...
@@ -877,6 +878,18 @@ $('.to-play input.submit').click(function() {
'items'
:
pinyouItems
}).
track
(
'MC.2z.Rg-AQqSqQi2GykX12LUxI0'
);
}
// 品众
if
(
_fxcmd
)
{
newUser
=
window
.
cookie
(
'__NEW_USER'
)
||
0
;
_fxcmd
.
push
([
'trackOrder'
,
{
oid
:
d
.
data
.
order_code
,
otp
:
d
.
data
.
order_amount
,
u_info
:
window
.
getUid
(),
u_type
:
newUser
},
[]]);
window
.
setCookie
(
'__NEW_USER'
,
0
);
}
window
.
location
.
href
=
d
.
data
.
payUrl
;
}
}
else
{
...
...
web-static/js/order/ensure.js
View file @
f29ccb2
...
...
@@ -456,7 +456,7 @@ var Order = {
}
else
if
(
expressId
===
'2'
)
{
$
(
'.express-list.sf'
).
removeClass
(
'hide'
);
}
}
else
{
new
dialog
.
Alert
(
data
.
message
).
show
();
}
...
...
@@ -487,7 +487,7 @@ var Order = {
$
(
'.play-juan'
).
removeClass
(
'is-select'
);
}
else
{
e
.
$loading
.
show
();
options
=
{
...
...
@@ -978,7 +978,7 @@ function rejustReceiptInfo() {
if
(
$
(
'#input-mobile'
).
val
()
!==
invoiceMobileStar
)
{
$
(
'#input-mobile'
).
val
(
invoiceMobileStar
);
};
};
}
$receiptInfoSaveBtn
.
click
(
function
(){
...
...
@@ -1040,6 +1040,9 @@ $('#input-mobile').bind('input propertychange', function() {
}
});
// 获取用户是否新客(品众统计)写cookie
$
.
ajax
({
type
:
'GET'
,
url
:
'/home/newuser'
});
// 订单确认页默认埋点
window
.
addPoint
(
'YB_SC_ORDER_ENSURE'
);
...
...
yohobuy/www.yohobuy.com/application/models/Home/Index.php
View file @
f29ccb2
...
...
@@ -82,13 +82,14 @@ class IndexModel
* @param $udid
* @param $recPos
* @param $limit
* @param $size 图片尺寸
* @return array
*/
public
static
function
preferenceData
(
$channel
,
$uid
,
$udid
,
$recPos
,
$limit
)
public
static
function
preferenceData
(
$channel
,
$uid
,
$udid
,
$recPos
,
$limit
,
$size
=
array
()
)
{
$response
=
UserData
::
newPreference
(
$channel
,
$uid
,
$udid
,
$recPos
,
$limit
);
if
(
$response
[
'code'
]
===
200
)
{
return
HelperHome
::
formatNew
(
$response
[
'data'
][
'product_list'
]);
return
HelperHome
::
formatNew
(
$response
[
'data'
][
'product_list'
]
,
$size
);
}
else
{
return
array
();
}
...
...
yohobuy/www.yohobuy.com/application/modules/Pay/controllers/Notice.php
View file @
f29ccb2
...
...
@@ -388,7 +388,7 @@ class NoticeController extends WebAction
break
;
}
$dealResult
[
'data'
][
'bestForYou'
]
=
IndexModel
::
preferenceData
(
$channelNum
,
$uid
,
$udid
,
'100004'
,
15
);
$dealResult
[
'data'
][
'bestForYou'
]
=
IndexModel
::
preferenceData
(
$channelNum
,
$uid
,
$udid
,
'100004'
,
15
,
array
(
'width'
=>
190
,
'height'
=>
256
)
);
$data
=
array
(
'payNotice'
=>
$dealResult
[
'data'
],
...
...
yohobuy/www.yohobuy.com/application/modules/Pay/controllers/Payreturn.php
View file @
f29ccb2
...
...
@@ -166,7 +166,7 @@ class PayreturnController extends WebAction
break
;
}
$dealResult
[
'data'
][
'bestForYou'
]
=
IndexModel
::
preferenceData
(
$channelNum
,
$uid
,
$udid
,
'100004'
,
15
);
$dealResult
[
'data'
][
'bestForYou'
]
=
IndexModel
::
preferenceData
(
$channelNum
,
$uid
,
$udid
,
'100004'
,
15
,
array
(
'width'
=>
190
,
'height'
=>
256
)
);
$data
=
array
(
'payNotice'
=>
$dealResult
[
'data'
],
'point'
=>
$point
,
'paySuccessPage'
=>
true
);
...
...
yohobuy/www.yohobuy.com/application/modules/Shopping/controllers/Pay.php
View file @
f29ccb2
...
...
@@ -88,7 +88,7 @@ class PayController extends WebAction
break
;
}
$data
[
'bestForYou'
]
=
IndexModel
::
preferenceData
(
$channelNum
,
$uid
,
$udid
,
'100004'
,
15
);
$data
[
'bestForYou'
]
=
IndexModel
::
preferenceData
(
$channelNum
,
$uid
,
$udid
,
'100004'
,
15
,
array
(
'width'
=>
190
,
'height'
=>
256
)
);
$this
->
setSimpleHeader
();
$this
->
_view
->
display
(
$view
,
array
(
...
...
Please
register
or
login
to post a comment