...
|
...
|
@@ -94,6 +94,17 @@ class Index extends Api |
|
|
*/
|
|
|
public function senWxmsgToAgentUser($titdesc="", $remark="")
|
|
|
{
|
|
|
$appid = 'wxb7dd0c03865a94e0';
|
|
|
$appsecret = '6af75a6fb8211da45631630e34769f82';
|
|
|
$code = $_GET['code']; // 从回调URL中获取code参数
|
|
|
|
|
|
// 获取access_token
|
|
|
$token_url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=$appid&secret=$appsecret&code=$code&grant_type=authorization_code";
|
|
|
$token_json = file_get_contents($token_url);
|
|
|
$token_array = json_decode($token_json, true);
|
|
|
print_r($token_array);return;
|
|
|
|
|
|
|
|
|
$wxopenid="ojyUX6oNFoQMqoCd1JWtfwQs-CeA";
|
|
|
$sendInfo = array(
|
|
|
'first' => array('value' => urlencode($titdesc), 'color' => "#743A3A"),
|
...
|
...
|
|