import jwt_decode from "jwt-decode";
export default {
  name: "app",
  created() {
    if (localStorage.jwtToken) {
      const decode = jwt_decode(localStorage.jwtToken);
      this.$store.dispatch("setIsAuted", !this.isEmpty(decode));
      this.$store.dispatch("setUser", decode);
    }
  },
复制代码
Logo

前往低代码交流专区

更多推荐