Authored by ccbikai(👎🏻🍜)

领券支持 jsonp

@@ -76,7 +76,7 @@ exports.receive = (req, res, next) => { @@ -76,7 +76,7 @@ exports.receive = (req, res, next) => {
76 } 76 }
77 77
78 if (!uid) { 78 if (!uid) {
79 - return res.json({ 79 + return res.jsonp({
80 code: 400, 80 code: 400,
81 message: '抱歉,您暂未登录!' 81 message: '抱歉,您暂未登录!'
82 }); 82 });
@@ -85,6 +85,6 @@ exports.receive = (req, res, next) => { @@ -85,6 +85,6 @@ exports.receive = (req, res, next) => {
85 model.receiveCoupon({ 85 model.receiveCoupon({
86 couponID: req.query.couponID 86 couponID: req.query.couponID
87 }, uid).then(result => { 87 }, uid).then(result => {
88 - res.json(result); 88 + res.jsonp(result);
89 }).catch(next); 89 }).catch(next);
90 }; 90 };