isAjax()) return (new messageModel())->getRemarks($this->site_id); $this->forthMenu(); return $this->fetch('remark/index'); } /** * Common: 查看详情&回复内容 * Author: wu-hui * Time: 2023/03/06 10:09 * @return array|mixed * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException */ public function seeInfo(){ // 获取基本信息 $messageCenterId = input('message_center_id'); Model('message_center_read')->update(['is_see'=>1],['message_center_id'=>$messageCenterId]); if(request()->isAjax()) { // 回复内容 $replyContent = input('reply_content'); Model('message_center_read')->update(['reply_content'=>$replyContent],['message_center_id'=>$messageCenterId]); return success(); } // 获取信息 $where = [ ['a.id','=',$messageCenterId] ]; $field = 'a.id,a.created_time,a.message_content,a.image_list,mcr.phone,mcr.is_see,m.username,m.nickname,m.headimg'; $info = (new messageModel())->getInfo($where,$field)['data']; $info['image_list'] = $info['image_list'] ? explode(',',$info['image_list']) : []; $this->assign('info',$info); $this->assign('message_center_id',$messageCenterId); return $this->fetch('remark/see'); } }