作者 sgj
1 个管道 的构建 通过 耗费 2 秒

调整评论顺序

... ... @@ -10,6 +10,7 @@ namespace app\portal\controller;
use app\portal\model\GroupModel;
use app\user\model\UserModel;
use cmf\controller\WeChatBaseController;
use EasyWeChat\Foundation\Application;
use think\Log;
... ... @@ -43,6 +44,8 @@ class FriendsController extends WeChatBaseController
$group_id=input('id');
/*检查权限*/
$user_id=cmf_get_current_user_id();
$User=new UserModel();
$user=$User->getUser($user_id);
$isin=$this->GroupModel->checkUser($user_id,$group_id);
if (empty($isin)){
$this->error();
... ... @@ -57,6 +60,7 @@ class FriendsController extends WeChatBaseController
}
$this->assign('silence',$silence);
$this->assign('info',$info);
$this-> assign('user',$user);
$this->assign('group',$group);
$this->assign('article',$article);
return $this->fetch();
... ...
... ... @@ -237,8 +237,8 @@
if(res.code==1){
$('.bottom_box').hide().attr('id','');
$('.'+'comment'+id).append("<div>" +
" <text class=\"comment_name\">宋医生 :</text>" +
" <text>1111</text>" +
" <text class=\"comment_name\">{$user_name} :</text>" +
" <text>"+content+"</text>" +
" </div>")
alert('评论成功');
}
... ...