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
Email Patches
Plain Diff
Browse Files
Authored by
周少峰
8 years ago
Commit
84c2670e0cbbfc880839f877734a7a32337fb374
1 parent
577a7b21
cache and price
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
apps/guang/controllers/index.js
apps/product/models/search.js
config/cache.js
apps/guang/controllers/index.js
View file @
84c2670
...
...
@@ -315,7 +315,7 @@ exports.detail = (req, res, next) => {
brands
:
ret
[
5
],
tag
:
info
.
tags
,
relatedPost
:
(
ret
[
9
]
&&
ret
[
9
].
length
)
?
ret
[
9
]
:
false
,
relatedPost
:
(
ret
[
10
]
&&
ret
[
10
].
length
)
?
ret
[
10
]
:
false
,
exRecos
:
ret
[
6
],
ads
:
ret
[
7
],
...
...
apps/product/models/search.js
View file @
84c2670
...
...
@@ -295,7 +295,7 @@ exports.getSearchLessProduct = (channelNum, uid, udid, page) => {
img
:
it
.
default_images
?
helpers
.
image
(
it
.
default_images
,
180
,
240
)
:
''
,
alt
:
it
.
product_name
,
price
:
'¥'
+
transPrice
(
it
.
sales_price
),
marketPrice
:
transPrice
(
it
.
market_price
)
==
=
transPrice
(
it
.
sales_price
)
?
marketPrice
:
transPrice
(
it
.
market_price
)
<
=
transPrice
(
it
.
sales_price
)
?
false
:
(
'¥'
+
transPrice
(
it
.
market_price
))
};
...
...
config/cache.js
View file @
84c2670
...
...
@@ -26,7 +26,7 @@ const cachePage = {
'/guang/tags/index'
:
1
*
MINUTE
,
// 领券中心
'/coupon/
index
'
:
5
*
MINUTE
,
'/coupon/'
:
5
*
MINUTE
,
// 商品列表
// '/product/list/index': 5 * MINUTE,
...
...
@@ -58,7 +58,7 @@ const cachePage = {
'/brands/plusstar'
:
5
*
MINUTE
,
'/^\\/special\\/(\\d+)_(.*)\\.html$/'
:
5
*
MINUTE
,
'/
\\/product\\/search\\/keyword(.*)/
'
:
7
*
DAY
'/
product/search/keyword/:id
'
:
7
*
DAY
};
...
...
Please
register
or
login
to post a comment