- 企业微信的自建应用和第三方应用,都无法在微信的微工作台上显示
[图片][图片] 已参考以下问题进行相应操作但是仍无法显示,望能协助解决! https://developers.weixin.qq.com/community/develop/doc/0000623e4dcbd872fbd88b41c52000?highline=%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E7%9A%84%E8%87%AA%E5%BB%BA%E5%BA%94%E7%94%A8,%E6%97%A0%E6%B3%95%E5%9C%A8%E5%BE%AE%E4%BF%A1%E7%9A%84%E5%BE%AE%E5%B7%A5%E4%BD%9C%E5%8F%B0%E4%B8%8A%E6%98%BE%E7%A4%BA
2020-02-19 - 服务端发起企业微信小程序通知消息时,一直报title中文字数过长或过短但实际上我传5个字.
//服务端代码 public function sendMessage() { $app = Factory::work($this->config); $accessToken = $app->access_token; $token = $accessToken->getToken(); // token 数组 token['access_token'] 字符串 $data = [ 'touser' => 'userid', // 'toparty' => ["partyid1", "partyid2", "LinkedId1/partyid1", "LinkedId2/partyid2"], // 'totag' => ["tagid1", "tagid2"], 'msgtype' => 'miniprogram_notice', 'miniprogram_notice' => [ 'appid' => 'wxappid', // 'page' => 'pages/index?userid=zhangsan&orderid=123123123', "title" => "一二三四五", "description" => "测试推送", "emphasis_first_item" => true, "content_item" => [ [ "key" => "会议室", "value" => "402" ] ] ], ]; $client = new \GuzzleHttp\Client(); $response = $client->request('POST', 'https://qyapi.weixin.qq.com/cgi-bin/linkedcorp/message/send', [ 'query' => ['access_token' => $token['access_token']], 'json' => $data, ]); file_put_contents('./sendNotice.txt', date('Y-m-d H:i:s') . " 请求参数:" . json_encode($data) . "\r\n", FILE_APPEND); $result = $response->getBody(); file_put_contents('./sendNotice.txt', date('Y-m-d H:i:s') . " 回调结果:" . $result . "\r\n", FILE_APPEND); $result = json_decode($result, true); if (empty($result['errcode'])) $this->success(OPERATE_SUCCESS,$result,OPERATE_SUCCESS_CODE); $this->error(OPERATE_FAIL,$result,OPERATE_FAIL_CODE); } 发送的json数据体:{"touser":"userid","msgtype":"miniprogram_notice","miniprogram_notice":{"appid":"appid","title":"\u4e00\u4e8c\u4e09\u56db\u4e94","description":"\u6d4b\u8bd5\u63a8\u9001","emphasis_first_item":true,"content_item":[{"key":"\u4f1a\u8bae\u5ba4","value":"402"}]}} 企业微信的回调:{"errcode":40058,"errmsg":"Invalid input : miniprogram_notice.title exceed max chinese words 12. invalid Request Parameter, hint: [1579587920_56_fb131810df5a36b3c3b2b7c7544c6a88], from ip: , more info at https://open.work.weixin.qq.com/devtool/query?e=40058","invaliduser":[],"invalidparty":[],"invalidtag":[]} 实际上我发的miniprogram_notice.title字段才五个字而已,企业微信的回调告诉我的是说我的字数超了?????我很不解,希望能解答我的疑惑,现在项目急需接通这个api
2020-01-21