Showing
3 changed files
with
13 additions
and
4 deletions
@@ -171,7 +171,8 @@ class BuyNowController { | @@ -171,7 +171,8 @@ class BuyNowController { | ||
171 | product_sku_list: req.body.product_sku_list, | 171 | product_sku_list: req.body.product_sku_list, |
172 | is_print_price: req.body.is_print_price, | 172 | is_print_price: req.body.is_print_price, |
173 | remark: req.body.remark, | 173 | remark: req.body.remark, |
174 | - activity_id: req.body.activity_id | 174 | + activity_id: req.body.activity_id, |
175 | + ip: req.yoho.clientIp | ||
175 | }; | 176 | }; |
176 | 177 | ||
177 | // 是否开发票 | 178 | // 是否开发票 |
@@ -188,7 +189,10 @@ class BuyNowController { | @@ -188,7 +189,10 @@ class BuyNowController { | ||
188 | } | 189 | } |
189 | 190 | ||
190 | if (req.cookies.mkt_code || req.cookies._QYH_UNION) { | 191 | if (req.cookies.mkt_code || req.cookies._QYH_UNION) { |
191 | - params.qhy_union = paymentProcess.unionInfoHandle(req.cookies, uid); | 192 | + let unionInfo = paymentProcess.unionInfoHandle(req.cookies, uid); |
193 | + | ||
194 | + params.qhy_union = _.get(unionInfo, 'unionKey', false); | ||
195 | + params.userAgent = _.get(unionInfo, 'userAgent', ''); | ||
192 | } | 196 | } |
193 | 197 | ||
194 | co(function * () { | 198 | co(function * () { |
@@ -231,7 +231,7 @@ exports.orderSub = (req, res, next) => { | @@ -231,7 +231,7 @@ exports.orderSub = (req, res, next) => { | ||
231 | unionKey: unionInfo.unionKey, // 友盟数据 | 231 | unionKey: unionInfo.unionKey, // 友盟数据 |
232 | userAgent: unionInfo.userAgent, | 232 | userAgent: unionInfo.userAgent, |
233 | isWechat: req.yoho.isWechat, | 233 | isWechat: req.yoho.isWechat, |
234 | - ip: req.ip || '', | 234 | + ip: req.yoho.clientIp, |
235 | udid: req.cookies._yasvd || 'yoho' | 235 | udid: req.cookies._yasvd || 'yoho' |
236 | }; | 236 | }; |
237 | 237 |
@@ -163,7 +163,12 @@ class BuyNowModel extends global.yoho.BaseModel { | @@ -163,7 +163,12 @@ class BuyNowModel extends global.yoho.BaseModel { | ||
163 | finalParams.qhy_union = params.qhy_union; | 163 | finalParams.qhy_union = params.qhy_union; |
164 | } | 164 | } |
165 | 165 | ||
166 | - return api.post('', finalParams, {cache: false}); | 166 | + return api.post('', finalParams, { |
167 | + headers: { | ||
168 | + 'X-Forwarded-For': params.ip || '', | ||
169 | + 'User-Agent': params.userAgent | ||
170 | + } | ||
171 | + }); | ||
167 | } | 172 | } |
168 | 173 | ||
169 | /** | 174 | /** |
-
Please register or login to post a comment