Commit 78b153f0 by 冷斌

踢人

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