增加新系统跳转老系统地
parent
cd9590fe09
commit
1a0f8011f8
|
@ -46,7 +46,11 @@ router.beforeEach((to, from, next) => {
|
|||
if (to.path == `/login` || to.path == '/apiMonitoringCenter' || to.path == '/apiMajorHazardSources') {
|
||||
next()
|
||||
} else {
|
||||
next(`/login`)
|
||||
if (to.path == '/map' && to.query.userId) {
|
||||
next()
|
||||
} else {
|
||||
next(`/login`)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -1614,6 +1614,10 @@ export default {
|
|||
handleClickRightTools(index) {
|
||||
if (this.rightOptionsList[index].check !== '') this.rightOptionsList[index].check = !this.rightOptionsList[index].check
|
||||
if (index === 0) {
|
||||
if (this.$route.query.userId) {
|
||||
window.close()
|
||||
return
|
||||
}
|
||||
if (this.gangkouActive === '00004') {
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer)
|
||||
|
@ -2922,10 +2926,28 @@ export default {
|
|||
this.corpInfo.CORP_INFO_ID = data.info.CORP_INFO_ID
|
||||
this.corpInfo.latitude = data.info.latitude
|
||||
this.corpInfo.longitude = data.info.longitude
|
||||
this.initUser()
|
||||
this.initMap()
|
||||
}).catch((e) => {
|
||||
console.log(e)
|
||||
})
|
||||
},
|
||||
initUser() {
|
||||
const { userId } = this.$route.query
|
||||
if (!userId) return
|
||||
requestFN(
|
||||
'/admin/v2/login',
|
||||
{ userId }
|
||||
).then((res) => {
|
||||
console.log(res)
|
||||
if (res.result !== 'success') {
|
||||
alert('登录失败')
|
||||
window.close()
|
||||
}
|
||||
}).catch((e) => {
|
||||
alert('登录失败')
|
||||
window.close()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue