Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

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

Open
mcy2016 opened this issue Jul 31, 2020 · 2 comments

Comments

@mcy2016
Copy link

mcy2016 commented Jul 31, 2020

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

@zhaowentao
Copy link

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

@smartymoon
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants