...
|
...
|
@@ -38,7 +38,7 @@ exports.ensure = (req, res, next) => { |
|
|
sku_type: 'S',
|
|
|
uid
|
|
|
};
|
|
|
let skillData = yield seckillModel.skillData(skn); // 根据skn查活动信息
|
|
|
let skillData = yield req.ctx(seckillModel).skillData(skn); // 根据skn查活动信息
|
|
|
let view = {
|
|
|
orderEnsure: false,
|
|
|
message: ''
|
...
|
...
|
@@ -73,7 +73,7 @@ exports.ensure = (req, res, next) => { |
|
|
let orderComputerData;
|
|
|
|
|
|
if (orderInfo) {
|
|
|
orderComputerData = yield seckillModel.compute(_.assign(paymentOption, {
|
|
|
orderComputerData = yield req.ctx(seckillModel).compute(_.assign(paymentOption, {
|
|
|
delivery_way: orderInfo.deliveryId || 1,
|
|
|
payment_type: orderInfo.paymentType || 1,
|
|
|
use_yoho_coin: orderInfo.yohoCoin || 0
|
...
|
...
|
@@ -81,7 +81,7 @@ exports.ensure = (req, res, next) => { |
|
|
}
|
|
|
|
|
|
// 获取结算 数据
|
|
|
let paymentInfo = yield seckillModel.payment(paymentOption, orderInfo, orderComputerData.data);
|
|
|
let paymentInfo = yield req.ctx(seckillModel).payment(paymentOption, orderInfo, orderComputerData.data);
|
|
|
|
|
|
if (paymentInfo.code !== 200) {
|
|
|
view = {
|
...
|
...
|
@@ -148,7 +148,7 @@ exports.compute = (req, res, next) => { |
|
|
activity_id: activityId
|
|
|
};
|
|
|
|
|
|
return seckillModel.compute(options)
|
|
|
return req.ctx(seckillModel).compute(options)
|
|
|
.then(result => {
|
|
|
res.json(result.data);
|
|
|
})
|
...
|
...
|
@@ -230,7 +230,7 @@ exports.submit = (req, res, next) => { |
|
|
}
|
|
|
}
|
|
|
|
|
|
return seckillModel.submit(options)
|
|
|
return req.ctx(seckillModel).submit(options)
|
|
|
.then(result => {
|
|
|
res.clearCookie('order-info');
|
|
|
res.json(result);
|
...
|
...
|
|