【调度系统】广东民航医疗快线调度系统源代码
wanglizhong
2025-04-22 72c0df785d4838d35dc694071c61e3f9a54e7e81
weixin/JsonPost.gds
@@ -1,4 +1,18 @@
<!--#include virtual="/inc/odbc1.asp"-->
<script language="jscript" runat="server">
Array.prototype.get = function(i)
{
 return this[i];
};
function getjson(str){
 try{
  eval("var jsonStr = (" + str + ")");
 }catch(ex){
  var jsonStr = null;
 }
 return jsonStr;
}
</script>
<%
'接口信息
corpid="wx248505bfbab6d0c1"
@@ -61,16 +75,17 @@
   '获取新的access_token
   url="https://qyapi.weixin.qq.com/cgi-bin/gettoken"  '//定义要获取源代码的网址,一般是通过变量传递过来
   Origin="corpid="&corpid&"&corpsecret="&corpsecret
   HTMLCODE= GetBody(url,Origin)
   'Response.Write url&"?"&Origin
   HTMLCODE= GetBody(url,Origin)
   str="["&HTMLCODE&"]"
   'Response.Write url&"?"&Origin
   Response.write str
   set obj = getjson(str)
   access_token   = obj.get(0).access_token
   expires_in      = obj.get(0).expires_in
   'access_token=replace(replace(HTMLCODE,"{""access_token"":""",""),""",""expires_in"":7200}","")   
   access_token_time=DateAdd("s",500,now())
   '写入数据库
   sql="update dictionary set vtext='"&access_token&"',vMono='"&access_token_time&"' where id="&access_tokenID
   sql="update dictionary set vtext='"&access_token&"',vMono='"&access_token_time&"' where id="&access_tokenID
   objConn.Execute sql
End if