mingyoung / dingtalk

[已停止维护]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

工作消息通知,总是提示{"errcode":40,"errmsg":"Missing required arguments:msg","request_id":"sq35gefm5b55"}

mcy2016 opened this issue · comments

image
public function jobMsg(Request $request) { $params = $request->post(); $mcy_ding = new McyDing($this->_config); // $access_token = $mcy_ding->access_token->get(); $data = [ "agent_id"=> "626044106", "userid_list"=>$params['ding_userid'], "msg" =>[ "msgtype"=>'markdown', "markdown"=>[ "title"=>$params['title'].'接机工作任务', "text"=>$params['text'] ] ] ]; $result = $mcy_ding->conversation->sendCorporationMessage($data); return $result; }
已经传msg了,总是提示Missing required arguments:msg

你好,你这个是因为msg类型的问题,需要json,你用的是数组

commented

我支持用数组,这里之前被改过,希望能改回来。 post 改回 postJson。加 json_encode 没有意义,只是增加心智压力