devicesmgt/sgzb-ui/src/views/dashboard.vue

41 lines
1.2 KiB
Vue
Raw Normal View History

<template>
<div></div>
<!-- <router-link :to="url" target="_blank"></router-link> -->
</template>
<script>
export default {
data() {
return {
// url: '/new-page' // 目标页面的路径
jumpUrl: '',
}
},
created() {
if (process.env.NODE_ENV === 'production') {
this.jumpUrl = 'http://112.29.103.165:21624/'
} else {
this.jumpUrl = 'http://192.168.0.14:21624/'
}
this.openNewWindow()
this.$tab.closePage().then(() => {})
},
methods: {
openNewWindow() {
// window.open(
// 'http://192.168.0.14:21624/index01.html?token=' +
// localStorage.getItem('token'),
// '_blank',
// )
window.open(
`${this.jumpUrl}index01.html?token=${localStorage.getItem(
'token',
)}`,
'_blank',
)
// window.open('http://112.29.103.165:21624/index01.html?token='+localStorage.getItem('token'), '_blank'); // 产线
},
},
}
</script>