参考:http://www.foxtable.com/mobilehelp/topics/0006.htm如:
……
If e.host = "www.abc.com" Then '授权测试
Select Case e.Path
Case "list\a.htm","list\b.htm"
Dim UserName As String
Dim OpenID As String
……
Else
UserName = e.Cookies("username") '从cookie获取用户名和openid
OpenID = e.Cookies("openid")
If userName = "" OrElse OpenID = "" Then
Dim ul As String = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8acdb7df5beb68fd&redirect_uri=http%3a%2f%2fwexin.foxtable.com%2f" & UrlEncode(e.Path.replace("\","/")) & "&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect"
sb.Append("<meta http-equiv='Refresh' c>") '跳转到授权链接
e.WriteString(sb.ToString)
Return
End If
End If