currency.js 631 Bytes
/**
 * 个人中心二维码 controller
 * @author: weiqingting<qingting.wei@yoho.cn>
 * @date: 2016/05/16
 */
'use strict';

const Promise = require('bluebird');
const co = Promise.coroutine;

const currencyModel = require('../models/currency-model');
const moment = require('moment');

const convertUnitTime = (src) => {
    return moment.unix(src).format('YYYY-MM-DD');
};

const index = (req, res, next)=>{
    let uid = '8041246';

    currencyModel.currencyData(uid, req.query).then(result => {
        res.render('currency', {
            content: result
        });
    }).catch(next);

};

module.exports = {
    index
};