jinlin
2024-01-15 1a7af6fff5185bb257c16b0445140c93263a3331
web/src/views/layout/main.vue
@@ -88,21 +88,21 @@
    },
    methods: {
      async kwReplacement() {
        let res = await this.$http.get(`sys/dict/type/getDictMap`,{params:{dictType:"key_word"}})
        let res = await this.$http.get(`sys/dict/type/getDictMap`, {params: {dictType: "key_word"}})
        if (res.data != null) {
          this.$store.state.word = res.data
        }
        console.log(this.$store.state.word,'this.$store.state.word')
        console.log(this.$store.state.word, 'this.$store.state.word')
      },
      goSingleSign() {
        let username = this.$route.query.username
        let system = this.$route.query.system
        console.log('main token:',Cookies.get('token'))
        console.log('main username:',username)
        if (Cookies.get('token')  && !username) {
        console.log('main token:', Cookies.get('token'))
        console.log('main username:', username)
        if (Cookies.get('token') && !username) {
          this.otherProcess()
          return
        }else{
        } else {
          return
        }
      },
@@ -116,25 +116,25 @@
        this.getOssConfig()
        this.$store.dispatch('getDictList')
      },
            getMenu(){
              this.$http.get('/sys/menu/nav').then(res => {
                if (res.code !== 0) {
                  return
                }
                let menuList = res.data
                if (menuList && menuList.length > 0) {
                  //window.SITE_CONFIG['menuList'] = menuList
                  fnAddDynamicMenuRoutes(menuList, [])
                }
                window.SITE_CONFIG['menuList'] = menuList
                console.log(window.SITE_CONFIG['menuList'], 'window.SITE_CONFIG[\'menuList\']')
                // let that = this
                setTimeout(()=>{
                  this.flag = getUUID()
                  console.log('set flag')
                },50)
              })
            },
      getMenu() {
        this.$http.get('/sys/menu/nav').then(res => {
          if (res.code !== 0) {
            return
          }
          let menuList = res.data
          if (menuList && menuList.length > 0) {
            //window.SITE_CONFIG['menuList'] = menuList
            fnAddDynamicMenuRoutes(menuList, [])
          }
          window.SITE_CONFIG['menuList'] = menuList
          console.log(window.SITE_CONFIG['menuList'], 'window.SITE_CONFIG[\'menuList\']')
          // let that = this
          setTimeout(() => {
            this.flag = Date.now()  //getUUID()
            console.log(this.flag,'set flag this.flag')
          }, 50)
        })
      },
      horizontalSystem() {
        if (this.$store.state.menuPos === 'top') {
          this.$store.state.horizontalSystem = true
@@ -275,12 +275,12 @@
          }
          this.$store.state.contentTabs = this.$store.state.contentTabs.concat(tab)
        }
        console.log(this.$store.state.contentTabs,'this.$store.state.contentTabs2')
        console.log(this.$store.state.contentTabs, 'this.$store.state.contentTabs2')
        this.$store.state.sidebarMenuActiveName = tab.menuId
        if (tab.name === 'single'){
        if (tab.name === 'single') {
          this.$store.state.contentTabsActiveName = 'home'
        }else{
        } else {
          this.$store.state.contentTabsActiveName = tab.name
        }