diff --git a/Yjpp36/Form1.vb b/Yjpp36/Form1.vb index 3414a47..1858c70 100644 --- a/Yjpp36/Form1.vb +++ b/Yjpp36/Form1.vb @@ -16,7 +16,8 @@ Public Class Form1 Dim 全局变量_BIOS识别码 As String = "" Dim 全局变量_异常密码 As String = "009988" 'api接口地址 ' - Dim ApiEndPoint As String = "http://api.systemcd.org/api/v1" + 'Dim ApiEndPoint As String = "http://api.systemcd.org/api/v1" + Dim ApiEndPoint As String = "http://192.168.2.102:8000/api/v1" Dim 全局变量_id As String = "" Dim 全局变量_心跳时间 As String = "" Dim 全局变量_关键字心跳时间 As String = "" @@ -1702,8 +1703,6 @@ Public Class Form1 '保存到文件' Await SaveFile("keywords", {content}) End If - - Catch ex As Exception End Try @@ -1738,10 +1737,10 @@ Public Class Form1 req.type = 1 req.content = content - If 是否断网 = True AndAlso len > 0 AndAlso content.Length = len Then + If 是否断网 = True AndAlso len > 0 AndAlso content.Length = len AndAlso StringHelper.IsAllLetterOrDigit(content) Then Await SaveKeywordLog({req}) Exit For - ElseIf 是否断网 = False AndAlso len > 0 AndAlso content.Length = len Then + ElseIf 是否断网 = False AndAlso len > 0 AndAlso content.Length = len AndAlso StringHelper.IsAllLetterOrDigit(content) Then 全局变量_采集的文本.Add(req) Exit For End If diff --git a/Yjpp36/My Project/AssemblyInfo.vb b/Yjpp36/My Project/AssemblyInfo.vb index 4ae24e9..3c0368f 100644 --- a/Yjpp36/My Project/AssemblyInfo.vb +++ b/Yjpp36/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices '通过使用 "*",如下所示: ' - - + + diff --git a/Yjpp36/Yjpp36.vbproj b/Yjpp36/Yjpp36.vbproj index dfe38ad..93666dc 100644 --- a/Yjpp36/Yjpp36.vbproj +++ b/Yjpp36/Yjpp36.vbproj @@ -128,6 +128,7 @@ + diff --git a/Yjpp36/service/StringHelper.vb b/Yjpp36/service/StringHelper.vb new file mode 100644 index 0000000..9e1ea91 --- /dev/null +++ b/Yjpp36/service/StringHelper.vb @@ -0,0 +1,9 @@ +Public Class StringHelper + ' 判断是否全字母数字(Unicode 支持) + Public Shared Function IsAllLetterOrDigit(input As String) As Boolean + For Each ch As Char In input + If Not Char.IsLetterOrDigit(ch) Then Return False + Next + Return True + End Function +End Class