...
|
...
|
@@ -12,8 +12,8 @@ const BAD_REQUEST = '非法请求'; |
|
|
const SLAT = 'yohobuyseckill98';
|
|
|
|
|
|
exports.ensure = (req, res, next) => {
|
|
|
const sku = Number.parseInt(req.query.sku, 10);
|
|
|
const skn = Number.parseInt(req.query.skn, 10);
|
|
|
const sku = parseInt(req.query.sku, 10);
|
|
|
const skn = parseInt(req.query.skn, 10);
|
|
|
const uid = req.user.uid;
|
|
|
let activityId;
|
|
|
|
...
|
...
|
@@ -116,7 +116,7 @@ exports.ensure = (req, res, next) => { |
|
|
exports.compute = (req, res, next) => {
|
|
|
const uid = req.user.uid,
|
|
|
sku = req.body.sku,
|
|
|
paymentType = Number.parseInt(req.body.paymentType || 1, 10),
|
|
|
paymentType = parseInt(req.body.paymentType || 1, 10),
|
|
|
activityId = req.body.activityId;
|
|
|
|
|
|
if (!req.xhr) {
|
...
|
...
|
@@ -155,10 +155,10 @@ exports.submit = (req, res, next) => { |
|
|
const uid = req.user.uid,
|
|
|
sku = req.body.sku,
|
|
|
activityId = req.body.activityId,
|
|
|
deliveryTime = Number.parseInt(req.body.deliveryTime, 10),
|
|
|
deliveryWay = Number.parseInt(req.body.deliveryWay, 10),
|
|
|
paymentId = Number.parseInt(req.body.paymentId, 10),
|
|
|
paymentType = Number.parseInt(req.body.paymentType, 10),
|
|
|
deliveryTime = parseInt(req.body.deliveryTime, 10),
|
|
|
deliveryWay = parseInt(req.body.deliveryWay, 10),
|
|
|
paymentId = parseInt(req.body.paymentId, 10),
|
|
|
paymentType = parseInt(req.body.paymentType, 10),
|
|
|
token = req.body.cartToken;
|
|
|
|
|
|
let addressId = req.body.addressId || '';
|
...
|
...
|
@@ -176,7 +176,7 @@ exports.submit = (req, res, next) => { |
|
|
if (!addressId) {
|
|
|
return res.json({code: 400, message: '请选择地址'});
|
|
|
} else {
|
|
|
addressId = Number.parseInt(crypto.decrypt(null, req.body.addressId), 10);
|
|
|
addressId = parseInt(crypto.decrypt(null, req.body.addressId), 10);
|
|
|
}
|
|
|
|
|
|
if ([uid, sku, activityId, addressId, deliveryTime,
|
...
|
...
|
@@ -193,7 +193,7 @@ exports.submit = (req, res, next) => { |
|
|
buy_number: 1,
|
|
|
invoices_title: req.body.invoicesTitle || '',
|
|
|
invoices_type_id: req.body.invoicesTypeId || '',
|
|
|
use_yoho_coin: Number.parseFloat(req.body.useYohoCoin) || 0,
|
|
|
use_yoho_coin: parseFloat(req.body.useYohoCoin) || 0,
|
|
|
remark: req.body.remark || '',
|
|
|
|
|
|
address_id: addressId,
|
...
|
...
|
|