Sometimes in a vue project, ordinary js files need to call some public methods, but our public methods are all mounted on the vue prototype object,
which can be called directly in the vue file,
but calling directly in the js file will display undefined
Solution: In the js file 1. Introduce Vue 2. Instantiate Vue 3. Call the method from the prototype object
//引入vue
import Vue from "vue"
//必须实例化
var vm = new Vue()
//调用方法
vm.$getSlyTokenStatus()