config['set']['table_name'][$type]; return $table; } public function getData($method = 'getAll', $uid, $type = false, $type_id = false) { $where['type'] = $type; $where['type_id'] = $type_id; $info = Dever::db('community/comment')->$method($where); $data['info'] = $info; $data['total'] = Dever::total(); if ($info) { foreach ($info as $k => $v) { $data['info'][$k]['uid'] = $v['uid']; $data['info'][$k]['content'] = $v['content']; } } return $data; } # 发表信息 public function submit($uid, $id, $type, $pic, $content, $to_id, $to_uid) { $where['uid'] = $uid; $where['type_id'] = $id; $where['type'] = $type; $where['content'] = $content; $table = 'community/comment'; $info = false; $data_table = $this->table($type); if (!$info) { Dever::db($table)->insert($where); Dever::score($uid, 'submit_comment', '发布弹幕'); } return true; } }