$token=Access::token();
$url="https://api.weixin.qq.com/datacube/getweanalysisappiddailyretaininfo?access_token=".$token;
$data=json_encode([
'begin_date'=>'20200501',
'end_date'=>'20200501'
]);
$opts=[
'http'=>[
'method'=>'POST',
'header'=>[
'Content-Type:application/json',
'Charset:utf8'
],
'content'=>$data
]
];
$context=stream_context_create($opts);
$jsondata=\file_get_contents($url,false,$context);
return $jsondata;
analysis.getDailyRetain
日期只能是一天
https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/data-analysis/visit-retain/analysis.getDailyRetain.html