重定向
重定向需要用到 router.route('*')
import SMERouter from 'sme-router'
const router = new SMERouter('router-view')
router.route('/index', (req, res, next) => {
res.render('hallo world')
})
router.route('*', (req, res, next) => {
res.redirect('/index')
})
router.go('/other') // will be redirected to /index