<%
Openid = Wx.Get_Openid
Result = Wx.Get_UserInfo(Openid)
Function sex(v)
if v=1 then
sex = "男"
else
sex = "女"
end if
End Function
%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>拉取用户基本信息</title>
<style>
img {
border: none;
border-radius: 100%;
}
</style>
</head>
<body>
<p>
<%
If Result(7) = 1 Then
Wx.Echo "openid:"&Openid
Wx.Echo "昵称:"&Result(0)
Wx.Echo "性别:"&sex(Result(1))
Wx.Echo "头像:<img src=‘"&Result(2)&"‘ height=‘50‘>"
Wx.Echo "来自:"&Result(3)&"·"&Result(4)&"·"&Result(5)
Wx.Echo "关注时间:"&DateAdd("s",Result(6),"1970-01-01 08:00:00")
Else
Wx.Echo Openid&"未关注公众号呢"
End If
%>
原文地址:https://www.cnblogs.com/lytocnc/p/9777242.html