nw-cqdevicemgt-ui/src/views/dashboard.vue

48 lines
1.3 KiB
Vue
Raw Normal View History

2024-08-29 10:27:08 +08:00
<template>
<div></div>
<!-- <router-link :to="url" target="_blank"></router-link> -->
</template>
<script>
export default {
data() {
return {
// url: '/new-page' // 目标页面的路径
jumpUrl: '',
2024-09-18 08:59:29 +08:00
ENV: process.env.VUE_APP_ENV, // 获取当前运行环境 如是南网开发环境或线上环境 则显示新增公司按钮
2024-08-29 10:27:08 +08:00
}
},
created() {
const origin = window.location.origin
this.jumpUrl = origin
// if (origin == 'http://192.168.0.56:21626') {
// this.jumpUrl = origin
// } else {
// this.jumpUrl = 'http://192.168.0.14:18866'
// }
this.openNewWindow()
this.$tab.closePage().then(() => {})
},
methods: {
openNewWindow() {
2024-09-18 08:59:29 +08:00
if (this.ENV === 'production-nw') {
window.open(
`${
this.jumpUrl
}/bigScrap/Home/index?token=${localStorage.getItem(
'token',
)}`,
'_blank',
)
} else {
window.open(
`${this.jumpUrl}/screen/Home/index?token=` +
localStorage.getItem('token'),
'_blank',
)
}
2024-08-29 10:27:08 +08:00
},
},
}
</script>