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
Email Patches
Plain Diff
Browse Files
Authored by
郝肖肖
9 years ago
Commit
356bf9bdc05c9ba4c5aa164c0039c673152c35ed
1 parent
d34afcf3
个人中心为您优选埋点
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
11 deletions
library/WebPlugin/HelperHome.php
template/www.yohobuy.com/actions/home/index/index.phtml
web-static/js/home/index.js
yohobuy/www.yohobuy.com/public/index-dev.php
library/WebPlugin/HelperHome.php
View file @
356bf9b
...
...
@@ -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
;
}
...
...
template/www.yohobuy.com/actions/home/index/index.phtml
View file @
356bf9b
...
...
@@ -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>
...
...
web-static/js/home/index.js
View file @
356bf9b
...
...
@@ -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
...
...
yohobuy/www.yohobuy.com/public/index-dev.php
View file @
356bf9b
...
...
@@ -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
...
...
Please
register
or
login
to post a comment