import store from "@/store";
import router from "@/router";
store.commit("DEL_TOKEN");
router.replace({
path: "/login",
query: {
redirect: router.currentRouter.fullPath,
},
});
//上面是你的处理,
store.commit("DEL_TOKEN");
commit提交难道不是应该在actions里面的方法提交的吗?这样也能提交mutations吗?
为何不直接使用你store.dispatch("user/loginOut");这个方法呢?
萌新不懂为何你这样处理,求告知啊