Showing
1 changed file
with
17 additions
and
12 deletions
@@ -85,20 +85,25 @@ exports.couponSend = (req, res, next) => { | @@ -85,20 +85,25 @@ exports.couponSend = (req, res, next) => { | ||
85 | } | 85 | } |
86 | 86 | ||
87 | // 接口要加 session 校验,跨域异步请求未添加相关参数 | 87 | // 接口要加 session 校验,跨域异步请求未添加相关参数 |
88 | - if (req.yoho.isApp) { | ||
89 | - if (app.app_version && app.client_type && app.session_key && app.uid) { | ||
90 | - uid = { | ||
91 | - toString: () => { | ||
92 | - return _.parseInt(app.uid); | ||
93 | - }, | ||
94 | - sessionKey: app.session_key, | ||
95 | - appVersion: app.app_version, | ||
96 | - appSessionType: app.client_type | ||
97 | - }; | ||
98 | - } | ||
99 | - } | 88 | + // if (req.yoho.isApp) { |
89 | + // if (app.app_version && app.client_type && app.session_key && app.uid) { | ||
90 | + // uid = { | ||
91 | + // toString: () => { | ||
92 | + // return _.parseInt(app.uid); | ||
93 | + // }, | ||
94 | + // sessionKey: app.session_key, | ||
95 | + // appVersion: app.app_version, | ||
96 | + // appSessionType: app.client_type | ||
97 | + // }; | ||
98 | + // } | ||
99 | + // } | ||
100 | 100 | ||
101 | model.couponSend(uid, token, app).then(result => { | 101 | model.couponSend(uid, token, app).then(result => { |
102 | + res.set({ | ||
103 | + 'Cache-Control': 'no-cache', | ||
104 | + Pragma: 'no-cache', | ||
105 | + Expires: (new Date(1900, 0, 1, 0, 0, 0, 0)).toUTCString() | ||
106 | + }); | ||
102 | res.jsonp(result); | 107 | res.jsonp(result); |
103 | }).catch(next); | 108 | }).catch(next); |
104 | }; | 109 | }; |
-
Please register or login to post a comment