Showing
1 changed file
with
5 additions
and
1 deletions
@@ -150,8 +150,12 @@ const wechatShare = { | @@ -150,8 +150,12 @@ const wechatShare = { | ||
150 | }) | 150 | }) |
151 | .then(result => { | 151 | .then(result => { |
152 | let calc_res = calcSigature(result); | 152 | let calc_res = calcSigature(result); |
153 | + if (req.query.callback) { | ||
154 | + return res.jsonp(calc_res); | ||
155 | + } else { | ||
156 | + return res.json(calc_res); | ||
157 | + } | ||
153 | 158 | ||
154 | - res.jsonp(calc_res); | ||
155 | }).catch(next); | 159 | }).catch(next); |
156 | } | 160 | } |
157 | }; | 161 | }; |
-
Please register or login to post a comment