help.js 1.28 KB
/**
 * 帮助中心
 * @author: shenzm<zhimin.shen@yoho.cn>
 * @date: 2016/08/02
 */
'use strict';

/**
 * 帮助中心
 */
const component = {
    index: (req, res) => {
        res.render('help', {
            module: 'me',
            page: 'help',
            noLocalJS: true,
            noLocalCSS: true,
            helpList: [{
                caption: '1',
                name: '购物流程'
            }, {
                caption: '2',
                name: '配送时间与范围'
            }, {
                caption: '3',
                name: '商品验收与签收'
            }, {
                caption: '4',
                name: '投诉与建议'
            }, {
                caption: '5',
                name: '退换货流程'
            }, {
                caption: '6',
                name: '退换货政策'
            }, {
                caption: '7',
                name: '支付方式'
            }]
        });
    },
    helpDetail: (req, res) => {
        const caption = req.query.caption;
        const data = {
            module: 'me',
            page: 'help',
            noLocalJS: true,
            noLocalCSS: true
        };

        data['helpDetail_' + caption] = true;
        res.render('helpDetail', data);
    }
};

module.exports = component;