|
@@ -71,6 +71,7 @@ exports.bottombar = function(req, res, next) { |
|
@@ -71,6 +71,7 @@ exports.bottombar = function(req, res, next) { |
71
|
*/
|
71
|
*/
|
72
|
exports.couponSend = (req, res, next) => {
|
72
|
exports.couponSend = (req, res, next) => {
|
73
|
let token = req.query.token || '',
|
73
|
let token = req.query.token || '',
|
|
|
74
|
+ coupontype = req.query.coupontype,
|
74
|
uid = req.user.uid,
|
75
|
uid = req.user.uid,
|
75
|
app = req.query.app || {};
|
76
|
app = req.query.app || {};
|
76
|
|
77
|
|
|
@@ -100,8 +101,11 @@ exports.couponSend = (req, res, next) => { |
|
@@ -100,8 +101,11 @@ exports.couponSend = (req, res, next) => { |
100
|
if (uid === '' || uid === 0 || token === '' || token === 0) {
|
101
|
if (uid === '' || uid === 0 || token === '' || token === 0) {
|
101
|
return res.jsonp(resultData);
|
102
|
return res.jsonp(resultData);
|
102
|
}
|
103
|
}
|
|
|
104
|
+ const promise = coupontype === 'ufo' ?
|
|
|
105
|
+ req.ctx(model).couponSendUFO(uid, token) :
|
|
|
106
|
+ req.ctx(model).couponSend(uid, token);
|
103
|
|
107
|
|
104
|
- req.ctx(model).couponSend(uid, token).then(result => {
|
108
|
+ promise.then(result => {
|
105
|
res.set({
|
109
|
res.set({
|
106
|
'Cache-Control': 'no-cache',
|
110
|
'Cache-Control': 'no-cache',
|
107
|
Pragma: 'no-cache',
|
111
|
Pragma: 'no-cache',
|