diff --git a/app/api/controller/Statistics.php b/app/api/controller/Statistics.php index 3eb4e91..e7920b1 100644 --- a/app/api/controller/Statistics.php +++ b/app/api/controller/Statistics.php @@ -844,13 +844,12 @@ class Statistics extends BaseController // 总订单 $return['total_order'] = Db::connect('shop')->table('eb_product_order_log')->where('status',1)->count(); // 镇订单 -// 先默认方山镇 $z_order = Db::connect('shop')->table('eb_product_order_log')->where($where)->where('status',1)->count(); // 镇分佣 $return['fenyong'] = 0; //总市场流量 -// $return['liuliang'] = bcmul(bcdiv($z_order,$return['total_order'],2),100); - $return['liuliang'] = 15; + $return['liuliang'] = bcmul(bcdiv($z_order,$return['total_order'],2),100); +// $return['liuliang'] = 15; $return['month'] = 12; // 商品销量前十 $return['data'] = Db::connect('shop')->table('eb_store_product') @@ -898,7 +897,7 @@ class Statistics extends BaseController ->select() ->toarray(); foreach ($return as $k =>$v){ - $return[$k]['demand'] = ''; + $return[$k]['demand'] = $v['value']; $return[$k]['minnum'] = [ ['month'=>'1月','value'=>0], ['month'=>'2月','value'=>$v['price']],