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
b22cd282c513aba98ded67fd46889475da20951d
1 parent
d528ed12
购物车为您优选埋点
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
10 deletions
template/www.yohobuy.com/actions/cart/index/cart.phtml
web-static/js/cart/cart.js
template/www.yohobuy.com/actions/cart/index/cart.phtml
View file @
b22cd28
...
...
@@ -338,7 +338,7 @@
</div>
<!--凑单商品模板-->
<div
class=
"together"
></div>
<div
class=
"histroy"
></div>
<div
class=
"histroy
givePoint
"
></div>
{
{>
cart/cart-medley
}
}
<!--
商品信息详情
-->
<div
class=
"goods-detail"
></div>
...
...
web-static/js/cart/cart.js
View file @
b22cd28
...
...
@@ -184,21 +184,34 @@ togetherProductSource = $('#togetherProduct').html();
togetherProductTemplate
=
Handlerbars
.
compile
(
togetherProductSource
);
function
getTogetherProduct
(
$obj
,
url
,
page
)
{
var
PRDID
=
[];
$
.
ajax
({
type
:
'GET'
,
dataType
:
'json'
,
url
:
url
,
data
:
page
}).
then
(
function
(
d
)
{
if
(
d
.
code
===
200
)
{
if
(
d
.
data
.
item
)
{
if
(
d
.
data
.
item
.
length
>
0
)
{
$obj
.
html
(
' '
);
togetherProductStr
=
togetherProductTemplate
(
d
.
data
);
$obj
.
append
(
$
(
togetherProductStr
));
$
(
'#orderProduct li:last'
).
addClass
(
'end'
);
$
(
'.gift'
).
removeClass
(
'none'
);
}
if
(
d
.
code
===
200
&&
d
.
data
.
item
.
length
>
0
)
{
$obj
.
html
(
' '
);
togetherProductStr
=
togetherProductTemplate
(
d
.
data
);
$obj
.
append
(
$
(
togetherProductStr
));
$
(
'#orderProduct li:last'
).
addClass
(
'end'
);
$
(
'.gift'
).
removeClass
(
'none'
);
//为您优选埋点
if
(
$obj
.
hasClass
(
'givePoint'
))
{
$
.
each
(
d
.
data
.
item
,
function
(
key
,
val
)
{
PRDID
.
push
(
val
.
id
);
});
window
.
givePoint
({
'REC_POSE'
:
120003
,
'PRD_ID'
:
PRDID
.
join
(
','
),
'PRD_NUM'
:
d
.
data
.
item
.
length
,
'ACTION_ID'
:
0
,
'page_num'
:
page
&&
page
.
page
?
page
.
page
:
1
});
}
}
});
...
...
Please
register
or
login
to post a comment