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

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

parent a39a2cfa
...@@ -46,8 +46,8 @@ token: ...@@ -46,8 +46,8 @@ token:
header: Authorization header: Authorization
# 令牌密钥 # 令牌密钥
secret: abcdefghijklmnopqrstuvwxyz secret: abcdefghijklmnopqrstuvwxyz
# 令牌有效期(默认30分钟) # 令牌有效期(默认30分钟,后改为3天
expireTime: 30 expireTime: 4320
# MyBatis配置 # MyBatis配置
mybatis: mybatis:
......
...@@ -3,6 +3,7 @@ package com.zehong.system.domain; ...@@ -3,6 +3,7 @@ package com.zehong.system.domain;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel; import com.zehong.common.annotation.Excel;
...@@ -39,7 +40,7 @@ public class TUserLocation extends BaseEntity ...@@ -39,7 +40,7 @@ public class TUserLocation extends BaseEntity
private String phonenumber; private String phonenumber;
private String nickName; 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; private Date createTime;
@Override @Override
......
...@@ -600,6 +600,7 @@ export default { ...@@ -600,6 +600,7 @@ export default {
.then((res) => { .then((res) => {
if (res == 200) { if (res == 200) {
// 值班人员 // 值班人员
this.setInspectorLocationsInterval();
return this.getInspectorLocations(); return this.getInspectorLocations();
} }
}) })
...@@ -626,6 +627,19 @@ export default { ...@@ -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) { getDeviceInfo(queryParams) {
this.loading = true; 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