| | |
| | | // 引入css |
| | | import "@/assets/iconfont/iconfont.css"; |
| | | import "@/assets/iconfont/iconfont.ttf"; |
| | | import { getUserInfodata } from "./axios/api"; |
| | | |
| | | import { mapActions } from "vuex"; |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | }, |
| | | 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) { |
| | |
| | | }; |
| | | }, |
| | | 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); |
| | | }, |