Closed LrainchenL closed 1 year ago
router app.js pages 在这样的页面配置下,使用Router.to*方法中间件的校验部分就不执行,而使用Router.navigate({ url: '/pages/archives/index', ext: { mustLogin: true } })就可以,不知道是不是有哪里配置错误,一直没有找到问题 Router.toArchives()只返回这个 Router.navigate方法就可以正常执行
router
app.js
pages
Router.to*
Router.navigate({ url: '/pages/archives/index', ext: { mustLogin: true } })
Router.toArchives()
Router.navigate
页面下的路由配置文件不支持 .js,只支持 .ts,把 route.config.js 改成 route.config.ts 就行了
router
app.js
pages
在这样的页面配置下,使用Router.to*
方法中间件的校验部分就不执行,而使用Router.navigate({ url: '/pages/archives/index', ext: { mustLogin: true } })
就可以,不知道是不是有哪里配置错误,一直没有找到问题Router.toArchives()
只返回这个Router.navigate
方法就可以正常执行