Commit 31e4675a by 冷斌

踢人

parent da52028f
......@@ -17,6 +17,7 @@ class Api_Live extends PhalApi_Api {
'anyway' => array('name' => 'anyway', 'type' => 'int', 'default'=>'0', 'desc' => '直播类型 1 PC, 0 app'),
'liveclassid' => array('name' => 'liveclassid', 'type' => 'int', 'default'=>'0', 'desc' => '直播分类ID'),
'deviceinfo' => array('name' => 'deviceinfo', 'type' => 'string', 'default'=>'', 'desc' => '设备信息'),
'isNear' => array('name' => 'isNear', 'type' => 'int', 'default'=>0, 'desc' => '是否附近可见'),
),
'changeLive' => array(
'uid' => array('name' => 'uid', 'type' => 'int', 'min' => 1, 'require' => true, 'desc' => '用户ID'),
......@@ -466,7 +467,7 @@ class Api_Live extends PhalApi_Api {
);
$domain = new Domain_Live();
$result = $domain->createRoom($uid,$dataroom,$thumb);
$result = $domain->createRoom($uid,$dataroom,$thumb, $this->isNear);
if($result===false){
$rs['code'] = 1011;
$rs['msg'] = '开播失败,请重试';
......
......@@ -10,11 +10,11 @@ class Domain_Live {
return $rs;
}
public function createRoom($uid,$data,$thumb) {
public function createRoom($uid,$data,$thumb, $isNear) {
$rs = array();
$model = new Model_Live();
$rs = $model->createRoom($uid,$data,$thumb);
$rs = $model->createRoom($uid,$data,$thumb,$isNear);
return $rs;
}
......
......@@ -543,7 +543,7 @@ class Model_Home extends PhalApi_Model_NotORM {
}
$pnum=50;
$start=($p-1)*$pnum;
$where=" islive='1' and lng!='' and lat!='' ";
$where="is_near = '1' and islive='1' and lng!='' and lat!='' ";
$configpri=getConfigPri();
$result=DI()->notorm->users_live
->select("uid,thumb,title,province,city,stream,lng,lat,pull,isvideo,thumb,islive,type,type_val,game_action,goodnum,anyway,getDistance('{$lat}','{$lng}',lat,lng) as distance")
......
......@@ -2,12 +2,13 @@
class Model_Live extends PhalApi_Model_NotORM {
/* 创建房间 */
public function createRoom($uid,$data,$thumb) {
public function createRoom($uid,$data,$thumb,$isNear) {
/* 获取主播 推荐、热门 */
$data['ishot']='0';
$data['isrecommend']='0';
$data['isrecommend2']='0';
$data['is_near'] = $isNear;
$userinfo=DI()->notorm->users
->select("ishot,isrecommend,isrecommend2")
->where('id=?',$uid)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment