Merge remote-tracking branch 'origin/dev' into dev
						commit
						9aa5cdc660
					
				|  | @ -45,10 +45,14 @@ router.beforeEach((to, from, next) => { | ||||||
|   } else { |   } else { | ||||||
|     if (to.path == `/login` || to.path == '/apiMonitoringCenter' || to.path == '/apiMajorHazardSources') { |     if (to.path == `/login` || to.path == '/apiMonitoringCenter' || to.path == '/apiMajorHazardSources') { | ||||||
|       next() |       next() | ||||||
|  |     } else { | ||||||
|  |       if (to.path == '/map' && to.query.userId) { | ||||||
|  |         next() | ||||||
|       } else { |       } else { | ||||||
|         next(`/login`) |         next(`/login`) | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|  |   } | ||||||
| }) | }) | ||||||
| 
 | 
 | ||||||
| function formatRoutes(routes, baseUrl) { | function formatRoutes(routes, baseUrl) { | ||||||
|  |  | ||||||
|  | @ -1614,6 +1614,10 @@ export default { | ||||||
|     handleClickRightTools(index) { |     handleClickRightTools(index) { | ||||||
|       if (this.rightOptionsList[index].check !== '') this.rightOptionsList[index].check = !this.rightOptionsList[index].check |       if (this.rightOptionsList[index].check !== '') this.rightOptionsList[index].check = !this.rightOptionsList[index].check | ||||||
|       if (index === 0) { |       if (index === 0) { | ||||||
|  |         if (this.$route.query.userId) { | ||||||
|  |           window.close() | ||||||
|  |           return | ||||||
|  |         } | ||||||
|         if (this.gangkouActive === '00004') { |         if (this.gangkouActive === '00004') { | ||||||
|           if (this.timer) { |           if (this.timer) { | ||||||
|             clearInterval(this.timer) |             clearInterval(this.timer) | ||||||
|  | @ -2922,10 +2926,28 @@ export default { | ||||||
|         this.corpInfo.CORP_INFO_ID = data.info.CORP_INFO_ID |         this.corpInfo.CORP_INFO_ID = data.info.CORP_INFO_ID | ||||||
|         this.corpInfo.latitude = data.info.latitude |         this.corpInfo.latitude = data.info.latitude | ||||||
|         this.corpInfo.longitude = data.info.longitude |         this.corpInfo.longitude = data.info.longitude | ||||||
|  |         this.initUser() | ||||||
|         this.initMap() |         this.initMap() | ||||||
|       }).catch((e) => { |       }).catch((e) => { | ||||||
|         console.log(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