在项目中引入koa2-history-api-fallback并使用 const history = require('koa2-history-api-fallback') app.use(history())