searchWords.js 2.14 KB
/**
 * Created by wangqianjun on 16/2/3.
 */

//接口主域
exports.domain = require('../config/common.js').domain;
//路由配置
exports.res = [
    {
        //搜索词页面渲染
        route: '/operations/terms/index',
        method: 'GET',
        view: 'pages/searchWords/index',
        src: '/searchWords/index',
        data: {
            filter: true
        }
    },
    //搜索词列表
    {
        route: '/operation/terms/searchWordsList',
        method: 'POST',
        url: '/searchWords/querySearchWords',
        params: [
            {name: 'page', type: 'Number', def: '1'},
            {name: 'size', type: 'Number', def: '10'},
            {name: 'type', type: 'Number'},
            {name: 'channelIds', type: 'String'},
            {name: 'startTime', type: 'String'},
            {name: 'endTime', type: 'String'},
            {name: 'content', type: 'String'},
            {name: 'status', type: 'Number'}
        ]
    },

    {
        //添加搜索词
        route: '/operations/terms/add',
        method: 'POST',
        url: '/searchWords/addSearchWords',
        params: [
            {name: 'type', type: 'Number'},
            {name: 'content', type: 'String'},
            {name: 'channelIds', type: 'String'},
            {name: 'url', type: 'String'},
            {name: 'startTime', type: 'String'},
            {name: 'endTime', type: 'String'},
            {name: 'goodsNum', type: 'Number'},
            {name: 'sort', type: 'Number'}
        ]
    },
    {
        //搜索词修改
        route: '/operations/terms/modify',
        method: 'POST',
        url: '/searchWords/updateSearchWords',
        params: [
            {name: 'id', type: 'Number'},
            {name: 'type', type: 'Number'},
            {name: 'content', type: 'String'},
            {name: 'channelIds', type: 'String'},
            {name: 'url', type: 'String'},
            {name: 'startTime', type: 'String'},
            {name: 'endTime', type: 'String'},
            {name: 'content', type: 'String'},
            {name: 'goodsNum', type: 'Number'},
            {name: 'sort', type: 'Number'},
            {name: 'status', type: 'Number'}
        ]
    }
];