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
6cf56fdb479bf1ff3dbe5c8fa487a685cfe93255
1 parent
13d83adc
coupon no cache, guang delete cache
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
apps/activity/controllers/coupon.js
apps/guang/models/index.js
apps/activity/controllers/coupon.js
View file @
6cf56fd
...
...
@@ -5,7 +5,7 @@
*/
'use strict'
;
const
_
=
require
(
'lodash'
);
const
couponModel
=
require
(
'../models/coupon'
);
exports
.
index
=
(
req
,
res
,
next
)
=>
{
...
...
@@ -15,6 +15,12 @@ exports.index = (req, res, next) => {
uid
:
req
.
user
.
uid
,
contentCode
:
req
.
query
.
contentCode
}).
then
(
result
=>
{
// 无结果不缓存
if
(
_
.
isEmpty
(
result
.
categories
))
{
res
.
set
(
'Cache-Control'
,
'no-cache'
);
}
res
.
render
(
'coupon'
,
Object
.
assign
({
module
:
'activity'
,
page
:
'coupon'
...
...
apps/guang/models/index.js
View file @
6cf56fd
...
...
@@ -948,7 +948,7 @@ const getDynamicDataByIds = (ids, udid, other) => {
});
}
return
serviceApi
.
get
(
'guang/api/*/article/getSimpleArticleList'
,
params
,
{
cache
:
true
}
);
return
serviceApi
.
get
(
'guang/api/*/article/getSimpleArticleList'
,
params
);
};
module
.
exports
=
{
...
...
Please
register
or
login
to post a comment