How to implement jump routing by public methods in vue

now it will be encapsulated in a js file. Axios wants to uniformly handle the status of the query here. Permission handling (for example, jump to the login page without permission and modify the status in store). How can I call a method like this.$route this.$store

in this public js file?

I think some projects of others have created another instance in the public method

const vue = new Vue({
    store,
    router
});

Jump and change are implemented through vue.$store vue.$route, which is equivalent to creating two new vue objects. Why can you do this

is there any other way

Mar.22,2021

main.js

  

have you solved it?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bed00f-312be.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bed00f-312be.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?