/** * Created by yanqing.yang on 2017/12/20. */ 'use strict'; const helpers = global.yoho.helpers; const TYPE = require('../type'); const handleStaticUrl = require(`${global.utils}/parameter`).fullParamToMinPath; module.exports = [ { type: TYPE.redirect, origin: req => { return !req.path || req.path === '/'; }, target: req => helpers.urlFormat(handleStaticUrl('/sale/special', req.query)) } ];