|
@@ -48,4 +48,28 @@ class Report extends Api
|
|
|
$id = Db::name('report')->insertGetId($data);
|
|
|
$this->success();
|
|
|
}
|
|
|
+
|
|
|
+ //IM举报
|
|
|
+ public function addone_im(){
|
|
|
+ $type = input('type',1);//类型:1=文字,2=语音,3=图片,4=阅后即焚
|
|
|
+ $to_user_id = input('to_user_id',0);
|
|
|
+ $content = input('content','');
|
|
|
+ $images = input('images','');
|
|
|
+ $audio_file = input('audio_file','');
|
|
|
+
|
|
|
+ $data = [
|
|
|
+ 'type' => $type,
|
|
|
+ 'user_id' => $this->auth->id,
|
|
|
+ 'to_user_id' => $to_user_id,
|
|
|
+ 'content' => $content,
|
|
|
+ 'images' => $images,
|
|
|
+ 'audio_file' => $audio_file,
|
|
|
+ 'createtime' => time(),
|
|
|
+ 'updatetime' => time(),
|
|
|
+ ];
|
|
|
+
|
|
|
+ $id = Db::name('report_im')->insertGetId($data);
|
|
|
+ $this->success();
|
|
|
+ }
|
|
|
+
|
|
|
}
|