{"remainingRequest":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/test-v5inweb-5.x-vue/src/views/mixin_LockScreen.vue?vue&type=script&lang=js&","dependencies":[{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/src/views/mixin_LockScreen.vue","mtime":1739760944329},{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/babel-loader/lib/index.js","mtime":315532800000},{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/test-v5inweb-5.x-vue/node_modules/vue-loader/lib/index.js","mtime":1655715099000}],"contextDependencies":[],"result":["\nexport default {\n data() {\n return {\n lastTime: null,//最后一次点击事件\n currentTime: null,//当前时间\n sys_timeout: 15 * 60 * 1000, // 超时时间, 如果规定时间15分钟都没有点击页面就算超时 15 * 60* 1000,\n check_time: 5 * 60 * 1000,// 检查的时间,每隔5分钟检查一次有没有超时 5 * 60 * 1000,\n whole_timer: null,// 计时器\n }\n },\n mounted() {\n this.getLock()//锁屏\n this.isLoginOut()//启动这个定时器 \n },\n methods: {\n isLoginOut() {\n clearInterval(this.whole_timer);\n let that = this;\n this.whole_timer = setInterval(() => {\n try {\n if (that.isTimeOut()) {\n setTimeout(() => {\n that.lockScreen()//锁屏\n clearInterval(that.whole_timer)\n }, 1000)\n }\n } catch (error) {\n\n }\n }, that.check_time);\n },\n isTimeOut() {// 判断是否超时\n this.lastTime = this.$store.state.lastTime;\n this.currentTime = new Date().getTime();\n if ((this.currentTime - this.lastTime) > this.sys_timeout) {\n return true\n } else {\n return false\n }\n },\n //解除锁屏\n unlockScreen() {\n let that = this\n if (!this.password) {\n this.nullPrompt = this.$t('e_password')\n this.isPasswordError = 'true';\n setTimeout(() => {\n this.isPasswordError = '';\n }, 2000)\n } else {\n this.$api.isLock(\n this.$getCodeRSA(this.password),//this.$getCodeRSA\n {\n onSucess: res => {\n console.log(res)\n if (res == undefined) {\n that.isPasswordError = 'true';\n // that.$message({type:'warning',message:'密码错误',customClass: 'message-override'})\n return\n }\n this.nullPrompt = '';\n if (res.data.status == 200) {\n that.isLock = 'false';\n sessionStorage.setItem('screenLock', 'false');\n res.data.data && localStorage.setItem('token', res.data.data)\n that.isLoginOut()//成功重新启动这个定时器\n } else {\n that.isLock = 'true';\n that.isPasswordError = 'true';\n setTimeout(() => {\n that.isPasswordError = '';\n }, 2000)\n }\n }, catch: error => {\n console.log('error1', error)\n }\n\n\n }\n )\n }\n },\n //解决输入框无法输入\n changePassword() {\n this.$forceUpdate()\n },\n }\n}\n",null]}