通过九宫格链接过去的:
Dim Val2 As Integer = Rand.Next(10000)
With wb.AddGrid("page2_1", "g2")
.Add("c8","事故案例","./she.png","http://sxwytx.iego.cn/shiguanli.htm?v=" & Val2 )
End With
这是httprequest的代码:
Dim fl As String = "d:\web\" & e.path
Dim path As String = fl.replace("d:\web\","")
If FileSys.FileExists(path) Then
e.WriteFile(path)
End If
If filesys.FileExists(fl)
Dim idx As Integer = fl.LastIndexOf(".")
Dim ext As String = fl.SubString(idx)
Select Case ext
Case ".jpg",".gif",".png",".bmp",".wmf",".js",".css" ,".html",".htm",".zip",".rar",".txt"
e.WriteFile(fl)
Return '这里必须返回
End Select
End If
Dim wb As New WeUI
Dim cmd As new SQLCommand
Dim DeviceId As String
Dim Verified As Boolean
Dim UserId As String
Dim sb As New StringBuilder
If UserId > "" Then
Verified = True
e.AppendCookie("userid",UserId) '将userid和username存储在Cookie中
ElseIf e.GetValues.ContainsKey("code") = False Then '如果授权失败,且不是通过授权链接跳转而来,那么就跳转到授权链接
Dim ul As String
If e.GetValues("qt") = 2 Then '判断取题是考试题还是练习题,有qt为考试题
ul = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww51c9a9c0c93a7d18&redirect_uri=http%3a%2f%2f" & _
"sxwytx.iego.cn%2ftest%2fmain.htm%3fqt%3d2&response_type=code&scope=snsapi_base&state=123#wechat_redirect"
ElseIf e.GetValues("qt") = 1 '取练习题
ul = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww51c9a9c0c93a7d18&redirect_uri=http%3a%2f%2f" & _
"sxwytx.iego.cn%2ftest%2fmain.htm&response_type=code&scope=snsapi_base&state=123#wechat_redirect"
ElseIf e.GetValues.ContainsKey("qt") = False Then
Dim ul1 As String = "https://open.weixin.qq.com/connect/oauth2/authorize?appid={0}&redirect_uri={1}&response_type=code&scope=snsapi_base&state={2}#wechat_redirect"
Dim ul2 As String = UrlEncode("http://sxwytx.iego.cn/" & e.path)
ul = CExp(ul1,"ww51c9a9c0c93a7d18",ul2,"123")
End If
sb.Append("<meta http-equiv='Refresh' c>") '跳转到授权链接
e.WriteString(sb.ToString)
Return
End If
Select Case e.Path
Case "shiguanli.htm"
Dim htm1 As String
If FileSys.FileExists(ProjectPath & "anquanshigu.foxhtm")
htm1 = FileSys.ReadAllText(ProjectPath & "anquanshigu.foxhtm")
e.WriteString(htm1)
End If
End Select
[此贴子已经被作者于2020/7/11 15:49:20编辑过]