Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
周少峰
8 years ago
Commit
cc6336164d32a956fbbb06d24d6f1b70091bec98
2 parents
b3d34303
4317a96b
Merge branch 'hotfix/slim'
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
8 additions
and
80 deletions
apps/cart/views/partial/cart-analysis.hbs
apps/channel/views/partial/home-analysis.hbs
apps/product/models/list.js
apps/product/views/action/list/brand.hbs
apps/product/views/action/list/index.hbs
apps/product/views/action/list/shop-list.hbs
apps/product/views/action/sale/discount.hbs
apps/product/views/action/search/index.hbs
apps/product/views/partial/common/criteo.hbs
apps/product/views/partial/list/list.hbs
apps/product/views/partial/product/stat.hbs
apps/shopping/views/partial/pay/pay-analysis.hbs
package.json
public/js/common/helpers/image2.js
utils/helpers.js
apps/cart/views/partial/cart-analysis.hbs
View file @
cc63361
...
...
@@ -10,20 +10,7 @@
s0
.
parentNode
.
insertBefore
(
s
,
s0
);
})(
document
);
</script>
<script
type=
"text/javascript"
src=
"//static.criteo.net/js/ld/ld.js"
async=
"true"
></script>
<script
type=
"text/javascript"
>
window.criteo_q = window.criteo_q || [];
window.criteo_q.push(
{event: "setAccount", account: 16184},
{event: "setCustomerId", id: "
{{
uid
}}
"},
{event: "setSiteType", type: "d"},
{event: "viewBasket", item: [
{{#
cart
.
criteo
}}
{"id":"
{{
id
}}
","quantity":"
{{
quantity
}}
","price":"
{{
price
}}
"},
{{/
cart
.
criteo
}}
]}
);
</script>
<!-- 聚效 -->
<script
type=
"text/javascript"
>
var _mvq = window._mvq || [];
...
...
apps/channel/views/partial/home-analysis.hbs
View file @
cc63361
<script>
window
.
onload
=
function
()
{
var
hm
=
document
.
createElement
(
"script"
);
hm
.
src
=
"//static.criteo.net/js/ld/ld.js"
;
hm
.
async
=
1
;
var
s
=
document
.
getElementsByTagName
(
"script"
)[
0
];
s
.
parentNode
.
insertBefore
(
hm
,
s
);
var
u
=
_ozuid
||
""
;
u
=
(
u
==
0
)
?
""
:
u
;
window
.
criteo_q
=
window
.
criteo_q
||
[];
window
.
criteo_q
.
push
({
event
:
"setAccount"
,
account
:
16184
},{
event
:
"setCustomerId"
,
id
:
u
},{
event
:
"setSiteType"
,
type
:
"d"
},{
event
:
"viewHome"
});
};
</script>
...
...
apps/product/models/list.js
View file @
cc63361
...
...
@@ -151,8 +151,6 @@ const getListData = (params, channel) => {
Object
.
assign
(
finalResult
.
list
.
leftContent
,
searchHandler
.
handleSortAds
(
result
[
4
].
data
));
}
finalResult
.
criteo
=
{
skn
:
searchHandler
.
getCriteo
(
_
.
get
(
finalResult
.
list
,
'goods'
))};
let
seo
=
searchHandler
.
getListSeo
(
channel
,
_
.
get
(
finalResult
,
'list.leftContent.allSort.list'
),
_
.
get
(
finalResult
,
'list.filters.checkedConditions.conditions'
));
...
...
@@ -360,8 +358,6 @@ const getBrandData = (params, extra, channel) => {
_
.
get
(
result
[
3
],
'data.coupons'
,
[]),
{
brandId
:
extra
.
brandId
});
}
finalResult
.
criteo
=
{
skn
:
searchHandler
.
getCriteo
(
_
.
get
(
finalResult
.
brand
,
'goods'
))};
let
seo
=
searchHandler
.
getBrandShopSeo
(
channel
,
extra
,
params
);
return
Object
.
assign
({},
seo
,
finalResult
);
...
...
apps/product/views/action/list/brand.hbs
View file @
cc63361
...
...
@@ -2,5 +2,4 @@
{{#
brand
}}
{{>
list
/
list
}}
{{/
brand
}}
{{>
common
/
criteo
}}
</div>
...
...
apps/product/views/action/list/index.hbs
View file @
cc63361
...
...
@@ -8,5 +8,4 @@
{{>
list
/
list
}}
{{/
list
}}
{{>
common
/
criteo
}}
</div>
...
...
apps/product/views/action/list/shop-list.hbs
View file @
cc63361
...
...
@@ -30,4 +30,3 @@
</div>
</div>
</div>
{{>
common
/
criteo
}}
...
...
apps/product/views/action/sale/discount.hbs
View file @
cc63361
...
...
@@ -11,5 +11,4 @@
{{/
saleList
}}
</div>
</div>
{{>
common
/
criteo
}}
{{/
result
}}
...
...
apps/product/views/action/search/index.hbs
View file @
cc63361
...
...
@@ -4,5 +4,4 @@
{{>
list
/
list
}}
{{/
search
}}
{{>
common
/
criteo
}}
</div>
...
...
apps/product/views/partial/common/criteo.hbs
deleted
100644 → 0
View file @
b3d3430
{{#
criteo
}}
<script
type=
"text/javascript"
src=
"//static.criteo.net/js/ld/ld.js"
async=
"true"
></script>
<script
type=
"text/javascript"
>
window.criteo_q = window.criteo_q || [];
window.criteo_q.push(
{ event: "setAccount", account: [16184] },
{ event: "setSiteType", type: "d" },
{ event: "viewList", item: [
{{#
each
skn
}}
"
{{
.
}}
"
{{#
unless
@last
}}
,
{{/
unless
}}{{/
each
}}
]}
);
</script>
{{/
criteo
}}
\ No newline at end of file
apps/product/views/partial/list/list.hbs
View file @
cc63361
{{#
brandBanner
}}
<div
class=
"brand-banner"
>
<div
class=
"banner-img"
style=
"height:
{{
bannerHeight
}}
px;background: url(
{{
image2
banner
}}
)"
></div>
<div
class=
"banner-img"
style=
"height:
{{
bannerHeight
}}
px;background: url(
{{
image2
banner
q
=
100
}}
)"
></div>
<div
class=
"opt-wrap"
>
<p
class=
"opt center-content"
>
<a
href=
"
{{
brandHome
}}
"
>
...
...
@@ -22,7 +22,7 @@
{{#
shopBanner
}}
<div
class=
"brand-banner base-shop-banner"
>
<div
class=
"banner-img"
style=
"height:
{{
bannerHeight
}}
px;background: url(
{{
image2
banner
}}
)"
></div>
<div
class=
"banner-img"
style=
"height:
{{
bannerHeight
}}
px;background: url(
{{
image2
banner
q
=
100
}}
)"
></div>
<div
class=
"opt-wrap"
>
<div
class=
"opt center-content"
>
{{#if
showShopName
}}
...
...
apps/product/views/partial/product/stat.hbs
View file @
cc63361
{{#
statGoodsInfo
}}
<script
type=
"text/javascript"
src=
"//static.criteo.net/js/ld/ld.js"
async=
"true"
></script>
<script
type=
"text/javascript"
>
window.criteo_q = window.criteo_q || [];
window.criteo_q.push(
{event: "setAccount", account: 16184},
{event: "setCustomerId", id: "
{{
uid
}}
"},
{event: "setSiteType", type: "d"},
{event: "viewItem", item: "
{{
skn
}}
"
}
);
</script>
<script
type=
"text/javascript"
>
var _mvq = _mvq || [];
_mvq.push(['$setAccount', 'm-23428-1']);
...
...
apps/shopping/views/partial/pay/pay-analysis.hbs
View file @
cc63361
{{#
criteo
}}
<script
type=
"text/javascript"
src=
"//static.criteo.net/js/ld/ld.js"
async=
"true"
></script>
<script
type=
"text/javascript"
>
window.criteo_q = window.criteo_q || [];
window.criteo_q.push(
{ event: "setAccount", account: [16184] },
{ event: "setSiteType", type: "d" },
{ event: "trackTransaction" , id: "
{{
order_code
}}
", item: [
{{#
each
items
}}
{ id: "
{{
product_skn
}}
", price: "
{{
goods_price
}}
", quantity: "
{{
buy_number
}}
"}
{{#
unless
@last
}}
,
{{/
unless
}}
{{/
each
}}
]}
);
</script>
{{/
criteo
}}
...
...
package.json
View file @
cc63361
{
"name"
:
"yohobuy-node"
,
"version"
:
"5.7.
1
"
,
"version"
:
"5.7.
2
"
,
"private"
:
true
,
"description"
:
"A New Yohobuy Project With Express"
,
"repository"
:
{
...
...
public/js/common/helpers/image2.js
View file @
cc63361
...
...
@@ -61,7 +61,7 @@ module.exports = function(imageUrl, opts) {
}
else
{
query
=
'imageView2/2/interlace/1/q/'
+
(
params
.
q
||
75
);
}
return
uri
+
'?'
+
query
+
'|imageslim'
;
return
uri
+
'?'
+
query
;
}
else
{
return
imageUrl
;
}
...
...
utils/helpers.js
View file @
cc63361
...
...
@@ -61,7 +61,7 @@ module.exports = {
}
else
{
query
=
'imageView2/2/interlace/1/q/'
+
(
params
.
q
||
75
);
}
return
uri
+
'?'
+
query
+
'|imageslim'
;
return
uri
+
'?'
+
query
;
}
else
{
return
''
;
}
...
...
Please
register
or
login
to post a comment