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
周少峰
8 years ago
Commit
397050affd0d23faee2f5448c3491e69538987ac
1 parent
f7a045e4
pinyou
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
template/www.yohobuy.com/actions/cart/index/cart.phtml
web-static/js/order/address.js
template/www.yohobuy.com/actions/cart/index/cart.phtml
View file @
397050a
...
...
@@ -377,4 +377,19 @@ _mvq.push(['$logConversion']);
_mvq.push(
[
'$addItem'
,
''
,
/*商品id*/
'
{
{cartEnsure.ids
}
}'
,
''
,
''
]
);
_mvq.push(
[
'$logData'
]
);
</script>
<script
type='text/javascript'>
py('event','viewCart'
,
{
'money':'{money
}
',
'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.
7
NFMIlCH_F_LE
2
riRlF
2
r_');
</script>
{
{>
layout/footer
}
}
...
...
web-static/js/order/address.js
View file @
397050a
...
...
@@ -33,6 +33,15 @@ var $addressManage = $('.address-manage'),
var
cartType
=
$addressManage
.
attr
(
'cart-type'
);
$loading
.
show
();
var
productNum
=
0
,
productSkn
=
[],
productSku
=
[],
pinyouItems
=
[];
$
(
'.product-num'
).
each
(
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
()})
});
console
.
log
(
pinyouItems
);
// 构建select下拉选项
function
structureOption
(
$obj
,
data
,
selectId
)
{
...
...
@@ -781,6 +790,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 +875,16 @@ $('.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
+
''
)
||
''
});
// 品友
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
{
...
...
Please
register
or
login
to post a comment