| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | closeBrowser() { |
| | | this.$apis.login.closeBrowser().then(res=>{ |
| | | console.log(res); |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }); |
| | | }, |
| | | alarmAlert() { |
| | | this.alarmAlertStatus = !this.alarmAlertStatus; |
| | | }, |
| | |
| | | .getLicenseResTime() |
| | | .then((res) => { |
| | | let rs = JSON.parse(res.data.result); |
| | | console.log(rs); |
| | | if (rs.code == 1) { |
| | | this.termDateShow = true; |
| | | this.termDate = rs.data; |
| | |
| | | this.changeSkin(); |
| | | }, |
| | | mounted() { |
| | | let _beforeUnload_time = 0; |
| | | let _unload_time = 0; |
| | | // 监控浏览器关闭 |
| | | window.addEventListener('beforeunload', e=>{ |
| | | _beforeUnload_time = new Date().getTime(); |
| | | }); |
| | | window.addEventListener("unload", e=>{ |
| | | _unload_time = new Date().getTime(); |
| | | if(_unload_time-_beforeUnload_time<=1) { |
| | | this.closeBrowser(); |
| | | } |
| | | }); |
| | | |
| | | // 启动请求 |
| | | this.startSearch(); |
| | | this.startLogUseCount(); |