'okuRis8VoZgHXUfIFQKKWhEQmn4I', //接收者openid 'template_id' => 'fdH3SheDR5DyCBqRRa98EyhncTbljXbFgHMdzx_R3us', //模板ID 'url' => 'https://www.baidu.com', //模板跳转链接(海外帐号没有跳转能力) 'data' => [ //模板数据,可以设定颜色,具体查看文档 'first' => '您的订单已取消', 'orderProductPrice' => '10.00', 'orderProductName' => '商品1', 'orderAddress' => '智慧山', 'orderName' => date("Ymd") . createNonceStr(4, ['number']), 'remark' => '具体查看详情' ], ]; $result = $template_class->sendTemplate($data); dump($result); // 记录日志 platformLog($data, $result, 'weixin_send_template_' . UID); if($result['errcode'] != 0){ return sendErrorMessage($result['errcode'],$result['errmsg']); } } }