动态配置大屏跳转地址
This commit is contained in:
parent
84022ffe21
commit
ee066b0495
|
|
@ -4,7 +4,14 @@
|
|||
// const qrUrl = 'http://112.29.103.165:21624/qrCode/qrCodePage?qrCode='; //宁夏
|
||||
// const qrUrl = 'https://z.csgmall.com.cn/gl/qrCode/qrCodePage?qrCode='; //南网
|
||||
|
||||
const qrUrl = process.env.NODE_ENV === 'production' ? 'http://192.168.0.14:18866/qrCode/qrCodePage?qrCode=' : 'http://192.168.0.14:21624/qrCode/qrCodePage?qrCode='
|
||||
// const qrUrl = process.env.NODE_ENV === 'production' ? 'http://192.168.0.14:18866/qrCode/qrCodePage?qrCode=' : 'http://192.168.0.14:21624/qrCode/qrCodePage?qrCode='
|
||||
let qrUrl = ''
|
||||
const origin = window.location.origin
|
||||
if (origin == 'http://112.29.103.165:21626') {
|
||||
qrUrl = 'http://112.29.103.165:21626/qrCode/qrCodePage?qrCode='
|
||||
} else {
|
||||
qrUrl = 'http://192.168.0.14:18866/qrCode/qrCodePage?qrCode='
|
||||
}
|
||||
|
||||
export default {
|
||||
qrUrl,
|
||||
|
|
|
|||
|
|
@ -8,16 +8,23 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
// url: '/new-page' // 目标页面的路径
|
||||
jumpUrl: '',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const origin = window.location.origin
|
||||
if (origin == 'http://112.29.103.165:21626') {
|
||||
this.jumpUrl = origin
|
||||
} else {
|
||||
this.jumpUrl = 'http://192.168.0.14:18866'
|
||||
}
|
||||
this.openNewWindow()
|
||||
this.$tab.closePage().then(() => {})
|
||||
},
|
||||
methods: {
|
||||
openNewWindow() {
|
||||
window.open(
|
||||
'http://192.168.0.14:18866/index01.html?token=' +
|
||||
`${this.jumpUrl}/index01.html?token=` +
|
||||
localStorage.getItem('token'),
|
||||
'_blank',
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue