|
@@ -328,7 +328,32 @@ class Community extends Api
|
|
|
|
|
|
return $this->success('', $user);
|
|
|
}
|
|
|
+ /**
|
|
|
+ * 用户举报
|
|
|
+ * @param string $uid 用户id
|
|
|
+ */
|
|
|
+ public function jubao()
|
|
|
+ {
|
|
|
+ $uid = $this->request->get('uid');
|
|
|
+
|
|
|
+ if (!$uid) return $this->error('参数错误');
|
|
|
+
|
|
|
+ $user = $this->auth->getUser();
|
|
|
|
|
|
+ $data = [
|
|
|
+ 'uid' => $user['id'],
|
|
|
+ 'be_uid' => $uid,
|
|
|
+ 'create_time' => time('Y-m-d H:i',time())
|
|
|
+ ];
|
|
|
+
|
|
|
+ $add = Db::name('jubao')->insert($data);
|
|
|
+
|
|
|
+ if ($add) {
|
|
|
+ return $this->success('举报成功,后台审核中');
|
|
|
+ } else {
|
|
|
+ return $this->error('操作失败');
|
|
|
+ }
|
|
|
+ }
|
|
|
/**
|
|
|
* 关注用户
|
|
|
*
|