orderDetail.js 873 Bytes
/**
 * 个人中心 controller
 * @author: chengyao.guo<chengyao.guo@yoho.cn>
 * @date: 2016/08/10
 */

'use strict';

const headerModel = require('../../../doraemon/models/header'); // 头部model
const orderDetailModel = require('../models/orderDetail');

exports.orderDetail = (req, res, next) => {
    let params = {
        uid: req.user.uid || 6228593
    };

    let headerData = headerModel.setNav({
        navTitle: '订单详情'
    });

    orderDetailModel.orderDetail(params).then(result => {
        if (result) {
            res.render('orderDetail', Object.assign(result, {
                isLogin: params.uid ? true : false,
                module: 'home',
                page: 'index',
                title: 'Yoho!Buy 有货',
                pageHeader: headerData,
                pageFooter: true
            }));
        }
    }).catch(next);

};