Commit 3a242e2d authored by 梁俊杰's avatar 梁俊杰

1

parent cdf7e0be
......@@ -10,10 +10,9 @@ ini_set('display_errors','on');
include_once 'vendor/autoload.php';
include "sdk/TopSdk.php";
// $f = fopen("./txt/test.txt", "a");
$data = json_decode(file_get_contents('php://input'), true);
/*fwrite($f, print_r($data,true));
fclose($f);*/
$users=[
'liangjunjie'=>['userid'=>'5360236526369319','name'=>'梁俊杰'],
'jiangkebao'=>['userid'=>'016740060622772430','name'=>'姜克保'],
......@@ -49,5 +48,8 @@ if(isset($users[$data['assignedTo']])){
$req->setUseridList($users[$data['assignedTo']]['userid']);
$req->setMsg($message);
$c->execute($req, null,'https://oapi.dingtalk.com/topapi/message/corpconversation/asyncsend_v2?access_token='.$token);
$res = $c->curl($url, ['agent_id' => '326099394', 'userid_list' => $users[$data['assignedTo']]['userid'], 'msg' => $message]);
$f = fopen("./txt/test.txt", "a");
fwrite($f, print_r($res,true));
fclose($f);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment