index.js 1.11 KB
/**
 * 个人中心二维码 controller
 * @author: chengyao.guo<chengyao.guo@yoho.cn>
 * @date: 2016/08/10
 */

'use strict';

const indexModel = require('../models/index');

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

    indexModel.index(params).then(result => {
        if (result) {
            console.log(result);
            res.render('index', result);
        }
    }).catch(next);

    // res.render('index', {
    //     myIndexPage: 1,
    //     showDownloadApp: 1,
    //     navHome: 1,
    //     notice: [],
    //     pageFooter: 1,
    //     cartUrl: '//m.dev.yohobuy.com/cart/index/index',
    //     signinUrl: '//m.dev.yohobuy.com/signin.html?refer=%2F%2Fm.dev.yohobuy.com%2Fhome',
    //     isLogin: 1,
    //     wait_pay_num: 0,
    //     wait_cargo_num: 0,
    //     send_cargo_num: 0,
    //     brand_favorite_total: 0,
    //     product_favorite_total: 0,
    //     inbox_total: 0,
    //     comment_total: 0,
    //     refund_exchange_num: 0,
    //     yoho_coin_num: 0,
    //     coupon_num: 0,
    //     product_browse: 0
    // });
};