Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
quxiu
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冷斌
quxiu
Commits
78b153f0
Commit
78b153f0
authored
Mar 27, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
踢人
parent
ed2dfe3d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
6 deletions
+17
-6
api/Appapi/Api/Live.php
+2
-3
api/Appapi/Domain/Live.php
+2
-2
api/Appapi/Model/Live.php
+13
-1
No files found.
api/Appapi/Api/Live.php
View file @
78b153f0
...
...
@@ -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'
]
=
'开播失败,请重试'
;
...
...
api/Appapi/Domain/Live.php
View file @
78b153f0
...
...
@@ -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
;
}
...
...
api/Appapi/Model/Live.php
View file @
78b153f0
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment