Blame view

apps/home/controllers/currency.js 457 Bytes
weiqingting authored
1
/**
hongweigao authored
2
 * 个人中心我的有货币 controller
weiqingting authored
3 4 5
 * @author: weiqingting<qingting.wei@yoho.cn>
 * @date: 2016/05/16
 */
weiqingting authored
6
'use strict';
hongweigao authored
7
const currencyModel = require('../models/currency-model');
weiqingting authored
8
htoooth authored
9
const index = (req, res, next)=>{
hongweigao authored
10
    let uid = req.user.uid;
hongweigao authored
11
OF1706 authored
12
    req.ctx(currencyModel).currencyData(uid, req.query).then(result => {
htoooth authored
13
        res.render('currency', {
hongweigao authored
14
            content: result
weiqingting authored
15
        });
hongweigao authored
16 17
    }).catch(next);
htoooth authored
18
};
weiqingting authored
19
htoooth authored
20
module.exports = {
weiqingting authored
21
    index
htoooth authored
22
};