tokentime的输入大小进行限制
This commit is contained in:
parent
ae4a120987
commit
2ee58cefb0
|
|
@ -81,7 +81,7 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
socket: null,
|
socket: null,
|
||||||
wsUrl: 'ws://localhost:18082/ws', // WebSocket 端点
|
wsUrl: JSON.parse(localStorage.getItem('systemConfig')).webSocketurl,//'ws://localhost:18082/ws', // WebSocket 端点
|
||||||
isConnected: false, // 连接状态
|
isConnected: false, // 连接状态
|
||||||
reconnectInterval: 5000 // 自动重连时间间隔(毫秒
|
reconnectInterval: 5000 // 自动重连时间间隔(毫秒
|
||||||
|
|
||||||
|
|
@ -120,7 +120,9 @@ export default {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.checkPasswordStatus()
|
this.checkPasswordStatus()
|
||||||
if (this.roles.includes("audit") || this.roles.includes("systemAdmin")) {
|
console.log("*******************")
|
||||||
|
console.log(this.roles)
|
||||||
|
if (this.roles.includes("audit") || this.roles.includes("systemAdmin")|| this.roles.includes("admin")) {
|
||||||
this.connectWebSocket();
|
this.connectWebSocket();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -158,7 +160,7 @@ export default {
|
||||||
console.log("WebSocket 已连接");
|
console.log("WebSocket 已连接");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
console.log("WebSocket URL:{}",this.wsUrl)
|
||||||
this.socket = new WebSocket(this.wsUrl);
|
this.socket = new WebSocket(this.wsUrl);
|
||||||
|
|
||||||
// 监听 WebSocket 连接成功事件
|
// 监听 WebSocket 连接成功事件
|
||||||
|
|
|
||||||
|
|
@ -300,6 +300,11 @@ export default {
|
||||||
submitForm: function() {
|
submitForm: function() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
if (this.form.configKey === "sys.visit.tokentime" && (this.form.configValue <=0 || this.form.configValue > 30 ))
|
||||||
|
{
|
||||||
|
this.$modal.msgError("系统访问token有效期必须在0-30分钟之间");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (this.form.configId != undefined) {
|
if (this.form.configId != undefined) {
|
||||||
updateConfig(this.form).then(response => {
|
updateConfig(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue