Commit 78b153f0 by 冷斌

踢人

parent ed2dfe3d
...@@ -439,7 +439,6 @@ class Api_Live extends PhalApi_Api { ...@@ -439,7 +439,6 @@ class Api_Live extends PhalApi_Api {
// 排名 // 排名
$info['key'] = $this->getbaiming($uid); $info['key'] = $this->getbaiming($uid);
$dataroom=array( $dataroom=array(
"uid"=>$uid, "uid"=>$uid,
"showid"=>$showid, "showid"=>$showid,
...@@ -448,7 +447,7 @@ class Api_Live extends PhalApi_Api { ...@@ -448,7 +447,7 @@ class Api_Live extends PhalApi_Api {
"province"=>$province, "province"=>$province,
"city"=>$city, "city"=>$city,
"stream"=>$stream, "stream"=>$stream,
"thumb"=>$thumb, "thumb"=>'/default.jpg',
"pull"=>$pull, "pull"=>$pull,
"lng"=>$lng, "lng"=>$lng,
"lat"=>$lat, "lat"=>$lat,
...@@ -467,7 +466,7 @@ class Api_Live extends PhalApi_Api { ...@@ -467,7 +466,7 @@ class Api_Live extends PhalApi_Api {
); );
$domain = new Domain_Live(); $domain = new Domain_Live();
$result = $domain->createRoom($uid,$dataroom); $result = $domain->createRoom($uid,$dataroom,$thumb);
if($result===false){ if($result===false){
$rs['code'] = 1011; $rs['code'] = 1011;
$rs['msg'] = '开播失败,请重试'; $rs['msg'] = '开播失败,请重试';
......
...@@ -10,11 +10,11 @@ class Domain_Live { ...@@ -10,11 +10,11 @@ class Domain_Live {
return $rs; return $rs;
} }
public function createRoom($uid,$data) { public function createRoom($uid,$data,$thumb) {
$rs = array(); $rs = array();
$model = new Model_Live(); $model = new Model_Live();
$rs = $model->createRoom($uid,$data); $rs = $model->createRoom($uid,$data,$thumb);
return $rs; return $rs;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
class Model_Live extends PhalApi_Model_NotORM { class Model_Live extends PhalApi_Model_NotORM {
/* 创建房间 */ /* 创建房间 */
public function createRoom($uid,$data) { public function createRoom($uid,$data,$thumb) {
/* 获取主播 推荐、热门 */ /* 获取主播 推荐、热门 */
$data['ishot']='0'; $data['ishot']='0';
...@@ -38,6 +38,18 @@ class Model_Live extends PhalApi_Model_NotORM { ...@@ -38,6 +38,18 @@ class Model_Live extends PhalApi_Model_NotORM {
if(!$rs){ if(!$rs){
return $rs; return $rs;
} }
if (!empty($thumb)) {
DI()->notorm->users_live_image
->where('uid=?',$uid)
->delete();
DI()->notorm->users_live->insert([
'uid' => $data['uid'],
'showid' => $data['showid'],
'thumb' => $thumb,
'status' => 0,
'addtime' => time(),
]);
}
return 1; return 1;
} }
......
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