|
@@ -38,6 +38,37 @@ class Family extends Api
|
|
$this->success("获取成功!",$res);
|
|
$this->success("获取成功!",$res);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //我创建的家族列表
|
|
|
|
+ public function getGuildList_mycreate(){
|
|
|
|
+ $where = ['user_id'=> $this->auth->id];
|
|
|
|
+
|
|
|
|
+ $res = Db::name('family')->field("id,g_id,user_id,group_id,name,image,desc,notice,member")
|
|
|
|
+ ->where($where)
|
|
|
|
+ ->autopage()
|
|
|
|
+ ->select();
|
|
|
|
+ $res = list_domain_image($res,['image']);
|
|
|
|
+
|
|
|
|
+ $this->success("获取成功!",$res);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //我已经加入的家族列表
|
|
|
|
+ public function getGuildList_myjoinin(){
|
|
|
|
+ $where = [
|
|
|
|
+ 'fm.user_id'=> $this->auth->id,
|
|
|
|
+ 'fm.status' => 1,
|
|
|
|
+ ];
|
|
|
|
+
|
|
|
|
+ $res = Db::name('family_member')->alias('fm')
|
|
|
|
+ ->field("f.id,f.g_id,f.user_id,f.group_id,f.name,f.image,f.desc,f.notice,f.member")
|
|
|
|
+ ->join('family f','fm.guild_id = f.id','LEFT')
|
|
|
|
+ ->where($where)
|
|
|
|
+ ->autopage()
|
|
|
|
+ ->select();
|
|
|
|
+ $res = list_domain_image($res,['image']);
|
|
|
|
+
|
|
|
|
+ $this->success("获取成功!",$res);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取公会信息-新
|
|
* 获取公会信息-新
|
|
@@ -208,10 +239,6 @@ class Family extends Api
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 公会签约申请
|
|
* 公会签约申请
|
|
*/
|
|
*/
|
|
@@ -345,8 +372,6 @@ class Family extends Api
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 公会申请加入列表
|
|
* 公会申请加入列表
|
|
*/
|
|
*/
|
|
@@ -659,19 +684,15 @@ class Family extends Api
|
|
*/
|
|
*/
|
|
public function getStatus()
|
|
public function getStatus()
|
|
{
|
|
{
|
|
- try {
|
|
|
|
- $id = input('guild_id',0);
|
|
|
|
- if (!empty($id)) {
|
|
|
|
- $where['id'] = $id;
|
|
|
|
- } else {
|
|
|
|
- $where['user_id'] = $this->auth->id;
|
|
|
|
- }
|
|
|
|
- $field = 'id,status';
|
|
|
|
- $guild = model('Family')->field($field)->where($where)->find();
|
|
|
|
- $this->success('获取成功', $guild);
|
|
|
|
- } catch (Exception $e) {
|
|
|
|
- $this->error($e->getMessage());
|
|
|
|
|
|
+ $id = input('guild_id',0);
|
|
|
|
+ if (!empty($id)) {
|
|
|
|
+ $where['id'] = $id;
|
|
|
|
+ } else {
|
|
|
|
+ $where['user_id'] = $this->auth->id;
|
|
}
|
|
}
|
|
|
|
+ $field = 'id,status';
|
|
|
|
+ $guild = model('Family')->field($field)->where($where)->find();
|
|
|
|
+ $this->success('获取成功', $guild);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|