方式一 import store from '@/store' import router from '@/router' async function logout() { await store.dispatch('user/logout') let autoLogin =