Authored by 陈峰

模糊搜索接口增加physical_channel字段

... ... @@ -5,11 +5,13 @@
*/
'use strict';
const utils = '../../../utils';
const mRoot = '../models';
const headerModel = require('../../../doraemon/models/header');
const searchModel = require(`${mRoot}/search`);
const _ = require('lodash');
const helpers = global.yoho.helpers;
const searchProcess = require(`${utils}/search-process`);
/**
* 搜索落地页
... ... @@ -30,6 +32,7 @@ const list = (req, res, next) => {
}
params.isApp = req.yoho.isApp;
params.physical_channel = req.yoho.channel && searchProcess.getChannelType(req.yoho.channel);
return searchModel.searchKeyActivity(params.query || '').then(activityResult => {
let activity = _.get(activityResult, 'urlobj.appUrl', '');
... ...
... ... @@ -88,4 +88,7 @@
{{#if students}}
<input class="query-param" type="hidden" data-attr="students" value="{{students}}">
{{/if}}
{{#if physical_channel}}
<input class="query-param" type="hidden" data-attr="physical_channel" value="{{physical_channel}}">
{{/if}}
\ No newline at end of file
... ...