Example #1
0
 /**
  * 每日伙伴数据
  * @param $date,$stationid
  * @return $data
  */
 public function everyday($date, $stationid)
 {
     $db = new Psys_StationRule();
     $lists = $db->Everyday($date, $stationid);
     $data = $lists['detail'];
     foreach ($data as &$v) {
         if ($v['model'] == 'index') {
             $v['action'] = 'index';
         }
         unset($v['model']);
     }
     $list = array();
     foreach ($data as &$v) {
         $v['sys'] = strtolower($v['sys']);
         $list[$v['sys']][$v['action']] = $v['dtime'];
     }
     //未下载、转化率
     foreach ($list as &$v) {
         $v['undown'] = $v['alert'] - $v['downapp'];
         $v['convert'] = round($v['downapp'] / $lists['link'], 4) * 100;
         $v['convert'] = $v['convert'] . "%";
     }
     $info = array();
     $info['link'] = $lists['link'];
     $info['detail'] = $list;
     return $info;
 }