...
|
...
|
@@ -85,20 +85,25 @@ exports.couponSend = (req, res, next) => { |
|
|
}
|
|
|
|
|
|
// 接口要加 session 校验,跨域异步请求未添加相关参数
|
|
|
if (req.yoho.isApp) {
|
|
|
if (app.app_version && app.client_type && app.session_key && app.uid) {
|
|
|
uid = {
|
|
|
toString: () => {
|
|
|
return _.parseInt(app.uid);
|
|
|
},
|
|
|
sessionKey: app.session_key,
|
|
|
appVersion: app.app_version,
|
|
|
appSessionType: app.client_type
|
|
|
};
|
|
|
}
|
|
|
}
|
|
|
// if (req.yoho.isApp) {
|
|
|
// if (app.app_version && app.client_type && app.session_key && app.uid) {
|
|
|
// uid = {
|
|
|
// toString: () => {
|
|
|
// return _.parseInt(app.uid);
|
|
|
// },
|
|
|
// sessionKey: app.session_key,
|
|
|
// appVersion: app.app_version,
|
|
|
// appSessionType: app.client_type
|
|
|
// };
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
model.couponSend(uid, token, app).then(result => {
|
|
|
res.set({
|
|
|
'Cache-Control': 'no-cache',
|
|
|
Pragma: 'no-cache',
|
|
|
Expires: (new Date(1900, 0, 1, 0, 0, 0, 0)).toUTCString()
|
|
|
});
|
|
|
res.jsonp(result);
|
|
|
}).catch(next);
|
|
|
}; |
...
|
...
|
|