Commit 8a41c767 authored by 耿迪迪's avatar 耿迪迪

token失效时间-人员定位定时刷新-人员时间问题

parent a39a2cfa
......@@ -46,8 +46,8 @@ token:
header: Authorization
# 令牌密钥
secret: abcdefghijklmnopqrstuvwxyz
# 令牌有效期(默认30分钟)
expireTime: 30
# 令牌有效期(默认30分钟,后改为3天
expireTime: 4320
# MyBatis配置
mybatis:
......
......@@ -3,6 +3,7 @@ package com.zehong.system.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
......@@ -39,7 +40,7 @@ public class TUserLocation extends BaseEntity
private String phonenumber;
private String nickName;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
@Override
......
......@@ -600,6 +600,7 @@ export default {
.then((res) => {
if (res == 200) {
// 值班人员
this.setInspectorLocationsInterval();
return this.getInspectorLocations();
}
})
......@@ -626,6 +627,19 @@ export default {
}
});
},
setInspectorLocationsInterval(){
// 设置定时器,5s执行一次
let timer = setInterval(() => {
this.getInspectorLocations();
}, 5000);
// 离开当前页面时销毁定时器
this.$once('hook:beforeDestroy', () => {
console.log('destory setInterval');
clearInterval(timer);
timer = null;
})
},
// 设备
getDeviceInfo(queryParams) {
this.loading = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment