无人机管理后台前端(已迁走)
chenyao
2025-11-17 233e4fc4f35bd00a36ee34a7fbf5e47b41db26db
src/page/index/top/index.vue
@@ -15,7 +15,7 @@
        <top-lock v-if="setting.lock"/>
        <top-qna />
        <top-full v-if="setting.fullscreen" title="全屏"/>
        <img class="gateway" @click="jumpMH" src="@/assets/images/mh.png" alt="进入门户" title="进入门户" width="20" height="20">
        <img class="gateway" @click="jumpMH" src="@/assets/images/mh.svg" alt="进入门户" title="进入门户" width="20" height="20">
      </div>
      <div class="top-user">
        <img class="top-bar__img" :src="userInfo.avatar "  alt=""/>
@@ -96,21 +96,21 @@
      this.$store.commit('SET_COLLAPSE')
    },
    logout () {
      this.$confirm(this.$t('logoutTip'), this.$t('tip'), {
      this.$confirm(this.$t('logoutTip'), this.$t('提示'), {
        confirmButtonText: this.$t('submitText'),
        cancelButtonText: this.$t('cancelText'),
        type: 'warning',
      }).then(() => {
        this.$store.dispatch('LogOut').then(() => {
          // this.$router.push({ path: '/login' })
        const env = import.meta.env.VITE_APP_ENV
          const adminUrl = import.meta.env.VITE_APP_DASHBOARD_URL
        window.location.replace(`${adminUrl}#/login`)
           env === 'development' ? this.$router.push({ path: '/login' }):window.location.replace(`${adminUrl}#/login`)
        })
      })
    },
    jumpMH () {
      const adminUrl = import.meta.env.VITE_APP_DASHBOARD_URL
        window.open(`${adminUrl}#/gatewayPage`, '_blank')
      window.location.href = `${adminUrl}#/gatewayPage`
    },
  },
}