1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <?php
- namespace app\Nutrition\controller;
- use app\common\model\DatumIntro;
- use app\common\model\VideoIntro;
- use library\Controller;
- use app\common\model\VideoCate;
- use function AlibabaCloud\Client\value;
- /**
- * 视频评论
- * Class VideoComment
- * @package app\Nutrition\controller
- */
- class VideoComment extends Controller
- {
- /**
- * 绑定数据表
- * @var string
- */
- protected $table = 'VideoComment';
- /**
- * 列表
- * @auth true
- * @menu true
- * @throws \think\Exception
- * @throws \think\db\exception\DataNotFoundException
- * @throws \think\db\exception\ModelNotFoundException
- * @throws \think\exception\DbException
- * @throws \think\exception\PDOException
- */
- public function index()
- {
- $this->title = '视频列表';
- $this->video_id = input('video_id');
- $this->url_id = input('url_id');
- $sel_where = [];
- $sel_where[] = ['is_deleted','=',0];
- $sel_where[] = ['video_id','=',$this->video_id];
- $sel_where[] = ['url_id','=',$this->url_id];
- $query = $this->_query($this->table)->alias('c')
- ->field('c.*,u.name,u.headimg')
- ->leftJoin("User u",'u.id = c.user_id')
- ->where($sel_where)->order('id desc')->page();
- }
- /**
- * 数据列表处理
- * @auth true
- * @menu true
- * @param array $data
- * @throws \think\db\exception\DataNotFoundException
- * @throws \think\db\exception\ModelNotFoundException
- * @throws \think\exception\DbException
- */
- protected function _index_page_filter(&$data)
- {
- }
- /**
- * 删除
- * @auth true
- * @menu true
- * @throws \think\Exception
- * @throws \think\db\exception\DataNotFoundException
- * @throws \think\db\exception\ModelNotFoundException
- * @throws \think\exception\DbException
- * @throws \think\exception\PDOException
- */
- public function del()
- {
- $this->_save($this->table, ['is_deleted' => 1]);
- }
- /**
- * 表单数据处理
- * @auth true
- * @menu true
- * @param array $data
- */
- protected function _form_filter(&$data)
- {
- }
- }
|