<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
|
<%Session.CodePage=65001%>
|
<!--#include file="JsonPost_1000006.gds"-->
|
<!--#include virtual="/inc/function.gds"-->
|
<%
|
Set rs = Server.CreateObject("ADODB.Recordset")
|
sql="select top 1 * from vic_sms where wx_time<=GETDATE() and wx_is=0 order by wx_time"
|
rs.open sql,objConn,1,1
|
if not rs.Eof Then
|
touser = "ylkx_vicgame"
|
id = rs("id")
|
wx_text = rs("wx_text")
|
End If
|
rs.close()
|
|
If touser<>"" Then
|
'微信OA信息下发接口
|
appUrl="https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token="&access_token
|
|
'微信验证码下发
|
args1="{"
|
args1=args1&"""touser"":"""&touser&"""," '成员ID列表(消息接收者,多个接收者用‘|’分隔,最多支持1000个)。特殊情况:指定为@all,则向关注该企业应用的全部成员发送 |liaojunliang
|
args1=args1&"""toparty"":""""," '部门ID列表,多个接收者用‘|’分隔,最多支持100个。当touser为@all时忽略本参数
|
args1=args1&"""totag"":""""," '标签ID列表,多个接收者用‘|’分隔。当touser为@all时忽略本参数
|
args1=args1&"""agentid"":1000006," '企业应用的id,整型。可在应用的设置页面查看
|
|
args1=args1&"""msgtype"":""text"","
|
args1=args1&"""text"":{"
|
args1=args1&"""content"":"""&wx_text&""""
|
args1=args1&"}"
|
|
args1=args1&"}"
|
|
'Response.Write args1
|
HTMLCODE= PostBody(appUrl,args1)
|
'Response.Write HTMLCODE
|
|
If Mid(HTMLCODE,12,1)<>"0" Then
|
Call OA_Running("weixin_message_send|1000006|"&touser&"|"&HTMLCODE)
|
Response.Write HTMLCODE
|
Else
|
sql="update vic_sms set wx_is=1 where id="&id
|
objConn.Execute sql
|
End If
|
End If
|
'If 1=2 then
|
|
|
|
'End if
|
%>
|