about.js 1.66 KB
'use strict';
const headerModel = require('../../../doraemon/models/header');

let responseData = {
    module: 'about',
    page: 'about'
};

/**
 * 关于有货
 */
const yohobuy = (req, res, next) => {
    let channel = req.cookies._Channel || 'boys';

    headerModel.requestHeaderData(channel).then(result => {
        responseData.headerData = result.headerData;

        res.render('yohobuy', responseData);
    }).catch(next);
};

/**
 * 新力传媒
 */
const newpower = (req, res, next) => {
    let channel = req.cookies._Channel || 'boys';

    headerModel.requestHeaderData(channel).then(result => {
        responseData.headerData = result.headerData;

        res.render('newpower', responseData);
    }).catch(next);
};

/**
 * 联系我们
 */
const contact = (req, res, next) => {
    let channel = req.cookies._Channel || 'boys';

    headerModel.requestHeaderData(channel).then(result => {
        responseData.headerData = result.headerData;

        res.render('contact', responseData);
    }).catch(next);
};

/**
 * 隐私条款
 */
const privacy = (req, res, next) => {
    let channel = req.cookies._Channel || 'boys';

    headerModel.requestHeaderData(channel).then(result => {
        responseData.headerData = result.headerData;

        res.render('privacy', responseData);
    }).catch(next);
};

/**
 * 友情链接
 */
const link = (req, res, next) => {
    let channel = req.cookies._Channel || 'boys';

    headerModel.requestHeaderData(channel).then(result => {
        responseData.headerData = result.headerData;

        res.render('link', responseData);
    }).catch(next);
};

module.exports = {
    yohobuy,
    newpower,
    contact,
    privacy,
    link
};