Authored by 郝肖肖

解密订单号转数字

... ... @@ -141,14 +141,14 @@ const editOrder = (req, res, next) => {
const parameter = req.body;
parameter.uid = uid;
parameter.orderCode = crypto.decrypt(config.crypto.common, parameter.orderCode);
parameter.orderCode = parseInt(crypto.decrypt(config.crypto.common, parameter.orderCode), 10);
if (!parameter.uid || !parameter.orderCode) {
res.json({
code: '401',
message: '请输入合法订单号'
});
} else {
orderModel.editOrder(parameter).then(result => {
res.json(result);
}).catch(next);
... ...