页面函数:
Dim e As RequestEventArgs = Args(0)
Dim Openid As String '微信用户Openid
Dim wb As New weui
If e.host=WorkHost Or e.host.startswith("ding.") Then
Else '以下非企业号调用
Openid = Functions.Execute("Http_Get_MpOpenid3",e,wb)
Dim cmd As New SQLCommand
cmd.C
cmd.CommandText ="Sel ect Count(*) From Access_zsUser Where wechat_id = '" & openid & "' and is_active='1' "
If cmd.ExecuteScalar > 0 Then
Else '未授权用户无法使用
Functions.Execute("NonAccessMsbPage",e,wb,Openid)
e.Handled = True '位置1
Return "" '必须返回
End If
End If
……
其他代码略
函数 NonAccessMsbPage :
Dim e As RequestEventArgs = Args(0)
Dim wb As weui =args(1)
Dim Openid As String =args(2)
With wb.AddMsgPage("","msgpage","权限不足 无法访问","微信ID:" + Openid +" 不在授权范围之内!如需访问,请联系管理员!")
.icon = "Warn" '改变图标
End With
With wb.AddPageFooter("","pf1","Copyright © 浙江仔")
End With
e.WriteString(wb.Build)
e.Handled = True '位置2
End With
请问:红色的异步关闭信道的标识,是放在位置1还是位置2?还是两个都要放?