www_fpvone_cn/application/index/controller/cms/Comment.php

34 lines
796 B
PHP
Raw Normal View History

2024-12-20 12:29:51 +08:00
<?php
namespace app\index\controller\cms;
use app\common\controller\Frontend;
/**
* 我发表的评论
*/
class Comment extends Frontend
{
protected $layout = 'default';
protected $noNeedLogin = [];
protected $noNeedRight = ['*'];
/**
* 我的评论
*/
public function index()
{
$user_id = $this->auth->id;
$commentList = \addons\cms\model\Comment::where('user_id', $user_id)
->where('status', 'normal')
->order('id', 'desc')
->paginate(10, null);
$this->view->assign('config', array_merge($this->view->config, ['jsname' => '']));
$this->view->assign('commentList', $commentList);
$this->view->assign('title', '我发表的评论');
return $this->view->fetch();
}
}