/** * 个人中心---我的推广 * @author yyq <yanqing.yang@yoho.cn> */ 'use strict'; const spreadModel = require('../models/spread'); exports.index = (req, res, next) => {
req.ctx(spreadModel).getIndexData(req.user.uid, req.query.page).then(result => {
res.render('spread', { page: 'spread', spread: result }); }).catch(next); };
exports.updateword = (req, res, next) => { req.ctx(spreadModel).updateTrendWord(req.user.uid, req.body.word).then(result => { res.send(result); }).catch(next); };