From 19061b17591c3a2310348033eb51194f5a9a4527 Mon Sep 17 00:00:00 2001
From: zzzz <690498789@qq.com>
Date: Tue, 09 Apr 2024 11:40:10 +0800
Subject: [PATCH] first commit

---
 src/App.vue |   23 +++++------------------
 1 files changed, 5 insertions(+), 18 deletions(-)

diff --git a/src/App.vue b/src/App.vue
index 3b9ab13..c49c629 100644
--- a/src/App.vue
+++ b/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);
     },

--
Gitblit v1.9.3