zzzz
2024-04-09 19061b17591c3a2310348033eb51194f5a9a4527
src/App.vue
@@ -40,7 +40,8 @@
// 引入css
import "@/assets/iconfont/iconfont.css";
import "@/assets/iconfont/iconfont.ttf";
import { getUserInfodata } from "./axios/api";
import { mapActions } from "vuex";
export default {
  components: {
@@ -50,9 +51,8 @@
  },
  name: "App",
  created() {
    this.getUserInfo();
    this.setUseInfo();
    this.$state.theme = "red";
    console.log(this.$state.theme, "asdasdasd");
    let title = this.$route.meta.title || this.$t("hj224");
    this.title = title;
    if (this.$route.meta.is_Show) {
@@ -108,21 +108,8 @@
    };
  },
  methods: {
    async getUserInfo() {
      // 获取用户信息
      //   let showcookie = this.getCookie('USER_TOKEN');
      let data = await getUserInfodata();
      if (data.status === 0) {
        // this.getProductSetting()
        this.$store.state.userInfo = data.data;
      } else {
        this.$store.commit("elAlertShow", {
          elAlertShow: true,
          elAlertText: data.msg,
        });
      }
      this.$store.state.user = this.user;
    },
    ...mapActions(["setUseInfo"]),
    footColse() {
      this.$store.commit("dialogVisible", true);
    },