Panda 2 mēneši atpakaļ
vecāks
revīzija
0f4bc629ce
44 mainītis faili ar 2397 papildinājumiem un 2 dzēšanām
  1. 73 0
      application/admin/controller/LiveReport.php
  2. 140 0
      application/admin/controller/LiveRoom.php
  3. 71 0
      application/admin/controller/LiveRoomAdmin.php
  4. 37 0
      application/admin/controller/LiveRoomLog.php
  5. 72 0
      application/admin/controller/LiveSuggest.php
  6. 20 0
      application/admin/lang/zh-cn/live_report.php
  7. 35 0
      application/admin/lang/zh-cn/live_room.php
  8. 17 0
      application/admin/lang/zh-cn/live_room_admin.php
  9. 19 0
      application/admin/lang/zh-cn/live_room_log.php
  10. 21 0
      application/admin/lang/zh-cn/live_suggest.php
  11. 76 0
      application/admin/model/LiveReport.php
  12. 105 0
      application/admin/model/LiveRoom.php
  13. 64 0
      application/admin/model/LiveRoomAdmin.php
  14. 61 0
      application/admin/model/LiveRoomLog.php
  15. 70 0
      application/admin/model/LiveSuggest.php
  16. 12 0
      application/admin/model/live/Room.php
  17. 12 0
      application/admin/model/live/room/Log.php
  18. 27 0
      application/admin/validate/LiveReport.php
  19. 27 0
      application/admin/validate/LiveRoom.php
  20. 27 0
      application/admin/validate/LiveRoomAdmin.php
  21. 27 0
      application/admin/validate/LiveRoomLog.php
  22. 27 0
      application/admin/validate/LiveSuggest.php
  23. 71 0
      application/admin/view/live_report/add.html
  24. 71 0
      application/admin/view/live_report/edit.html
  25. 46 0
      application/admin/view/live_report/index.html
  26. 101 0
      application/admin/view/live_room/add.html
  27. 109 0
      application/admin/view/live_room/edit.html
  28. 46 0
      application/admin/view/live_room/index.html
  29. 45 0
      application/admin/view/live_room_admin/add.html
  30. 45 0
      application/admin/view/live_room_admin/edit.html
  31. 46 0
      application/admin/view/live_room_admin/index.html
  32. 93 0
      application/admin/view/live_room_log/add.html
  33. 93 0
      application/admin/view/live_room_log/edit.html
  34. 29 0
      application/admin/view/live_room_log/index.html
  35. 63 0
      application/admin/view/live_suggest/add.html
  36. 63 0
      application/admin/view/live_suggest/edit.html
  37. 46 0
      application/admin/view/live_suggest/index.html
  38. 1 1
      application/api/controller/Index.php
  39. 25 1
      application/utils/Service/Tencent/TencentIm.php
  40. 65 0
      public/assets/js/backend/live_report.js
  41. 107 0
      public/assets/js/backend/live_room.js
  42. 59 0
      public/assets/js/backend/live_room_admin.js
  43. 67 0
      public/assets/js/backend/live_room_log.js
  44. 66 0
      public/assets/js/backend/live_suggest.js

+ 73 - 0
application/admin/controller/LiveReport.php

@@ -0,0 +1,73 @@
+<?php
+
+namespace app\admin\controller;
+
+use app\common\controller\Backend;
+
+/**
+ * 【直播】举报
+ *
+ * @icon fa fa-circle-o
+ */
+class LiveReport extends Backend
+{
+
+    /**
+     * LiveReport模型对象
+     * @var \app\admin\model\LiveReport
+     */
+    protected $model = null;
+
+    public function _initialize()
+    {
+        parent::_initialize();
+        $this->model = new \app\admin\model\LiveReport;
+        $this->view->assign("statusList", $this->model->getStatusList());
+    }
+
+
+
+    /**
+     * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
+     * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
+     * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
+     */
+
+
+    /**
+     * 查看
+     */
+    public function index()
+    {
+        //当前是否为关联查询
+        $this->relationSearch = true;
+        //设置过滤方法
+        $this->request->filter(['strip_tags', 'trim']);
+        if ($this->request->isAjax()) {
+            //如果发送的来源是Selectpage,则转发到Selectpage
+            if ($this->request->request('keyField')) {
+                return $this->selectpage();
+            }
+            list($where, $sort, $order, $offset, $limit) = $this->buildparams();
+
+            $list = $this->model
+                    ->with(['user','to_user','room'])
+                    ->where($where)
+                    ->order($sort, $order)
+                    ->paginate($limit);
+
+            foreach ($list as $row) {
+                
+                $row->getRelation('user')->visible(['nickname']);
+				$row->getRelation('to_user')->visible(['nickname']);
+				$row->getRelation('room')->visible(['name']);
+            }
+
+            $result = array("total" => $list->total(), "rows" => $list->items());
+
+            return json($result);
+        }
+        return $this->view->fetch();
+    }
+
+}

+ 140 - 0
application/admin/controller/LiveRoom.php

@@ -0,0 +1,140 @@
+<?php
+
+namespace app\admin\controller;
+
+use app\common\controller\Backend;
+use app\utils\Service\Tencent\TencentIm;
+use think\Db;
+use think\exception\DbException;
+use think\exception\PDOException;
+use think\exception\ValidateException;
+
+/**
+ * 【直播】房间
+ *
+ * @icon fa fa-circle-o
+ */
+class LiveRoom extends Backend
+{
+
+    /**
+     * LiveRoom模型对象
+     * @var \app\admin\model\LiveRoom
+     */
+    protected $model = null;
+
+    public function _initialize()
+    {
+        parent::_initialize();
+        $this->model = new \app\admin\model\LiveRoom;
+        $this->view->assign("talkStatusList", $this->model->getTalkStatusList());
+        $this->view->assign("statusList", $this->model->getStatusList());
+    }
+
+
+
+    /**
+     * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
+     * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
+     * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
+     */
+
+
+    /**
+     * 查看
+     */
+    public function index()
+    {
+        //当前是否为关联查询
+        $this->relationSearch = true;
+        //设置过滤方法
+        $this->request->filter(['strip_tags', 'trim']);
+        if ($this->request->isAjax()) {
+            //如果发送的来源是Selectpage,则转发到Selectpage
+            if ($this->request->request('keyField')) {
+                return $this->selectpage();
+            }
+            list($where, $sort, $order, $offset, $limit) = $this->buildparams();
+
+            $list = $this->model
+                    ->with(['user','log'])
+                    ->where($where)
+                    ->order($sort, $order)
+                    ->paginate($limit);
+
+            foreach ($list as $row) {
+                
+                $row->getRelation('user')->visible(['nickname']);
+				$row->getRelation('log')->visible(['like ','ccu','uv','pv','goods_sales','share_num','follow_num','duration','open_time','close_time']);
+            }
+
+            $result = array("total" => $list->total(), "rows" => $list->items());
+
+            return json($result);
+        }
+        return $this->view->fetch();
+    }
+
+    /**
+     * 编辑
+     *
+     * @param $ids
+     * @return string
+     * @throws DbException
+     * @throws \think\Exception
+     */
+    public function edit($ids = null)
+    {
+        $row = $this->model->get($ids);
+        if (!$row) {
+            $this->error(__('No Results were found'));
+        }
+        $adminIds = $this->getDataLimitAdminIds();
+        if (is_array($adminIds) && !in_array($row[$this->dataLimitField], $adminIds)) {
+            $this->error(__('You have no permission'));
+        }
+        if (false === $this->request->isPost()) {
+            $this->view->assign('row', $row);
+            return $this->view->fetch();
+        }
+        $params = $this->request->post('row/a');
+        if (empty($params)) {
+            $this->error(__('Parameter %s can not be empty', ''));
+        }
+        $params = $this->preExcludeFields($params);
+        $result = false;
+        Db::startTrans();
+        try {
+            //是否采用模型验证
+            if ($this->modelValidate) {
+                $name = str_replace("\\model\\", "\\validate\\", get_class($this->model));
+                $validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.edit' : $name) : $this->modelValidate;
+                $row->validateFailException()->validate($validate);
+            }
+            $result = $row->allowField(true)->save($params);
+
+            // 更新直播间
+            $im = new TencentIm();
+            if (!$im->modify_group_base_info($row['room_no'],$params['name'],cdnurl($params['logo']))){
+                Db::rollback();
+                $this->error($im->getMessage());
+            }
+
+//            if ($params['status'] == 0){
+//                if (!$im->modify_group_base_info($row['room_no'],$params['name'],cdnurl($params['logo']))){
+//                    Db::rollback();
+//                    $this->error($im->getMessage());
+//                }
+//            }
+
+            Db::commit();
+        } catch (ValidateException|PDOException|Exception $e) {
+            Db::rollback();
+            $this->error($e->getMessage());
+        }
+        if (false === $result) {
+            $this->error(__('No rows were updated'));
+        }
+        $this->success();
+    }
+}

+ 71 - 0
application/admin/controller/LiveRoomAdmin.php

@@ -0,0 +1,71 @@
+<?php
+
+namespace app\admin\controller;
+
+use app\common\controller\Backend;
+
+/**
+ * 【直播】房间管理员
+ *
+ * @icon fa fa-circle-o
+ */
+class LiveRoomAdmin extends Backend
+{
+
+    /**
+     * LiveRoomAdmin模型对象
+     * @var \app\admin\model\LiveRoomAdmin
+     */
+    protected $model = null;
+
+    public function _initialize()
+    {
+        parent::_initialize();
+        $this->model = new \app\admin\model\LiveRoomAdmin;
+        $this->view->assign("statusList", $this->model->getStatusList());
+    }
+
+
+
+    /**
+     * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
+     * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
+     * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
+     */
+
+
+    /**
+     * 查看
+     */
+    public function index()
+    {
+        //当前是否为关联查询
+        $this->relationSearch = true;
+        //设置过滤方法
+        $this->request->filter(['strip_tags', 'trim']);
+        if ($this->request->isAjax()) {
+            //如果发送的来源是Selectpage,则转发到Selectpage
+            if ($this->request->request('keyField')) {
+                return $this->selectpage();
+            }
+            list($where, $sort, $order, $offset, $limit) = $this->buildparams();
+
+            $list = $this->model
+                    ->with(['user'])
+                    ->where($where)
+                    ->order($sort, $order)
+                    ->paginate($limit);
+
+            foreach ($list as $row) {
+                
+                $row->getRelation('user')->visible(['nickname','avatar']);
+            }
+
+            $result = array("total" => $list->total(), "rows" => $list->items());
+
+            return json($result);
+        }
+        return $this->view->fetch();
+    }
+
+}

+ 37 - 0
application/admin/controller/LiveRoomLog.php

@@ -0,0 +1,37 @@
+<?php
+
+namespace app\admin\controller;
+
+use app\common\controller\Backend;
+
+/**
+ * 【直播】房间开播日志
+ *
+ * @icon fa fa-circle-o
+ */
+class LiveRoomLog extends Backend
+{
+
+    /**
+     * LiveRoomLog模型对象
+     * @var \app\admin\model\LiveRoomLog
+     */
+    protected $model = null;
+
+    public function _initialize()
+    {
+        parent::_initialize();
+        $this->model = new \app\admin\model\LiveRoomLog;
+
+    }
+
+
+
+    /**
+     * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
+     * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
+     * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
+     */
+
+
+}

+ 72 - 0
application/admin/controller/LiveSuggest.php

@@ -0,0 +1,72 @@
+<?php
+
+namespace app\admin\controller;
+
+use app\common\controller\Backend;
+
+/**
+ * 【直播】问题上报
+ *
+ * @icon fa fa-circle-o
+ */
+class LiveSuggest extends Backend
+{
+
+    /**
+     * LiveSuggest模型对象
+     * @var \app\admin\model\LiveSuggest
+     */
+    protected $model = null;
+
+    public function _initialize()
+    {
+        parent::_initialize();
+        $this->model = new \app\admin\model\LiveSuggest;
+        $this->view->assign("statusList", $this->model->getStatusList());
+    }
+
+
+
+    /**
+     * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
+     * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
+     * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
+     */
+
+
+    /**
+     * 查看
+     */
+    public function index()
+    {
+        //当前是否为关联查询
+        $this->relationSearch = true;
+        //设置过滤方法
+        $this->request->filter(['strip_tags', 'trim']);
+        if ($this->request->isAjax()) {
+            //如果发送的来源是Selectpage,则转发到Selectpage
+            if ($this->request->request('keyField')) {
+                return $this->selectpage();
+            }
+            list($where, $sort, $order, $offset, $limit) = $this->buildparams();
+
+            $list = $this->model
+                    ->with(['user','room'])
+                    ->where($where)
+                    ->order($sort, $order)
+                    ->paginate($limit);
+
+            foreach ($list as $row) {
+                
+                $row->getRelation('user')->visible(['nickname','mobile']);
+				$row->getRelation('room')->visible(['name','logo']);
+            }
+
+            $result = array("total" => $list->total(), "rows" => $list->items());
+
+            return json($result);
+        }
+        return $this->view->fetch();
+    }
+
+}

+ 20 - 0
application/admin/lang/zh-cn/live_report.php

@@ -0,0 +1,20 @@
+<?php
+
+return [
+    'Id'            => 'ID',
+    'User_id'       => '举报用户ID',
+    'Room_id'       => '房间ID',
+    'Room_no'       => '房间编号',
+    'To_user_id'    => '被举报用户ID',
+    'Reason'        => '原因',
+    'Image'         => '图片',
+    'Status'        => '状态',
+    'Status 1'      => '已处理',
+    'Set status to 1'=> '设为已处理',
+    'Status 0'      => '未处理',
+    'Set status to 0'=> '设为未处理',
+    'Create_time'   => '创建时间',
+    'ToUser.nickname' => '被举报用户昵称',
+    'User.nickname' => '举报用户昵称',
+    'Room.name'     => '房间名称'
+];

+ 35 - 0
application/admin/lang/zh-cn/live_room.php

@@ -0,0 +1,35 @@
+<?php
+
+return [
+    'Id'              => 'ID',
+    'User_id'         => '主播ID',
+    'Room_no'         => '房间号',
+    'Name'            => '房间名称',
+    'Logo'            => '房间logo',
+    'Image'           => '房间封面图',
+    'Session'         => '场次编号',
+    'Follow_num'      => '粉丝数',
+    'Talk_status'     => '发言权限',
+    'Talk_status 0'   => '禁止评论',
+    'Talk_status 1'   => '全员可评论',
+    'Talk_status 3'   => '仅粉丝可评论',
+    'Weigh'           => '排序',
+    'Status'          => '状态',
+    'Status 0'        => '未开播',
+    'Set status to 0' => '设为未开播',
+    'Status 1'        => '直播中',
+    'Set status to 1' => '设为直播中',
+    'Status 3'        => '封禁',
+    'Set status to 3' => '设为封禁',
+    'Create_time'     => '创建时间',
+    'User.nickname'   => '主播昵称',
+    'Log.ccu'         => '当前场次实时在线人数',
+    'Log.uv'          => '当前场次访客数',
+    'Log.pv'          => '当前场次浏览量',
+    'Log.goods_sales' => '当前场次商品销量',
+    'Log.share_num'   => '当前场次分享次数',
+    'Log.follow_num'  => '当前场次关注量',
+    'Log.duration'    => '直播时长(秒)',
+    'Log.open_time'   => '开播时间',
+    'Log.close_time'  => '关播时间'
+];

+ 17 - 0
application/admin/lang/zh-cn/live_room_admin.php

@@ -0,0 +1,17 @@
+<?php
+
+return [
+    'Id'            => 'ID',
+    'Room_id'       => '房间ID',
+    'Room_no'       => '房间编号',
+    'User_id'       => '主播用户ID',
+    'Admin_id'      => '管理员用户ID',
+    'Status'        => '状态',
+    'Status 1'      => '正常',
+    'Set status to 1'=> '设为正常',
+    'Status 0'      => '禁用',
+    'Set status to 0'=> '设为禁用',
+    'Create_time'   => '创建时间',
+    'User.nickname' => '昵称',
+    'User.avatar'   => '头像'
+];

+ 19 - 0
application/admin/lang/zh-cn/live_room_log.php

@@ -0,0 +1,19 @@
+<?php
+
+return [
+    'Id'          => 'ID',
+    'User_id'     => '主播ID',
+    'Room_id'     => '房间ID',
+    'Room_no'     => '房间编号',
+    'Session'     => '场次编号',
+    'Like'        => '点赞数',
+    'Ccu'         => '实时在线人数',
+    'Uv'          => '访客数',
+    'Pv'          => '浏览量',
+    'Goods_sales' => '商品销量',
+    'Share_num'   => '分享次数',
+    'Follow_num'  => '关注量',
+    'Duration'    => '直播时长(秒)',
+    'Open_time'   => '开播时间',
+    'Close_time'  => '关播时间'
+];

+ 21 - 0
application/admin/lang/zh-cn/live_suggest.php

@@ -0,0 +1,21 @@
+<?php
+
+return [
+    'Id'            => 'ID',
+    'User_id'       => '用户ID',
+    'Room_id'       => '房间ID',
+    'Room_no'       => '房间编号',
+    'Title'         => '名称',
+    'Content'       => '内容',
+    'Time_desc'     => '卡顿时间',
+    'Status'        => '状态',
+    'Status 1'      => '已处理',
+    'Set status to 1'=> '设为已处理',
+    'Status 0'      => '未处理',
+    'Set status to 0'=> '设为未处理',
+    'Create_time'   => '创建时间',
+    'User.nickname' => '昵称',
+    'User.mobile'   => '手机号',
+    'Room.name'     => '房间名称',
+    'Room.logo'     => '房间logo'
+];

+ 76 - 0
application/admin/model/LiveReport.php

@@ -0,0 +1,76 @@
+<?php
+
+namespace app\admin\model;
+
+use think\Model;
+
+
+class LiveReport extends Model
+{
+
+    
+
+    
+
+    // 表名
+    protected $table = 'live_report';
+    
+    // 自动写入时间戳字段
+    protected $autoWriteTimestamp = false;
+
+    // 定义时间戳字段名
+    protected $createTime = false;
+    protected $updateTime = false;
+    protected $deleteTime = false;
+
+    // 追加属性
+    protected $append = [
+        'status_text',
+        'create_time_text'
+    ];
+    
+
+    
+    public function getStatusList()
+    {
+        return ['1' => __('Status 1'), '0' => __('Status 0')];
+    }
+
+
+    public function getStatusTextAttr($value, $data)
+    {
+        $value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
+        $list = $this->getStatusList();
+        return isset($list[$value]) ? $list[$value] : '';
+    }
+
+
+    public function getCreateTimeTextAttr($value, $data)
+    {
+        $value = $value ? $value : (isset($data['create_time']) ? $data['create_time'] : '');
+        return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
+    }
+
+    protected function setCreateTimeAttr($value)
+    {
+        return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
+    }
+
+
+    public function user()
+    {
+        return $this->belongsTo('User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
+    }
+
+
+    public function toUser()
+    {
+        return $this->belongsTo('User', 'to_user_id', 'id', [], 'LEFT')->setEagerlyType(0);
+    }
+
+
+    public function room()
+    {
+        return $this->belongsTo('app\admin\model\live\Room', 'room_id', 'id', [], 'LEFT')->setEagerlyType(0);
+    }
+}

+ 105 - 0
application/admin/model/LiveRoom.php

@@ -0,0 +1,105 @@
+<?php
+
+namespace app\admin\model;
+
+use think\Model;
+
+
+class LiveRoom extends Model
+{
+
+    
+
+    
+
+    // 表名
+    protected $table = 'live_room';
+    
+    // 自动写入时间戳字段
+    protected $autoWriteTimestamp = false;
+
+    // 定义时间戳字段名
+    protected $createTime = false;
+    protected $updateTime = false;
+    protected $deleteTime = false;
+
+    // 追加属性
+    protected $append = [
+        'talk_status_text',
+        'status_text',
+        'create_time_text',
+        'update_time_text'
+    ];
+    
+
+    protected static function init()
+    {
+        self::afterInsert(function ($row) {
+            $pk = $row->getPk();
+            $row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
+        });
+    }
+
+    
+    public function getTalkStatusList()
+    {
+        return ['0' => __('Talk_status 0'), '1' => __('Talk_status 1'), '3' => __('Talk_status 3')];
+    }
+
+    public function getStatusList()
+    {
+        return ['0' => __('Status 0'), '1' => __('Status 1'), '3' => __('Status 3')];
+    }
+
+
+    public function getTalkStatusTextAttr($value, $data)
+    {
+        $value = $value ? $value : (isset($data['talk_status']) ? $data['talk_status'] : '');
+        $list = $this->getTalkStatusList();
+        return isset($list[$value]) ? $list[$value] : '';
+    }
+
+
+    public function getStatusTextAttr($value, $data)
+    {
+        $value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
+        $list = $this->getStatusList();
+        return isset($list[$value]) ? $list[$value] : '';
+    }
+
+
+    public function getCreateTimeTextAttr($value, $data)
+    {
+        $value = $value ? $value : (isset($data['create_time']) ? $data['create_time'] : '');
+        return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
+    }
+
+
+    public function getUpdateTimeTextAttr($value, $data)
+    {
+        $value = $value ? $value : (isset($data['update_time']) ? $data['update_time'] : '');
+        return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
+    }
+
+    protected function setCreateTimeAttr($value)
+    {
+        return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
+    }
+
+    protected function setUpdateTimeAttr($value)
+    {
+        return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
+    }
+
+
+    public function user()
+    {
+        return $this->belongsTo('User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
+    }
+
+
+    public function log()
+    {
+        return $this->belongsTo('app\admin\model\live\room\Log', 'session', 'session', [], 'LEFT')->setEagerlyType(0);
+    }
+}

+ 64 - 0
application/admin/model/LiveRoomAdmin.php

@@ -0,0 +1,64 @@
+<?php
+
+namespace app\admin\model;
+
+use think\Model;
+
+
+class LiveRoomAdmin extends Model
+{
+
+    
+
+    
+
+    // 表名
+    protected $table = 'live_room_admin';
+    
+    // 自动写入时间戳字段
+    protected $autoWriteTimestamp = false;
+
+    // 定义时间戳字段名
+    protected $createTime = false;
+    protected $updateTime = false;
+    protected $deleteTime = false;
+
+    // 追加属性
+    protected $append = [
+        'status_text',
+        'create_time_text'
+    ];
+    
+
+    
+    public function getStatusList()
+    {
+        return ['1' => __('Status 1'), '0' => __('Status 0')];
+    }
+
+
+    public function getStatusTextAttr($value, $data)
+    {
+        $value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
+        $list = $this->getStatusList();
+        return isset($list[$value]) ? $list[$value] : '';
+    }
+
+
+    public function getCreateTimeTextAttr($value, $data)
+    {
+        $value = $value ? $value : (isset($data['create_time']) ? $data['create_time'] : '');
+        return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
+    }
+
+    protected function setCreateTimeAttr($value)
+    {
+        return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
+    }
+
+
+    public function user()
+    {
+        return $this->belongsTo('User', 'admin_id', 'id', [], 'LEFT')->setEagerlyType(0);
+    }
+}

+ 61 - 0
application/admin/model/LiveRoomLog.php

@@ -0,0 +1,61 @@
+<?php
+
+namespace app\admin\model;
+
+use think\Model;
+
+
+class LiveRoomLog extends Model
+{
+
+    
+
+    
+
+    // 表名
+    protected $table = 'live_room_log';
+    
+    // 自动写入时间戳字段
+    protected $autoWriteTimestamp = false;
+
+    // 定义时间戳字段名
+    protected $createTime = false;
+    protected $updateTime = false;
+    protected $deleteTime = false;
+
+    // 追加属性
+    protected $append = [
+        'open_time_text',
+        'close_time_text'
+    ];
+    
+
+    
+
+
+
+    public function getOpenTimeTextAttr($value, $data)
+    {
+        $value = $value ? $value : (isset($data['open_time']) ? $data['open_time'] : '');
+        return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
+    }
+
+
+    public function getCloseTimeTextAttr($value, $data)
+    {
+        $value = $value ? $value : (isset($data['close_time']) ? $data['close_time'] : '');
+        return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
+    }
+
+    protected function setOpenTimeAttr($value)
+    {
+        return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
+    }
+
+    protected function setCloseTimeAttr($value)
+    {
+        return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
+    }
+
+
+}

+ 70 - 0
application/admin/model/LiveSuggest.php

@@ -0,0 +1,70 @@
+<?php
+
+namespace app\admin\model;
+
+use think\Model;
+
+
+class LiveSuggest extends Model
+{
+
+    
+
+    
+
+    // 表名
+    protected $table = 'live_suggest';
+    
+    // 自动写入时间戳字段
+    protected $autoWriteTimestamp = false;
+
+    // 定义时间戳字段名
+    protected $createTime = false;
+    protected $updateTime = false;
+    protected $deleteTime = false;
+
+    // 追加属性
+    protected $append = [
+        'status_text',
+        'create_time_text'
+    ];
+    
+
+    
+    public function getStatusList()
+    {
+        return ['1' => __('Status 1'), '0' => __('Status 0')];
+    }
+
+
+    public function getStatusTextAttr($value, $data)
+    {
+        $value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
+        $list = $this->getStatusList();
+        return isset($list[$value]) ? $list[$value] : '';
+    }
+
+
+    public function getCreateTimeTextAttr($value, $data)
+    {
+        $value = $value ? $value : (isset($data['create_time']) ? $data['create_time'] : '');
+        return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
+    }
+
+    protected function setCreateTimeAttr($value)
+    {
+        return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
+    }
+
+
+    public function user()
+    {
+        return $this->belongsTo('User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
+    }
+
+
+    public function room()
+    {
+        return $this->belongsTo('app\admin\model\live\Room', 'room_id', 'id', [], 'LEFT')->setEagerlyType(0);
+    }
+}

+ 12 - 0
application/admin/model/live/Room.php

@@ -0,0 +1,12 @@
+<?php
+
+namespace app\admin\model\live;
+
+use think\Model;
+
+class Room extends Model
+{
+    // 表名
+    protected $table = 'live_room';
+    
+}

+ 12 - 0
application/admin/model/live/room/Log.php

@@ -0,0 +1,12 @@
+<?php
+
+namespace app\admin\model\live\room;
+
+use think\Model;
+
+class Log extends Model
+{
+    // 表名
+    protected $table = 'live_room_log';
+    
+}

+ 27 - 0
application/admin/validate/LiveReport.php

@@ -0,0 +1,27 @@
+<?php
+
+namespace app\admin\validate;
+
+use think\Validate;
+
+class LiveReport extends Validate
+{
+    /**
+     * 验证规则
+     */
+    protected $rule = [
+    ];
+    /**
+     * 提示消息
+     */
+    protected $message = [
+    ];
+    /**
+     * 验证场景
+     */
+    protected $scene = [
+        'add'  => [],
+        'edit' => [],
+    ];
+    
+}

+ 27 - 0
application/admin/validate/LiveRoom.php

@@ -0,0 +1,27 @@
+<?php
+
+namespace app\admin\validate;
+
+use think\Validate;
+
+class LiveRoom extends Validate
+{
+    /**
+     * 验证规则
+     */
+    protected $rule = [
+    ];
+    /**
+     * 提示消息
+     */
+    protected $message = [
+    ];
+    /**
+     * 验证场景
+     */
+    protected $scene = [
+        'add'  => [],
+        'edit' => [],
+    ];
+    
+}

+ 27 - 0
application/admin/validate/LiveRoomAdmin.php

@@ -0,0 +1,27 @@
+<?php
+
+namespace app\admin\validate;
+
+use think\Validate;
+
+class LiveRoomAdmin extends Validate
+{
+    /**
+     * 验证规则
+     */
+    protected $rule = [
+    ];
+    /**
+     * 提示消息
+     */
+    protected $message = [
+    ];
+    /**
+     * 验证场景
+     */
+    protected $scene = [
+        'add'  => [],
+        'edit' => [],
+    ];
+    
+}

+ 27 - 0
application/admin/validate/LiveRoomLog.php

@@ -0,0 +1,27 @@
+<?php
+
+namespace app\admin\validate;
+
+use think\Validate;
+
+class LiveRoomLog extends Validate
+{
+    /**
+     * 验证规则
+     */
+    protected $rule = [
+    ];
+    /**
+     * 提示消息
+     */
+    protected $message = [
+    ];
+    /**
+     * 验证场景
+     */
+    protected $scene = [
+        'add'  => [],
+        'edit' => [],
+    ];
+    
+}

+ 27 - 0
application/admin/validate/LiveSuggest.php

@@ -0,0 +1,27 @@
+<?php
+
+namespace app\admin\validate;
+
+use think\Validate;
+
+class LiveSuggest extends Validate
+{
+    /**
+     * 验证规则
+     */
+    protected $rule = [
+    ];
+    /**
+     * 提示消息
+     */
+    protected $message = [
+    ];
+    /**
+     * 验证场景
+     */
+    protected $scene = [
+        'add'  => [],
+        'edit' => [],
+    ];
+    
+}

+ 71 - 0
application/admin/view/live_report/add.html

@@ -0,0 +1,71 @@
+<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
+
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Room_id')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-room_id" data-rule="required" data-source="live/room/index" class="form-control selectpage" name="row[room_id]" type="text" value="">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Room_no')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-room_no" data-rule="required" class="form-control" name="row[room_no]" type="text" value="">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('To_user_id')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-to_user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[to_user_id]" type="text" value="">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Reason')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-reason" data-rule="required" class="form-control" name="row[reason]" type="text" value="">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <div class="input-group">
+                <input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text" value="">
+                <div class="input-group-addon no-border no-padding">
+                    <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
+                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
+                </div>
+                <span class="msg-box n-right" for="c-image"></span>
+            </div>
+            <ul class="row list-inline faupload-preview" id="p-image"></ul>
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            
+            <div class="radio">
+            {foreach name="statusList" item="vo"}
+            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label> 
+            {/foreach}
+            </div>
+
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-create_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:date('Y-m-d H:i:s')}">
+        </div>
+    </div>
+    <div class="form-group layer-footer">
+        <label class="control-label col-xs-12 col-sm-2"></label>
+        <div class="col-xs-12 col-sm-8">
+            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
+        </div>
+    </div>
+</form>

+ 71 - 0
application/admin/view/live_report/edit.html

@@ -0,0 +1,71 @@
+<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
+
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">-->
+<!--        </div>-->
+<!--    </div>-->
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Room_id')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-room_id" data-rule="required" data-source="live/room/index" class="form-control selectpage" name="row[room_id]" type="text" value="{$row.room_id|htmlentities}">-->
+<!--        </div>-->
+<!--    </div>-->
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Room_no')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-room_no" data-rule="required" class="form-control" name="row[room_no]" type="text" value="{$row.room_no|htmlentities}">-->
+<!--        </div>-->
+<!--    </div>-->
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('To_user_id')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-to_user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[to_user_id]" type="text" value="{$row.to_user_id|htmlentities}">-->
+<!--        </div>-->
+<!--    </div>-->
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Reason')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-reason" data-rule="required" class="form-control" name="row[reason]" type="text" value="{$row.reason|htmlentities}">-->
+<!--        </div>-->
+<!--    </div>-->
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <div class="input-group">-->
+<!--                <input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text" value="{$row.image|htmlentities}">-->
+<!--                <div class="input-group-addon no-border no-padding">-->
+<!--                    <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>-->
+<!--                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>-->
+<!--                </div>-->
+<!--                <span class="msg-box n-right" for="c-image"></span>-->
+<!--            </div>-->
+<!--            <ul class="row list-inline faupload-preview" id="p-image"></ul>-->
+<!--        </div>-->
+<!--    </div>-->
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            
+            <div class="radio">
+            {foreach name="statusList" item="vo"}
+            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> 
+            {/foreach}
+            </div>
+
+        </div>
+    </div>
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-create_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:$row.create_time?datetime($row.create_time):''}">-->
+<!--        </div>-->
+<!--    </div>-->
+    <div class="form-group layer-footer">
+        <label class="control-label col-xs-12 col-sm-2"></label>
+        <div class="col-xs-12 col-sm-8">
+            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
+        </div>
+    </div>
+</form>

+ 46 - 0
application/admin/view/live_report/index.html

@@ -0,0 +1,46 @@
+<div class="panel panel-default panel-intro">
+    
+    <div class="panel-heading">
+        {:build_heading(null,FALSE)}
+        <ul class="nav nav-tabs" data-field="status">
+            <li class="{:$Think.get.status === null ? 'active' : ''}"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
+            {foreach name="statusList" item="vo"}
+            <li class="{:$Think.get.status === (string)$key ? 'active' : ''}"><a href="#t-{$key}" data-value="{$key}" data-toggle="tab">{$vo}</a></li>
+            {/foreach}
+        </ul>
+    </div>
+
+
+    <div class="panel-body">
+        <div id="myTabContent" class="tab-content">
+            <div class="tab-pane fade active in" id="one">
+                <div class="widget-body no-padding">
+                    <div id="toolbar" class="toolbar">
+<!--                        <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>-->
+<!--                        <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('live_report/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>-->
+<!--                        <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('live_report/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>-->
+<!--                        <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('live_report/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>-->
+                        
+
+                        <div class="dropdown btn-group {:$auth->check('live_report/multi')?'':'hide'}">
+                            <a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
+                            <ul class="dropdown-menu text-left" role="menu">
+                                {foreach name="statusList" item="vo"}
+                                <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:" data-params="status={$key}">{:__('Set status to ' . $key)}</a></li>
+                                {/foreach}
+                            </ul>
+                        </div>
+
+                        
+                    </div>
+                    <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
+                           data-operate-edit="{:$auth->check('live_report/edit')}"
+                           data-operate-del="{:$auth->check('live_report/del')}"
+                           width="100%">
+                    </table>
+                </div>
+            </div>
+
+        </div>
+    </div>
+</div>

+ 101 - 0
application/admin/view/live_room/add.html

@@ -0,0 +1,101 @@
+<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
+
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Room_no')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-room_no" data-rule="required" class="form-control" name="row[room_no]" type="text" value="">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Logo')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-logo" data-rule="required" class="form-control" name="row[logo]" type="text" value="">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <div class="input-group">
+                <input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text" value="">
+                <div class="input-group-addon no-border no-padding">
+                    <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
+                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
+                </div>
+                <span class="msg-box n-right" for="c-image"></span>
+            </div>
+            <ul class="row list-inline faupload-preview" id="p-image"></ul>
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Session')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-session" data-rule="required" class="form-control" name="row[session]" type="text" value="">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Follow_num')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-follow_num" data-rule="required" class="form-control" name="row[follow_num]" type="number" value="0">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Talk_status')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            
+            <div class="radio">
+            {foreach name="talkStatusList" item="vo"}
+            <label for="row[talk_status]-{$key}"><input id="row[talk_status]-{$key}" name="row[talk_status]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label> 
+            {/foreach}
+            </div>
+
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="0">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            
+            <div class="radio">
+            {foreach name="statusList" item="vo"}
+            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="0"}checked{/in} /> {$vo}</label> 
+            {/foreach}
+            </div>
+
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-create_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:date('Y-m-d H:i:s')}">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Update_time')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-update_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[update_time]" type="text" value="{:date('Y-m-d H:i:s')}">
+        </div>
+    </div>
+    <div class="form-group layer-footer">
+        <label class="control-label col-xs-12 col-sm-2"></label>
+        <div class="col-xs-12 col-sm-8">
+            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
+        </div>
+    </div>
+</form>

+ 109 - 0
application/admin/view/live_room/edit.html

@@ -0,0 +1,109 @@
+<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
+
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">-->
+<!--        </div>-->
+<!--    </div>-->
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Room_no')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-room_no" data-rule="required" class="form-control" name="row[room_no]" type="text" value="{$row.room_no|htmlentities}">-->
+<!--        </div>-->
+<!--    </div>-->
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Logo')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <div class="input-group">
+                <input id="c-logo" data-rule="required" class="form-control" size="50" name="row[logo]" type="text" value="{$row.logo|htmlentities}">
+                <div class="input-group-addon no-border no-padding">
+                    <span><button type="button" id="faupload-logo" class="btn btn-danger faupload" data-input-id="c-logo" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-logo"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
+                    <span><button type="button" id="fachoose-logo" class="btn btn-primary fachoose" data-input-id="c-logo" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
+                </div>
+                <span class="msg-box n-right" for="c-logo"></span>
+            </div>
+            <ul class="row list-inline faupload-preview" id="p-logo"></ul>
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <div class="input-group">
+                <input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text" value="{$row.image|htmlentities}">
+                <div class="input-group-addon no-border no-padding">
+                    <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
+                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
+                </div>
+                <span class="msg-box n-right" for="c-image"></span>
+            </div>
+            <ul class="row list-inline faupload-preview" id="p-image"></ul>
+        </div>
+    </div>
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Session')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-session" data-rule="required" class="form-control" name="row[session]" type="text" value="{$row.session|htmlentities}">-->
+<!--        </div>-->
+<!--    </div>-->
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Follow_num')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-follow_num" data-rule="required" class="form-control" name="row[follow_num]" type="number" value="{$row.follow_num|htmlentities}">-->
+<!--        </div>-->
+<!--    </div>-->
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Talk_status')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            -->
+<!--            <div class="radio">-->
+<!--            {foreach name="talkStatusList" item="vo"}-->
+<!--            <label for="row[talk_status]-{$key}"><input id="row[talk_status]-{$key}" name="row[talk_status]" type="radio" value="{$key}" {in name="key" value="$row.talk_status"}checked{/in} /> {$vo}</label> -->
+<!--            {/foreach}-->
+<!--            </div>-->
+
+<!--        </div>-->
+<!--    </div>-->
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
+        <div class="col-xs-12 col-sm-8">
+
+            <div class="radio">
+            {foreach name="statusList" item="vo"}
+            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
+            {/foreach}
+            </div>
+
+        </div>
+    </div>
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-create_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:$row.create_time?datetime($row.create_time):''}">-->
+<!--        </div>-->
+<!--    </div>-->
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Update_time')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-update_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[update_time]" type="text" value="{:$row.update_time?datetime($row.update_time):''}">-->
+<!--        </div>-->
+<!--    </div>-->
+    <div class="form-group layer-footer">
+        <label class="control-label col-xs-12 col-sm-2"></label>
+        <div class="col-xs-12 col-sm-8">
+            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
+        </div>
+    </div>
+</form>

+ 46 - 0
application/admin/view/live_room/index.html

@@ -0,0 +1,46 @@
+<div class="panel panel-default panel-intro">
+    
+    <div class="panel-heading">
+        {:build_heading(null,FALSE)}
+        <ul class="nav nav-tabs" data-field="status">
+            <li class="{:$Think.get.status === null ? 'active' : ''}"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
+            {foreach name="statusList" item="vo"}
+            <li class="{:$Think.get.status === (string)$key ? 'active' : ''}"><a href="#t-{$key}" data-value="{$key}" data-toggle="tab">{$vo}</a></li>
+            {/foreach}
+        </ul>
+    </div>
+
+
+    <div class="panel-body">
+        <div id="myTabContent" class="tab-content">
+            <div class="tab-pane fade active in" id="one">
+                <div class="widget-body no-padding">
+                    <div id="toolbar" class="toolbar">
+                        <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
+<!--                        <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('live_room/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>-->
+<!--                        <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('live_room/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>-->
+<!--                        <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('live_room/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>-->
+                        
+
+<!--                        <div class="dropdown btn-group {:$auth->check('live_room/multi')?'':'hide'}">-->
+<!--                            <a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
+<!--                            <ul class="dropdown-menu text-left" role="menu">-->
+<!--                                {foreach name="statusList" item="vo"}-->
+<!--                                <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:" data-params="status={$key}">{:__('Set status to ' . $key)}</a></li>-->
+<!--                                {/foreach}-->
+<!--                            </ul>-->
+<!--                        </div>-->
+
+                        
+                    </div>
+                    <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
+                           data-operate-edit="{:$auth->check('live_room/edit')}"
+                           data-operate-del="{:$auth->check('live_room/del')}"
+                           width="100%">
+                    </table>
+                </div>
+            </div>
+
+        </div>
+    </div>
+</div>

+ 45 - 0
application/admin/view/live_room_admin/add.html

@@ -0,0 +1,45 @@
+<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
+
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Room_id')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-room_id" data-rule="required" data-source="live_room/index" class="form-control selectpage" name="row[room_id]" type="text" value="">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Room_no')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-room_no" data-rule="required" class="form-control" name="row[room_no]" type="text" value="">
+        </div>
+    </div>
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="">-->
+<!--        </div>-->
+<!--    </div>-->
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            
+            <div class="radio">
+            {foreach name="statusList" item="vo"}
+            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label> 
+            {/foreach}
+            </div>
+
+        </div>
+    </div>
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-create_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:date('Y-m-d H:i:s')}">-->
+<!--        </div>-->
+<!--    </div>-->
+    <div class="form-group layer-footer">
+        <label class="control-label col-xs-12 col-sm-2"></label>
+        <div class="col-xs-12 col-sm-8">
+            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
+        </div>
+    </div>
+</form>

+ 45 - 0
application/admin/view/live_room_admin/edit.html

@@ -0,0 +1,45 @@
+<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
+
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Room_id')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-room_id" data-rule="required" data-source="live_room/index" class="form-control selectpage" name="row[room_id]" type="text" value="{$row.room_id|htmlentities}">-->
+<!--        </div>-->
+<!--    </div>-->
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Room_no')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-room_no" data-rule="required" class="form-control" name="row[room_no]" type="text" value="{$row.room_no|htmlentities}">-->
+<!--        </div>-->
+<!--    </div>-->
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">-->
+<!--        </div>-->
+<!--    </div>-->
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            
+            <div class="radio">
+            {foreach name="statusList" item="vo"}
+            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> 
+            {/foreach}
+            </div>
+
+        </div>
+    </div>
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-create_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:$row.create_time?datetime($row.create_time):''}">-->
+<!--        </div>-->
+<!--    </div>-->
+    <div class="form-group layer-footer">
+        <label class="control-label col-xs-12 col-sm-2"></label>
+        <div class="col-xs-12 col-sm-8">
+            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
+        </div>
+    </div>
+</form>

+ 46 - 0
application/admin/view/live_room_admin/index.html

@@ -0,0 +1,46 @@
+<div class="panel panel-default panel-intro">
+    
+    <div class="panel-heading">
+        {:build_heading(null,FALSE)}
+        <ul class="nav nav-tabs" data-field="status">
+            <li class="{:$Think.get.status === null ? 'active' : ''}"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
+            {foreach name="statusList" item="vo"}
+            <li class="{:$Think.get.status === (string)$key ? 'active' : ''}"><a href="#t-{$key}" data-value="{$key}" data-toggle="tab">{$vo}</a></li>
+            {/foreach}
+        </ul>
+    </div>
+
+
+    <div class="panel-body">
+        <div id="myTabContent" class="tab-content">
+            <div class="tab-pane fade active in" id="one">
+                <div class="widget-body no-padding">
+                    <div id="toolbar" class="toolbar">
+<!--                        <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>-->
+<!--                        <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('live_room_admin/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>-->
+<!--                        <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('live_room_admin/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>-->
+<!--                        <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('live_room_admin/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>-->
+                        
+
+                        <div class="dropdown btn-group {:$auth->check('live_room_admin/multi')?'':'hide'}">
+                            <a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
+                            <ul class="dropdown-menu text-left" role="menu">
+                                {foreach name="statusList" item="vo"}
+                                <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:" data-params="status={$key}">{:__('Set status to ' . $key)}</a></li>
+                                {/foreach}
+                            </ul>
+                        </div>
+
+                        
+                    </div>
+                    <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
+                           data-operate-edit="{:$auth->check('live_room_admin/edit')}"
+                           data-operate-del="{:$auth->check('live_room_admin/del')}"
+                           width="100%">
+                    </table>
+                </div>
+            </div>
+
+        </div>
+    </div>
+</div>

+ 93 - 0
application/admin/view/live_room_log/add.html

@@ -0,0 +1,93 @@
+<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
+
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Room_id')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-room_id" data-rule="required" data-source="room/index" class="form-control selectpage" name="row[room_id]" type="text" value="">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Room_no')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-room_no" data-rule="required" class="form-control" name="row[room_no]" type="text" value="">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Session')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-session" data-rule="required" class="form-control" name="row[session]" type="text" value="">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Like')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-like" data-rule="required" class="form-control" name="row[like]" type="number" value="0">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Ccu')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-ccu" data-rule="required" class="form-control" name="row[ccu]" type="number" value="0">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Uv')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-uv" data-rule="required" class="form-control" name="row[uv]" type="number" value="0">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Pv')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-pv" data-rule="required" class="form-control" name="row[pv]" type="number" value="0">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Goods_sales')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-goods_sales" data-rule="required" class="form-control" name="row[goods_sales]" type="number" value="0">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Share_num')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-share_num" data-rule="required" class="form-control" name="row[share_num]" type="number" value="0">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Follow_num')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-follow_num" data-rule="required" class="form-control" name="row[follow_num]" type="number" value="0">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Duration')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-duration" data-rule="required" class="form-control" name="row[duration]" type="number" value="0">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Open_time')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-open_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[open_time]" type="text" value="{:date('Y-m-d H:i:s')}">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Close_time')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-close_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[close_time]" type="text" value="{:date('Y-m-d H:i:s')}">
+        </div>
+    </div>
+    <div class="form-group layer-footer">
+        <label class="control-label col-xs-12 col-sm-2"></label>
+        <div class="col-xs-12 col-sm-8">
+            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
+        </div>
+    </div>
+</form>

+ 93 - 0
application/admin/view/live_room_log/edit.html

@@ -0,0 +1,93 @@
+<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
+
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Room_id')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-room_id" data-rule="required" data-source="room/index" class="form-control selectpage" name="row[room_id]" type="text" value="{$row.room_id|htmlentities}">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Room_no')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-room_no" data-rule="required" class="form-control" name="row[room_no]" type="text" value="{$row.room_no|htmlentities}">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Session')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-session" data-rule="required" class="form-control" name="row[session]" type="text" value="{$row.session|htmlentities}">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Like')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-like" data-rule="required" class="form-control" name="row[like]" type="number" value="{$row.like|htmlentities}">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Ccu')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-ccu" data-rule="required" class="form-control" name="row[ccu]" type="number" value="{$row.ccu|htmlentities}">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Uv')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-uv" data-rule="required" class="form-control" name="row[uv]" type="number" value="{$row.uv|htmlentities}">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Pv')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-pv" data-rule="required" class="form-control" name="row[pv]" type="number" value="{$row.pv|htmlentities}">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Goods_sales')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-goods_sales" data-rule="required" class="form-control" name="row[goods_sales]" type="number" value="{$row.goods_sales|htmlentities}">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Share_num')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-share_num" data-rule="required" class="form-control" name="row[share_num]" type="number" value="{$row.share_num|htmlentities}">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Follow_num')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-follow_num" data-rule="required" class="form-control" name="row[follow_num]" type="number" value="{$row.follow_num|htmlentities}">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Duration')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-duration" data-rule="required" class="form-control" name="row[duration]" type="number" value="{$row.duration|htmlentities}">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Open_time')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-open_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[open_time]" type="text" value="{:$row.open_time?datetime($row.open_time):''}">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Close_time')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-close_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[close_time]" type="text" value="{:$row.close_time?datetime($row.close_time):''}">
+        </div>
+    </div>
+    <div class="form-group layer-footer">
+        <label class="control-label col-xs-12 col-sm-2"></label>
+        <div class="col-xs-12 col-sm-8">
+            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
+        </div>
+    </div>
+</form>

+ 29 - 0
application/admin/view/live_room_log/index.html

@@ -0,0 +1,29 @@
+<div class="panel panel-default panel-intro">
+    {:build_heading()}
+
+    <div class="panel-body">
+        <div id="myTabContent" class="tab-content">
+            <div class="tab-pane fade active in" id="one">
+                <div class="widget-body no-padding">
+                    <div id="toolbar" class="toolbar">
+<!--                        <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>-->
+<!--                        <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('live_room_log/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>-->
+<!--                        <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('live_room_log/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>-->
+<!--                        <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('live_room_log/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>-->
+                        
+
+                        
+
+                        
+                    </div>
+                    <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
+                           data-operate-edit="{:$auth->check('live_room_log/edit')}"
+                           data-operate-del="{:$auth->check('live_room_log/del')}"
+                           width="100%">
+                    </table>
+                </div>
+            </div>
+
+        </div>
+    </div>
+</div>

+ 63 - 0
application/admin/view/live_suggest/add.html

@@ -0,0 +1,63 @@
+<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
+
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Room_id')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-room_id" data-rule="required" data-source="live/room/index" class="form-control selectpage" name="row[room_id]" type="text" value="">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Room_no')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-room_no" data-rule="required" class="form-control" name="row[room_no]" type="text" value="">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-content" data-rule="required" class="form-control" name="row[content]" type="text" value="">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Time_desc')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-time_desc" data-rule="required" class="form-control" name="row[time_desc]" type="text" value="">
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            
+            <div class="radio">
+            {foreach name="statusList" item="vo"}
+            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label> 
+            {/foreach}
+            </div>
+
+        </div>
+    </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-create_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:date('Y-m-d H:i:s')}">
+        </div>
+    </div>
+    <div class="form-group layer-footer">
+        <label class="control-label col-xs-12 col-sm-2"></label>
+        <div class="col-xs-12 col-sm-8">
+            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
+        </div>
+    </div>
+</form>

+ 63 - 0
application/admin/view/live_suggest/edit.html

@@ -0,0 +1,63 @@
+<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
+
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">-->
+<!--        </div>-->
+<!--    </div>-->
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Room_id')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-room_id" data-rule="required" data-source="live/room/index" class="form-control selectpage" name="row[room_id]" type="text" value="{$row.room_id|htmlentities}">-->
+<!--        </div>-->
+<!--    </div>-->
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Room_no')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-room_no" data-rule="required" class="form-control" name="row[room_no]" type="text" value="{$row.room_no|htmlentities}">-->
+<!--        </div>-->
+<!--    </div>-->
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">-->
+<!--        </div>-->
+<!--    </div>-->
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-content" data-rule="required" class="form-control" name="row[content]" type="text" value="{$row.content|htmlentities}">-->
+<!--        </div>-->
+<!--    </div>-->
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Time_desc')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-time_desc" data-rule="required" class="form-control" name="row[time_desc]" type="text" value="{$row.time_desc|htmlentities}">-->
+<!--        </div>-->
+<!--    </div>-->
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            
+            <div class="radio">
+            {foreach name="statusList" item="vo"}
+            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> 
+            {/foreach}
+            </div>
+
+        </div>
+    </div>
+<!--    <div class="form-group">-->
+<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>-->
+<!--        <div class="col-xs-12 col-sm-8">-->
+<!--            <input id="c-create_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:$row.create_time?datetime($row.create_time):''}">-->
+<!--        </div>-->
+<!--    </div>-->
+    <div class="form-group layer-footer">
+        <label class="control-label col-xs-12 col-sm-2"></label>
+        <div class="col-xs-12 col-sm-8">
+            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
+        </div>
+    </div>
+</form>

+ 46 - 0
application/admin/view/live_suggest/index.html

@@ -0,0 +1,46 @@
+<div class="panel panel-default panel-intro">
+    
+    <div class="panel-heading">
+        {:build_heading(null,FALSE)}
+        <ul class="nav nav-tabs" data-field="status">
+            <li class="{:$Think.get.status === null ? 'active' : ''}"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
+            {foreach name="statusList" item="vo"}
+            <li class="{:$Think.get.status === (string)$key ? 'active' : ''}"><a href="#t-{$key}" data-value="{$key}" data-toggle="tab">{$vo}</a></li>
+            {/foreach}
+        </ul>
+    </div>
+
+
+    <div class="panel-body">
+        <div id="myTabContent" class="tab-content">
+            <div class="tab-pane fade active in" id="one">
+                <div class="widget-body no-padding">
+                    <div id="toolbar" class="toolbar">
+<!--                        <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>-->
+<!--                        <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('live_suggest/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>-->
+<!--                        <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('live_suggest/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>-->
+<!--                        <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('live_suggest/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>-->
+                        
+
+                        <div class="dropdown btn-group {:$auth->check('live_suggest/multi')?'':'hide'}">
+                            <a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
+                            <ul class="dropdown-menu text-left" role="menu">
+                                {foreach name="statusList" item="vo"}
+                                <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:" data-params="status={$key}">{:__('Set status to ' . $key)}</a></li>
+                                {/foreach}
+                            </ul>
+                        </div>
+
+                        
+                    </div>
+                    <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
+                           data-operate-edit="{:$auth->check('live_suggest/edit')}"
+                           data-operate-del="{:$auth->check('live_suggest/del')}"
+                           width="100%">
+                    </table>
+                </div>
+            </div>
+
+        </div>
+    </div>
+</div>

+ 1 - 1
application/api/controller/Index.php

@@ -27,7 +27,7 @@ class Index extends Api
     {
         $is_hot = input('is_hot','');
         $query = Db::name('news')->field('id,title,image,create_time');
-        if (in_array($is_hot,[0,1])){
+        if (in_array($is_hot,[1])){
             $query->where('is_hot',$is_hot);
         }
         $list = $query->where('status',1)->order('weigh desc')->order('id desc')->autopage()->select();

+ 25 - 1
application/utils/Service/Tencent/TencentIm.php

@@ -182,7 +182,7 @@ class TencentIm extends Module
      * @param $params // 其他参数
      * @return bool
      */
-    public function create_group($user_id, $room_no, $room_name, $type = 'Public', $params = [])
+    public function create_group($user_id, $room_no, $room_name, $type = 'AVChatRoom', $params = [])
     {
         $this->config['identifier'] = (string)$user_id;// 群主 ID
         $data = [
@@ -221,6 +221,30 @@ class TencentIm extends Module
         return $this->success('解散成功', $res);
     }
 
+    /**
+     * 创建群组
+     * @param $user_id
+     * @param $room_no
+     * @param $room_name
+     * @param $type
+     * @param $params // 其他参数
+     * @return bool
+     */
+    public function modify_group_base_info($room_no, $room_name, $face_url = '', $params = [])
+    {
+        $data = [
+            'GroupId' => (string)$room_no,        // 自定义群组 ID
+            'Name'    => $room_name,
+            'FaceUrl' => $face_url,
+        ];
+        $res  = $this->postJson('/v4/group_open_http_svc/modify_group_base_info', array_merge($data, $params));
+        if (empty($res['ActionStatus']) || $res['ActionStatus'] != 'OK') {
+            return $this->error(!empty($res['ErrorInfo']) ? $res['ErrorInfo'] : 'im error', $res ?? []);
+        }
+
+        return $this->success('创建成功', $res);
+    }
+
     // 发送群系统消息
     public function send_group_system_message($room_no,$content)
     {

+ 65 - 0
public/assets/js/backend/live_report.js

@@ -0,0 +1,65 @@
+define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
+
+    var Controller = {
+        index: function () {
+            // 初始化表格参数配置
+            Table.api.init({
+                extend: {
+                    index_url: 'live_report/index' + location.search,
+                    add_url: 'live_report/add',
+                    edit_url: 'live_report/edit',
+                    del_url: 'live_report/del',
+                    multi_url: 'live_report/multi',
+                    import_url: 'live_report/import',
+                    table: 'live_report',
+                }
+            });
+
+            var table = $("#table");
+
+            // 初始化表格
+            table.bootstrapTable({
+                url: $.fn.bootstrapTable.defaults.extend.index_url,
+                pk: 'id',
+                sortName: 'id',
+                columns: [
+                    [
+                        {checkbox: true},
+                        {field: 'id', title: __('Id')},
+                        {field: 'user_id', title: __('User_id')},
+                        {field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'},
+
+                        {field: 'to_user_id', title: __('To_user_id')},
+                        {field: 'to_user.nickname', title: __('ToUser.nickname'), operate: 'LIKE'},
+
+                        {field: 'room_id', title: __('Room_id')},
+                        {field: 'room_no', title: __('Room_no'), operate: 'LIKE'},
+                        {field: 'room.name', title: __('Room.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
+
+                        {field: 'reason', title: __('Reason'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
+                        {field: 'image', title: __('Image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
+                        {field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"0":__('Status 0')}, formatter: Table.api.formatter.status},
+                        {field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
+
+                        {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
+                    ]
+                ]
+            });
+
+            // 为表格绑定事件
+            Table.api.bindevent(table);
+        },
+        add: function () {
+            Controller.api.bindevent();
+        },
+        edit: function () {
+            Controller.api.bindevent();
+        },
+        api: {
+            bindevent: function () {
+                Form.api.bindevent($("form[role=form]"));
+            }
+        }
+    };
+    return Controller;
+});

+ 107 - 0
public/assets/js/backend/live_room.js

@@ -0,0 +1,107 @@
+define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
+
+    var Controller = {
+        index: function () {
+            // 初始化表格参数配置
+            Table.api.init({
+                extend: {
+                    index_url: 'live_room/index' + location.search,
+                    add_url: 'live_room/add',
+                    edit_url: 'live_room/edit',
+                    del_url: 'live_room/del',
+                    multi_url: 'live_room/multi',
+                    import_url: 'live_room/import',
+                    table: 'live_room',
+                }
+            });
+
+            var table = $("#table");
+
+            // 初始化表格
+            table.bootstrapTable({
+                url: $.fn.bootstrapTable.defaults.extend.index_url,
+                pk: 'id',
+                sortName: 'weigh',
+                fixedColumns: true,
+                fixedRightNumber: 1,
+                columns: [
+                    [
+                        {checkbox: true},
+                        {field: 'id', title: __('Id')},
+                        {field: 'user_id', title: __('User_id')},
+                        {field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'},
+                        {field: 'logo', title: __('Logo'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
+                        {field: 'room_no', title: __('Room_no'), operate: 'LIKE'},
+                        {field: 'name', title: __('Name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
+                        {field: 'image', title: __('Image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
+                        {field: 'session', title: __('Session'), operate: 'LIKE'},
+                        {field: 'follow_num', title: __('Follow_num')},
+                        {field: 'talk_status', title: __('Talk_status'), searchList: {"0":__('Talk_status 0'),"1":__('Talk_status 1'),"3":__('Talk_status 3')}, formatter: Table.api.formatter.status},
+                        {field: 'weigh', title: __('Weigh'), operate: false},
+                        {field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"1":__('Status 1'),"3":__('Status 3')}, formatter: Table.api.formatter.status},
+                        // {field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
+                        // {field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
+
+                        {field: 'log.ccu', title: __('Log.ccu')},
+                        {field: 'log.uv', title: __('Log.uv')},
+                        {field: 'log.pv', title: __('Log.pv')},
+                        {field: 'log.goods_sales', title: __('Log.goods_sales')},
+                        {field: 'log.share_num', title: __('Log.share_num')},
+                        {field: 'log.follow_num', title: __('Log.follow_num')},
+                        {field: 'log.duration', title: __('Log.duration')},
+                        {field: 'log.open_time', title: __('Log.open_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
+                        {field: 'log.close_time', title: __('Log.close_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
+                        {
+                            field: 'operate',
+                            title: __('Operate'),
+                            table: table,
+                            events: Table.api.events.operate,
+                            formatter: Table.api.formatter.operate,
+                            buttons: [
+                                {
+                                    name: 'admin',
+                                    text: '房管',
+                                    title: '房管',
+                                    originalTitle:'房管',
+                                    classname: 'btn btn-xs btn-success btn-dialog btn-selectuser',
+                                    // icon: 'fa fa-jpy',
+                                    url: 'live_room_admin/index/room_id/{id}?dialog=1',
+                                    callback: function (data) {
+                                        Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"});
+                                    }
+                                },
+                                {
+                                    name: 'log',
+                                    text: '开播场次',
+                                    title: '开播场次',
+                                    originalTitle:'开播场次',
+                                    classname: 'btn btn-xs btn-success btn-dialog btn-selectuser',
+                                    // icon: 'fa fa-jpy',
+                                    url: 'live_room_log/index/room_id/{id}?dialog=1',
+                                    callback: function (data) {
+                                        Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"});
+                                    }
+                                }
+                            ]
+                        }
+                    ]
+                ]
+            });
+
+            // 为表格绑定事件
+            Table.api.bindevent(table);
+        },
+        add: function () {
+            Controller.api.bindevent();
+        },
+        edit: function () {
+            Controller.api.bindevent();
+        },
+        api: {
+            bindevent: function () {
+                Form.api.bindevent($("form[role=form]"));
+            }
+        }
+    };
+    return Controller;
+});

+ 59 - 0
public/assets/js/backend/live_room_admin.js

@@ -0,0 +1,59 @@
+define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
+
+    var Controller = {
+        index: function () {
+            // 初始化表格参数配置
+            Table.api.init({
+                extend: {
+                    index_url: 'live_room_admin/index' + location.search,
+                    add_url: 'live_room_admin/add',
+                    edit_url: 'live_room_admin/edit',
+                    del_url: 'live_room_admin/del',
+                    multi_url: 'live_room_admin/multi',
+                    import_url: 'live_room_admin/import',
+                    table: 'live_room_admin',
+                }
+            });
+
+            var table = $("#table");
+
+            // 初始化表格
+            table.bootstrapTable({
+                url: $.fn.bootstrapTable.defaults.extend.index_url,
+                pk: 'id',
+                sortName: 'id',
+                columns: [
+                    [
+                        {checkbox: true},
+                        {field: 'id', title: __('Id')},
+                        {field: 'room_id', title: __('Room_id')},
+                        {field: 'room_no', title: __('Room_no'), operate: 'LIKE'},
+                        // {field: 'user_id', title: __('User_id')},
+                        {field: 'admin_id', title: __('Admin_id')},
+                        {field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'},
+                        {field: 'user.avatar', title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
+                        {field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"0":__('Status 0')}, formatter: Table.api.formatter.status},
+                        {field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
+
+                        {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
+                    ]
+                ]
+            });
+
+            // 为表格绑定事件
+            Table.api.bindevent(table);
+        },
+        add: function () {
+            Controller.api.bindevent();
+        },
+        edit: function () {
+            Controller.api.bindevent();
+        },
+        api: {
+            bindevent: function () {
+                Form.api.bindevent($("form[role=form]"));
+            }
+        }
+    };
+    return Controller;
+});

+ 67 - 0
public/assets/js/backend/live_room_log.js

@@ -0,0 +1,67 @@
+define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
+
+    var Controller = {
+        index: function () {
+            // 初始化表格参数配置
+            Table.api.init({
+                extend: {
+                    index_url: 'live_room_log/index' + location.search,
+                    add_url: 'live_room_log/add',
+                    edit_url: 'live_room_log/edit',
+                    del_url: 'live_room_log/del',
+                    multi_url: 'live_room_log/multi',
+                    import_url: 'live_room_log/import',
+                    table: 'live_room_log',
+                }
+            });
+
+            var table = $("#table");
+
+            // 初始化表格
+            table.bootstrapTable({
+                url: $.fn.bootstrapTable.defaults.extend.index_url,
+                pk: 'id',
+                sortName: 'id',
+                fixedColumns: true,
+                fixedRightNumber: 1,
+                columns: [
+                    [
+                        {checkbox: true},
+                        {field: 'id', title: __('Id')},
+                        {field: 'open_time', title: __('Open_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
+                        {field: 'close_time', title: __('Close_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
+                        {field: 'session', title: __('Session'), operate: 'LIKE'},
+                        {field: 'like', title: __('Like')},
+                        {field: 'ccu', title: __('Ccu')},
+                        {field: 'uv', title: __('Uv')},
+                        {field: 'pv', title: __('Pv')},
+                        {field: 'goods_sales', title: __('Goods_sales')},
+                        {field: 'share_num', title: __('Share_num')},
+                        {field: 'follow_num', title: __('Follow_num')},
+                        {field: 'duration', title: __('Duration')},
+                        {field: 'user_id', title: __('User_id')},
+                        {field: 'room_id', title: __('Room_id')},
+                        {field: 'room_no', title: __('Room_no'), operate: 'LIKE'},
+
+                        // {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
+                    ]
+                ]
+            });
+
+            // 为表格绑定事件
+            Table.api.bindevent(table);
+        },
+        add: function () {
+            Controller.api.bindevent();
+        },
+        edit: function () {
+            Controller.api.bindevent();
+        },
+        api: {
+            bindevent: function () {
+                Form.api.bindevent($("form[role=form]"));
+            }
+        }
+    };
+    return Controller;
+});

+ 66 - 0
public/assets/js/backend/live_suggest.js

@@ -0,0 +1,66 @@
+define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
+
+    var Controller = {
+        index: function () {
+            // 初始化表格参数配置
+            Table.api.init({
+                extend: {
+                    index_url: 'live_suggest/index' + location.search,
+                    add_url: 'live_suggest/add',
+                    edit_url: 'live_suggest/edit',
+                    del_url: 'live_suggest/del',
+                    multi_url: 'live_suggest/multi',
+                    import_url: 'live_suggest/import',
+                    table: 'live_suggest',
+                }
+            });
+
+            var table = $("#table");
+
+            // 初始化表格
+            table.bootstrapTable({
+                url: $.fn.bootstrapTable.defaults.extend.index_url,
+                pk: 'id',
+                sortName: 'id',
+                columns: [
+                    [
+                        {checkbox: true},
+                        {field: 'id', title: __('Id')},
+                        {field: 'user_id', title: __('User_id')},
+                        {field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'},
+                        {field: 'user.mobile', title: __('User.mobile'), operate: 'LIKE'},
+
+                        {field: 'title', title: __('Title'), operate: 'LIKE'},
+                        {field: 'content', title: __('Content'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
+                        {field: 'time_desc', title: __('Time_desc'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
+
+                        {field: 'room_id', title: __('Room_id')},
+                        {field: 'room_no', title: __('Room_no'), operate: 'LIKE'},
+                        {field: 'room.logo', title: __('Room.logo'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
+                        {field: 'room.name', title: __('Room.name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
+
+                        {field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"0":__('Status 0')}, formatter: Table.api.formatter.status},
+                        {field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
+
+                        {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
+                    ]
+                ]
+            });
+
+            // 为表格绑定事件
+            Table.api.bindevent(table);
+        },
+        add: function () {
+            Controller.api.bindevent();
+        },
+        edit: function () {
+            Controller.api.bindevent();
+        },
+        api: {
+            bindevent: function () {
+                Form.api.bindevent($("form[role=form]"));
+            }
+        }
+    };
+    return Controller;
+});