diff --git a/api/controllers/wxapp/liche/Statistics.php b/api/controllers/wxapp/liche/Statistics.php index 40448dd2..f521c5d2 100644 --- a/api/controllers/wxapp/liche/Statistics.php +++ b/api/controllers/wxapp/liche/Statistics.php @@ -7,7 +7,7 @@ defined('WXAPP_APP') OR exit('No direct script access allowed'); * Date: 2021/07/29 * Time: 14:08 */ -require_once APPPATH.'controllers/wxapp/Wxapp.php'; +require_once APPPATH.'controllers/wxapp/Wxapp.php'; class Statistics extends Wxapp{ function __construct($inputs, $app_key){ @@ -24,10 +24,10 @@ class Statistics extends Wxapp{ $this->load->library('entity/deal_entity',['app_id'=>$this->app_id]); } - + protected function get(){ - } + } //累计数据 protected function get_cal(){ @@ -71,13 +71,13 @@ class Statistics extends Wxapp{ $enroll = $this->clues_model->count(['app_id'=>$this->app_id,'recommend_id'=>$uid,'brand_id'=>$val['id']]); $where = [ 'lc_receiver_clues.recommend_id' => $uid, - 'lc_receiver_clues.brand_id' => $val['id'], + 'lc_receiver_orders.brand_id' => $val['id'], 'lc_receiver_orders.status' => 6 ]; $done = $this->clues_model->count_order($where); $where = [ 'lc_receiver_clues.recommend_id' => $uid, - 'lc_receiver_clues.brand_id' => $val['id'], + 'lc_receiver_orders.brand_id' => $val['id'], 'lc_receiver_orders.status>' => 0 ]; $ispay = $this->clues_model->count_order($where); @@ -107,14 +107,14 @@ class Statistics extends Wxapp{ protected function get_chart(){ $uid = $this->session['uid']; $type = $this->input_param('type'); - + $before = 7; $type && $before = 30; $show_date = $date = []; for ($i=1; $i<=$before; $i++){ $show_date[] = date('n.d' ,strtotime( '+' . $i-$before .' days', time())); $date[] = date('Y-m-d' ,strtotime( '+' . $i-$before .' days', time())); - } + } //根据时间统计 $enroll_data = $l_data = []; foreach($date as $kye=>$val){ @@ -159,11 +159,11 @@ class Statistics extends Wxapp{ 'type'=>'line', 'smooth'=>true, 'data' => $enroll_data, - ] + ] ] ]; return $data; - } + } //增加浏览 protected function post(){ $cf_uid = $this->input_param('cf_uid'); @@ -195,7 +195,7 @@ class Statistics extends Wxapp{ throw new Exception('保存失败', API_CODE_FAIL); } } - + protected function get_orders(){ $type = $this->input_param('type'); $page = $this->input_param('page');