方式一
import Vue from 'vue'
let token = Vue.ls.get(ACCESS_TOKEN)
console.log("token02: ",token)
方式二
import store from '@/store'
let token = store.getters.token
console.log("token01:",token)
结果如下:
方式三
import {getToken} from '@/utils/auth'
getToken()