先暂时将发送的openid写死

This commit is contained in:
wangxiaowei 2024-07-06 16:15:14 +08:00
parent d29038320f
commit c2a06f6758

@ -81,8 +81,9 @@ class Getgzopenid
$token_url = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=".$access_token; $token_url = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=".$access_token;
foreach($goods_msg as $key=>$value){ foreach($goods_msg as $key=>$value){
foreach($value['goodscontact'] as $k=>$v){ foreach($value['goodscontact'] as $k=>$v){
// TODO 暂时将openid写死,因为后端在这一块设计的不好,这里的open_id是张姐的
$data=[ $data=[
"touser" => $v['open_id'], "touser" => $v['open_id'] ? $v['open_id'] : 'oUzra6HlpaARciJpUk8eeUxFayPk',
"template_id"=>"oWpOaEVOgiORQ4bDj9d5u98YMhWWyuShrxECO5RKBW8", "template_id"=>"oWpOaEVOgiORQ4bDj9d5u98YMhWWyuShrxECO5RKBW8",
"data"=>[ "data"=>[
"thing2"=>["value"=>$user_msg['contact']], "thing2"=>["value"=>$user_msg['contact']],