custom.js 798 Bytes
/**
 * 自定义频道, 临时方案,暂时写死
 */
'use strict';
const customModel = require('../models/custom');

exports.index = (req, res, next) => {
    let contentCode = req.params.id;

    if (!contentCode) {
        return next();
    }

    req.ctx(customModel).getResourceData(contentCode).then(result => {
        res.render('custom', {
            module: 'channel',
            page: 'custom',
            content: result,
            title: req.query.title || 'Yoho!Buy 有货'
        });
    }).catch(next);
};

exports.zhihui = (req, res) => {
    res.render('zhihui', {
        module: 'channel',
        page: 'custom',
        title: req.query.title || 'Yoho!Buy 有货',
        downloadLink: 'http://union.yoho.cn/union/downapp.html?union_type=100000000000081'
    });
};