ZZJ
2021-11-16 4cae7b89b60956e6c23e4c6e7a9e5a7b76927c53
src/pages/desktop/index/App.vue
@@ -28,7 +28,7 @@
  data() {
    return {
      buttonAuthority: sessionStorage.getItem('buttonAuthoritys') || [],
      defaultBgUrl:"/images/desktop/background.png"
      // defaultBgUrl:"/images/desktop/background.png"
    }
  },
  computed: {
@@ -43,12 +43,13 @@
        )
      }
      return false
    },
    defaultBgUrl(){
      return JSON.parse(sessionStorage.getItem('userInfo')).backgroundpic
    }
  },
  mounted() {
    // document.getElementById('app').style.backgroundImage = process.env.VUE_APP_MAIN_URL;
    const url = localStorage.getItem("backgroundPic")
    document.getElementById('app').style.backgroundImage = `url(${url||this.defaultBgUrl})`
    document.getElementById('app').style.backgroundImage = `url(${this.defaultBgUrl})`
    this.showApps();
    let _that = this;
    let msgResp = require("./mock/messages.json")
@@ -93,8 +94,6 @@
    },
    onChangeBg(v){
       document.getElementById('app').style.backgroundImage = "url(" + v + ")"
       this.defaultBgUrl = v
      localStorage.setItem("backgroundPic", v)
    },
    showApps() {
      let _that = this;