💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
sendTplNotice() - 发送模版消息 ### 说明 ``` sendTplNotice($touser, $template_id, $postdata, $url = '', $topcolor = '#FF683F') ``` ### 参数 - **$touser** string 粉丝openid - **$template_id** string 模板id - **$postdata** array() 根据模板规则完善消息 - **$url** string 详情页链接 - **$topcolor** string 模板内容字体颜色,不填默认为#FF683F ### 返回值 #### error 可用is_error判断,详见《错误处理》 #### success 返回boolean值:true ### 示例 ``` $data = array( 'first' => array( 'value' => "订单提交成功!", 'color' => '#ff510' ), 'keyword1' => array( 'value' => '1008', 'color' => '#ff510' ), 'keyword2' => array( 'value' => '2017-12-31-2018-01-01', 'color' => '#ff510' ), 'keyword3' => array( 'value' => '张三', 'color' => '#ff510' ), 'keyword4' => array( 'value' => '388元', 'color' => '#ff510' ), 'keyword5' => array( 'value' => '2017581543147', 'color' => '#ff510' ), 'remark' => array( 'value' => "欢迎您再次订购" , 'color' => '#ff510' ), ); $account_api = WeAccount::create(); $result = $account_api->sendTplNotice('oPUOlw7yvucjUrZhzG6gd8VdILa4', 'vJcJSes4vaVYv7sVEvOsRCGpZz8R3I4U1ODBbXcEBq8', $data); print_r($result); ```