...
|
...
|
@@ -44,7 +44,6 @@ const order = { |
|
|
let page = req.query.page;
|
|
|
let type = req.query.type;
|
|
|
let limit = req.query.limit;
|
|
|
let isEnd = true;
|
|
|
|
|
|
uid = testUid;
|
|
|
if (!uid && req.xhr) {
|
...
|
...
|
@@ -62,10 +61,7 @@ const order = { |
|
|
};
|
|
|
|
|
|
orderModel.getOrders(param).then(result => {
|
|
|
if (result && page < result.data.pageTotal) {
|
|
|
isEnd = false;
|
|
|
}
|
|
|
return res.json(Object.assign({isEnd: isEnd}, result));
|
|
|
return res.json(result);
|
|
|
});
|
|
|
},
|
|
|
getOrderDetailData: (req, res) => {
|
...
|
...
|
@@ -86,9 +82,9 @@ const order = { |
|
|
});
|
|
|
},
|
|
|
cancelOrder: (req, res) => {
|
|
|
let orderCode = req.query.orderCode;
|
|
|
let reasonId = req.query.reasonId;
|
|
|
let reason = req.query.reason;
|
|
|
let orderCode = req.body.orderCode;
|
|
|
let reasonId = req.body.reasonId;
|
|
|
let reason = req.body.reason;
|
|
|
|
|
|
orderModel.cancelOrder(orderCode, reasonId, reason).then(result => {
|
|
|
return res.json(result);
|
...
|
...
|
@@ -96,14 +92,14 @@ const order = { |
|
|
|
|
|
},
|
|
|
confirmOrder: (req, res) => {
|
|
|
let orderode = req.query.orderCode;
|
|
|
let orderode = req.body.orderCode;
|
|
|
|
|
|
orderModel.confirmOrder(orderode).then(result => {
|
|
|
return res.json(result);
|
|
|
});
|
|
|
},
|
|
|
deleteOrder: (req, res) => {
|
|
|
let orderCode = req.query.orderCode;
|
|
|
let orderCode = req.body.orderCode;
|
|
|
let uid = req.user.uid;
|
|
|
|
|
|
uid = testUid; // 测试uid
|
...
|
...
|
@@ -125,7 +121,6 @@ const order = { |
|
|
uid = testUid;
|
|
|
|
|
|
orderModel.getCoins(uid).then(result => {
|
|
|
// console.log(result)
|
|
|
res.render('coin', {
|
|
|
module: 'home',
|
|
|
page: 'coin',
|
...
|
...
|
@@ -144,7 +139,6 @@ const order = { |
|
|
let uid = req.user.id;
|
|
|
let page = req.query.page;
|
|
|
let limit = req.query.limit;
|
|
|
let isend = true;
|
|
|
|
|
|
uid = testUid;
|
|
|
if (!uid && req.xhr) {
|
...
|
...
|
@@ -155,10 +149,7 @@ const order = { |
|
|
}
|
|
|
|
|
|
orderModel.getCoinDetail(uid, page, limit).then(result => {
|
|
|
if (result && page < result.page_total) {
|
|
|
isend = false;
|
|
|
}
|
|
|
return res.json(Object.assign({isEnd: isend}, result));
|
|
|
return res.json(result);
|
|
|
});
|
|
|
},
|
|
|
|
...
|
...
|
|