complaints.js
420 Bytes
/**
* 我的投诉controller
* @author: yyq<yanqing.yang@yoho.cn>
* @date: 2016/8/18
*/
'use strict';
const complaints = require('../models/complaints');
const index = (req, res, next) => {
let uid = req.user.uid;
let page = req.query.page || 1;
complaints.getComplaintsList(uid, page).then(result => {
res.render('complaints', result);
}).catch(next);
};
module.exports = {
index
};