示例#1
0
 /**
  * @before _secure
  * @after setDate
  */
 public function campaign($id = null)
 {
     $this->seo(["title" => "Campaign Insights"]);
     $view = $this->getActionView();
     $org = $this->org;
     $ad = Ad::first(['_id' => $id, 'org_id' => $org->_id]);
     if (!$ad) {
         $this->_404();
     }
     $data = Shared\Services\Campaign::performance($id, ['start' => $this->start, 'end' => $this->end, 'pid' => $this->user_id, 'meta' => true]);
     $view->set('stats', $data['stats'])->set('total', $data['total']);
 }
示例#2
0
文件: auth.php 项目: vNative/vnative
 protected function widgets()
 {
     $meta = $this->org->meta;
     if (isset($meta['widget']) && isset($meta['widget']['top10pubs']) && count($meta['widget']['top10pubs']) > 0) {
         $widgets = $meta['widget'];
         return ['publishers' => $widgets['top10pubs'] ?? [], 'ads' => Shared\Services\Campaign::displayData($widgets['top10ads'] ?? [])];
     } else {
         // fallback case
         return ['publishers' => [], 'ads' => []];
     }
 }
示例#3
0
文件: cron.php 项目: vNative/vnative
 protected function _minutely()
 {
     Shared\Services\Campaign::minutely();
     Click::minutely();
 }