158 lines
4.6 KiB
PHP
158 lines
4.6 KiB
PHP
<?php
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
/**
|
|
* Created by Vim.
|
|
* User: lcc
|
|
* Date: 2019/12/06
|
|
* Time: 10:02
|
|
*/
|
|
class Main extends HD_Controller
|
|
{
|
|
|
|
public function __construct()
|
|
{
|
|
$this->app_id = 2;
|
|
parent::__construct();
|
|
$this->load->model('app/licheb/App_licheb_users_model', 'userM');
|
|
$this->load->model('app/licheb/syt_activity_model', 'mdSytActivity');
|
|
$this->load->model('app/material/Material_template_model', 'mdTemplate');
|
|
$this->load->model('app/material/Material_biz_model', 'mdMaterialBiz');
|
|
$this->load->model('topics/topics_model', 'mdTopics');
|
|
$this->load->model('live/Live_polyv_session_model', 'mdPolyvSession');
|
|
$this->load->model('app/licheb/app_licheb_bizs_log_model', 'mdBizsLog');
|
|
$this->load->model('app/licheb/syt_live_model', 'mdSytLive');
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
/*应用状况*/
|
|
$conditions = array();
|
|
|
|
/*小程序设置 start*/
|
|
// 用户数据
|
|
$list = [];
|
|
$value = $this->userM->count([]);
|
|
$list[] = array(
|
|
'title' => '用户(人)',
|
|
'value' => $value,
|
|
'btns' => array(
|
|
array('name' => '查看详情', 'url' => '/app/licheb/member/index?status=1'),
|
|
),
|
|
);
|
|
$value = $this->userM->count(['group_id' => 4, 'status' => 1]);
|
|
$list[] = array(
|
|
'title' => '渠道列表(人)',
|
|
'value' => $value,
|
|
'btns' => array(
|
|
array('name' => '查看详情', 'url' => '/app/licheb/channel'),
|
|
),
|
|
);
|
|
$value = $this->mdTemplate->count();
|
|
$list[] = array(
|
|
'title' => '素材模版(个)',
|
|
'value' => $value,
|
|
'btns' => array(
|
|
array('name' => '查看详情', 'url' => '/app/material/template/index?app_id=' . $this->app_id),
|
|
),
|
|
);
|
|
$value = $this->mdMaterialBiz->count(array('app_id' => $this->app_id), 'distinct(biz_id)');
|
|
$list[] = array(
|
|
'title' => '素材门店统计(家)',
|
|
'value' => $value,
|
|
'btns' => array(
|
|
array('name' => '查看详情', 'url' => '/app/material/template/lists_biz?app_id=' . $this->app_id),
|
|
),
|
|
);
|
|
$conditions[] = array('icon' => 'am-icon-home', 'list' => $list);
|
|
|
|
$list = array();
|
|
$value = $this->mdSytLive->count(['status>' => -1]);
|
|
$list[] = array(
|
|
'title' => '私域通-直播(个)',
|
|
'value' => $value,
|
|
'btns' => array(
|
|
array('name' => '查看详情', 'url' => '/app/licheb/sytlive'),
|
|
),
|
|
);
|
|
$value = $this->mdTopics->count(array('app_id' => $this->app_id));
|
|
$list[] = array(
|
|
'title' => '专题(个)',
|
|
'value' => $value,
|
|
'btns' => array(
|
|
array('name' => '查看详情', 'url' => '/topics/topics?app_id=' . $this->app_id),
|
|
),
|
|
);
|
|
$value = $this->mdSytActivity->count(array('status>' => -1));
|
|
$list[] = array(
|
|
'title' => '私域通-活动(个)',
|
|
'value' => $value,
|
|
'btns' => array(
|
|
array('name' => '查看详情', 'url' => '/app/licheb/sytactivity'),
|
|
),
|
|
);
|
|
$value = $this->mdPolyvSession->count();
|
|
$list[] = array(
|
|
'title' => '直播-场次报表',
|
|
'value' => $value,
|
|
'btns' => array(
|
|
array('name' => '查看详情', 'url' => '/live/polyv'),
|
|
),
|
|
);
|
|
$value = $this->mdBizsLog->count();
|
|
$list[] = array(
|
|
'title' => '门店日志',
|
|
'value' => $value,
|
|
'btns' => array(
|
|
array('name' => '查看详情', 'url' => 'app/licheb/userslog'),
|
|
),
|
|
);
|
|
$conditions[] = array('icon' => 'am-icon-user', 'list' => $list);
|
|
|
|
/*小程序设置 end*/
|
|
|
|
/*实时数据 end*/
|
|
|
|
$this->data['conditions'] = $conditions;
|
|
|
|
$this->data['_title'] = '狸车';
|
|
return $this->show_view('/app/main', true);
|
|
}
|
|
|
|
public function lists()
|
|
{
|
|
// TODO: Implement lists() method.
|
|
}
|
|
|
|
public function get()
|
|
{
|
|
|
|
}
|
|
|
|
public function add()
|
|
{
|
|
// TODO: Implement add() method.
|
|
}
|
|
|
|
public function edit()
|
|
{
|
|
|
|
}
|
|
|
|
public function del()
|
|
{
|
|
// TODO: Implement del() method.
|
|
}
|
|
|
|
public function batch()
|
|
{
|
|
// TODO: Implement batch() method.
|
|
}
|
|
|
|
public function export()
|
|
{
|
|
// TODO: Implement export() method.
|
|
}
|
|
|
|
}
|