search-api.js 448 Bytes
/**
 * Models-api
 * @author: gxh<xuhui.ge@yoho.cn>
 * @date: 2017/02/28
 */

'use strict';
const _ = require('lodash');
const md5 = require('md5');

const api = global.yoho.API;
const config = global.yoho.config;

const getSuggest = (params) => {
    let finalParams = {
        method: 'app.search.fuzzy',
        keyword: params.keyword || ''
    };

    return api.get('', finalParams, config.apiCache);
};
module.exports = {
    getSuggest
};