...
|
...
|
@@ -15,7 +15,7 @@ const orderModel = require('../models/order'); |
|
|
const index = (req, res) => {
|
|
|
const type = req.query.type;
|
|
|
const page = req.query.page;
|
|
|
const uid = global.yoho.uid || '13549567';
|
|
|
const uid = req.user.uid || '13549567';
|
|
|
|
|
|
orderModel.getOrderData(uid, type, page).then(result => {
|
|
|
res.display('index', {
|
...
|
...
|
@@ -32,7 +32,7 @@ const index = (req, res) => { |
|
|
|
|
|
const detail = (req, res) => {
|
|
|
const code = req.query.code;
|
|
|
const uid = global.yoho.uid || '7394907';
|
|
|
const uid = req.user.uid || '7394907';
|
|
|
|
|
|
orderModel.getOrderDetail(uid, code).then(result => {
|
|
|
res.display('index', {
|
...
|
...
|
@@ -50,7 +50,7 @@ const detail = (req, res) => { |
|
|
const getOrderList = (req, res) => {
|
|
|
const type = req.query.type;
|
|
|
const page = req.query.page;
|
|
|
const uid = global.yoho.uid || '7394907';
|
|
|
const uid = req.user.uid || '7394907';
|
|
|
|
|
|
orderModel.getOrderData(uid, type, page).then(result => {
|
|
|
res.display('order-table', {
|
...
|
...
|
@@ -65,7 +65,7 @@ const getOrderList = (req, res) => { |
|
|
|
|
|
const getOrderTotal = (req, res) => {
|
|
|
const type = req.query.type;
|
|
|
const uid = global.yoho.uid || '7394907';
|
|
|
const uid = req.user.uid || '7394907';
|
|
|
|
|
|
|
|
|
orderModel.getOrderData(uid, type).then(result => {
|
...
|
...
|
@@ -78,7 +78,7 @@ const getOrderTotal = (req, res) => { |
|
|
};
|
|
|
|
|
|
const cancelOrder = (req, res) => {
|
|
|
const uid = global.yoho.uid || '7394907';
|
|
|
const uid = req.user.uid || '7394907';
|
|
|
const code = req.query.orderCode;
|
|
|
|
|
|
orderModel.cancelOrder(uid, code).then(result => {
|
...
|
...
|
@@ -87,7 +87,7 @@ const cancelOrder = (req, res) => { |
|
|
};
|
|
|
|
|
|
const deleteOrder = (req, res) => {
|
|
|
const uid = global.yoho.uid || '7394907';
|
|
|
const uid = req.user.uid || '7394907';
|
|
|
const code = req.query.orderCode;
|
|
|
|
|
|
orderModel.deleteOrder(uid, code).then(result => {
|
...
|
...
|
@@ -96,7 +96,7 @@ const deleteOrder = (req, res) => { |
|
|
};
|
|
|
|
|
|
const getExpressInfo = (req, res) => {
|
|
|
const uid = global.yoho.uid || '7394907';
|
|
|
const uid = req.user.uid || '7394907';
|
|
|
const code = req.query.orderCode;
|
|
|
|
|
|
orderModel.getExpressInfo(uid, code).then(result => {
|
...
|
...
|
@@ -111,7 +111,7 @@ const getCancelOrderReason = (req, res) => { |
|
|
};
|
|
|
|
|
|
const editOrder = (req, res) => {
|
|
|
const uid = global.yoho.uid || '7394907';
|
|
|
const uid = req.user.uid || '7394907';
|
|
|
const query = req.query;
|
|
|
|
|
|
query.uid = uid;
|
...
|
...
|
|