How to use vue routing in pure js files

1. Encapsulate a js file that intercepts the request status of axios. When the status code is 404, jump to the corresponding routing page. But how do you use routing in pure js, and how does the this in this.$router () point to the instance object of vue? Is it possible to introduce vue into the current file in new?
2,

js 

import Axios from "axios";
let axios_instance = Axios.create({
  ...
});
axios_instance.interceptors.response.use(response => {
  return response
}, err => {
  if (err && err.response) {
    switch (err.response.status) {
      case 404:
        //this.$router("/error");
        err.message = ",";
        break;
    }
  }
  return Promise.resolve(err.response)
});


you can import router in the js file, for example:

/* router.js */
import router from "../router";

import Axios from "axios";
let axios_instance = Axios.create({
  ...
});
axios_instance.interceptors.response.use(response => {
  return response
}, err => {
  if (err && err.response) {
    switch (err.response.status) {
      case 404:
      
        router.push('/error');
        
        err.message = ',';
        break;
    }
  }
  return Promise.resolve(err.response)
});
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-1e7bc66-4663e.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-1e7bc66-4663e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?