Static UserTable As DataTable = DataTables("表A")
Static ClearTime As Date '上一次的清除时间
If (Date.Now - ClearTime).TotalMinutes >= 30 Then '清除超过30分钟没有操作的登录信息
UserTable.DeleteFor("ActiveTime < #" & Date.Now.AddMinutes(-30) & "#")
ClearTime = Date.Now()
End If
'output.show("判断路径是否有问题1:" & e.Path)
'身份验证
Dim str,username,password,token As String
Dim dr As DataRow
Dim obj As New JObject
obj("PlainText") = e.PlainText
' output.show("传入e.Path : " & e.Path)
Functions.Execute("showMsg2Form1", "传入e.Path : " & e.Path)
If e.Path = "" OrElse e.path = "index" Then '如果没有输入路径或者为index,就跳到首页
'Output.Show("1")
str = "<meta http-equiv='refresh' c>"
e.WriteString(str)
Return '返回
Else If e.Path = "login" '如果是登录验证
'Output.Show("2")
username = e.Values("username")
password = e.Values("password")
'""?%-& output.show( "RBD'x" Like "*['-&%]*" )
If username Like "*['-&?%]*" Then
obj("code") = 401 '登录失败状态码
obj("Desc") = "用户名不合规"