vip.js 888 Bytes
/**
 * [个人中心]我的VIP
 * @author: wsl(shuiling.wang@yoho.cn)
 * @date: 2017/03/13
 */

'use strict';
const mcHandler = require('../models/menu-crumb-handler');
const vipModel = require('../models/vip');

const index = (req, res, next) => {
    let uid = req.user.uid;

    Promise.all([vipModel.vipIndex(uid), mcHandler.getMeThumb()]).then(result => {
        const vipData = result[0];
        const thumb = result[1];

        res.display('index', {
            module: 'me',
            page: 'vip',
            isMe: true,
            content: {
                nav: mcHandler.getMeCrumb('我的VIP'),
                navigation: mcHandler.getSideMenu('我的VIP'),
                banner: thumb,
                vip: true,
                title: '我的VIP',
                vipData: vipData
            }
        });
    }).catch(next);
};

module.exports = {
    index
};