fans($yesterday, $yesterday); $this->assign('yesterday_user_data', $wechat_fans_result['data'][0] ?? []); //昨天的接口分析数据 $wechat_interface_result = $stat_model->interfaceSummary($yesterday, $yesterday); $this->assign('yesterday_interface_data', $wechat_interface_result['data'][0] ?? []); return $this->fetch('stat/stat', [], $this->replace); } /** * 接口调用统计 * @return array */ public function interfaceSummaryStatistics() { $date_type = input("date_type", "week"); $stat_model = new StatModel(); $result = $stat_model->interfaceSummaryStatistics($date_type); return $result; } /** * 用户访问统计 * @return array */ public function userSummaryStatistics() { $date_type = input("date_type", "week"); $stat_model = new StatModel(); $result = $stat_model->userSummaryStatistics($date_type); return $result; } }