动态配置大屏跳转地址
This commit is contained in:
parent
357f0350c6
commit
0616cc2bf0
|
|
@ -4,7 +4,14 @@
|
||||||
// const qrUrl = 'http://112.29.103.165:21624/qrCode/qrCodePage?qrCode='; //宁夏
|
// const qrUrl = 'http://112.29.103.165:21624/qrCode/qrCodePage?qrCode='; //宁夏
|
||||||
// const qrUrl = 'https://z.csgmall.com.cn/gl/qrCode/qrCodePage?qrCode='; //南网
|
// const qrUrl = 'https://z.csgmall.com.cn/gl/qrCode/qrCodePage?qrCode='; //南网
|
||||||
|
|
||||||
const qrUrl = process.env.NODE_ENV === 'production' ? 'http://112.29.103.165:21624/qrCode/qrCodePage?qrCode=' : 'http://192.168.0.14:21624/qrCode/qrCodePage?qrCode='
|
// const qrUrl = process.env.NODE_ENV === 'production' ? 'http://112.29.103.165:21624/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:21624') {
|
||||||
|
qrUrl = 'http://112.29.103.165:21624/qrCode/qrCodePage?qrCode='
|
||||||
|
} else {
|
||||||
|
qrUrl = 'http://192.168.0.14:21624/qrCode/qrCodePage?qrCode='
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
qrUrl,
|
qrUrl,
|
||||||
|
|
|
||||||
|
|
@ -12,28 +12,23 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
if (process.env.NODE_ENV === 'production') {
|
const origin = window.location.origin
|
||||||
this.jumpUrl = 'http://112.29.103.165:21624/'
|
if (origin == 'http://112.29.103.165:21624') {
|
||||||
|
this.jumpUrl = origin
|
||||||
} else {
|
} else {
|
||||||
this.jumpUrl = 'http://192.168.0.14:21624/'
|
this.jumpUrl = 'http://192.168.0.14:21624'
|
||||||
}
|
}
|
||||||
this.openNewWindow()
|
this.openNewWindow()
|
||||||
this.$tab.closePage().then(() => {})
|
this.$tab.closePage().then(() => {})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openNewWindow() {
|
openNewWindow() {
|
||||||
// window.open(
|
|
||||||
// 'http://192.168.0.14:21624/index01.html?token=' +
|
|
||||||
// localStorage.getItem('token'),
|
|
||||||
// '_blank',
|
|
||||||
// )
|
|
||||||
window.open(
|
window.open(
|
||||||
`${this.jumpUrl}index01.html?token=${localStorage.getItem(
|
`${this.jumpUrl}/index01.html?token=${localStorage.getItem(
|
||||||
'token',
|
'token',
|
||||||
)}`,
|
)}`,
|
||||||
'_blank',
|
'_blank',
|
||||||
)
|
)
|
||||||
// window.open('http://112.29.103.165:21624/index01.html?token='+localStorage.getItem('token'), '_blank'); // 产线
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue