Administrator
2022-01-04 bae717f19ea1d2464dc6d55011187a862749c552
src/views/wel/index.vue
@@ -3,6 +3,8 @@
    <div class="homeL-up">
      <span class="h1">保安服务企业管理平台</span>
      <span class="h2">Security service enterprise management platform</span>
      <!-- <img class="img" src="../../static/img/permit/服务许可背景图.png"/> -->
      <img class="img" :src="img" v-if="isImg"/>
    </div>
    <div class="homeL-bar">
      <div
@@ -39,11 +41,14 @@
<script>
import website from "@/config/website";
import { getDetails } from "@/api/resource/attach";
import { mapGetters } from "vuex";
export default {
  data() {
    return {
      usedata: {},
      img:"",
      isImg:false,
    };
  },
  mounted() {
@@ -59,6 +64,25 @@
  },
  computed: {
    ...mapGetters(["userInfo"]),
  },
  created(){
    //获取二维码图片
    // if(this.userInfo.role_name == "公安管理员" || this.userInfo.role_name == "administrator"){
    //   this.isImg = true;
    //   //查询图片
    //   getDetails(10).then((res) => {
    //     const att = res.data.data;
    //     this.img = att.link;
    //   });
    // }
    if(this.userInfo.role_name == "administrator"){
      this.isImg = true;
      //查询图片
      getDetails(10).then((res) => {
        const att = res.data.data;
        this.img = att.link;
      });
    }
  },
  methods: {
    down(path) {
@@ -99,6 +123,13 @@
    .h2 {
      font-size: 28px;
    }
    .img{
      width:100px;
      position:relative;
      position: absolute;
      right: 1.5rem;
      top: 4rem;
    }
  }
  .homeL-bar {
    width: 100%;