I would like to ask how to get the routing object in api/index.js in nuxt, so as to realize the page jump when the interface is wrong.

    src
        api
            index.js

how to get the router object in index.js? Put it in middleware and feel that every time you switch pages, you follow the code of api. Something is wrong. Should it be realized?

Mar.22,2021
Menu