Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SooonerHotel
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴贤德
SooonerHotel
Commits
0e278b86
Commit
0e278b86
authored
Jul 22, 2019
by
吴贤德
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
api
parent
0f2907c0
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
4 deletions
+71
-4
CenterAction.class.php
SooonerHotel/App/Lib/Action/Api/CenterAction.class.php
+6
-2
FrontAction.class.php
SooonerHotel/App/Lib/Action/Api/FrontAction.class.php
+2
-2
GslbAction.class.php
SooonerHotel/App/Lib/Action/Api/GslbAction.class.php
+60
-0
MonitorAction.class.php
SooonerHotel/App/Lib/Action/Api/MonitorAction.class.php
+3
-0
No files found.
SooonerHotel/App/Lib/Action/Api/CenterAction.class.php
View file @
0e278b86
...
...
@@ -20,6 +20,7 @@ class CenterAction extends Action
}
echo
json_encode
(
$result
);
exit
;
}
/**
...
...
@@ -40,6 +41,7 @@ class CenterAction extends Action
}
echo
json_encode
(
$result
);
exit
;
}
public
function
push_log
(){
...
...
@@ -67,7 +69,6 @@ class CenterAction extends Action
//echo $rawData."\n";
$json
=
json_decode
(
$rawData
,
true
);
$url
=
$json
[
"jsonUrl"
];
//echo "url:".$url; exit;
$content
=
file_get_contents
(
$url
);
$json
=
json_decode
(
$content
,
true
);
...
...
@@ -112,6 +113,7 @@ class CenterAction extends Action
echo
'false'
;
}
}
exit
;
}
function
null2str
(
$str
){
if
(
is_null
(
$str
)){
...
...
@@ -162,6 +164,7 @@ class CenterAction extends Action
$result
[
"list"
]
=
$list
;
echo
json_encode
(
$result
);
exit
;
}
/**
* 增量媒资变更检测接口
...
...
@@ -201,6 +204,7 @@ class CenterAction extends Action
$result
[
"page_num"
]
=
$page_num
;
echo
json_encode
(
$result
);
exit
;
}
/**
...
...
@@ -292,7 +296,7 @@ class CenterAction extends Action
D
(
"LogPush"
)
->
add
(
$log
);
}
echo
json_encode
(
$result
);
exit
;
}
...
...
SooonerHotel/App/Lib/Action/Api/FrontAction.class.php
View file @
0e278b86
...
...
@@ -64,8 +64,7 @@ class FrontAction extends Action
}
echo
json_encode
(
$config
);
//输出
exit
;
}
...
...
@@ -112,6 +111,7 @@ class FrontAction extends Action
$result
[
"list"
]
=
$list
;
echo
json_encode
(
$result
);
exit
;
}
...
...
SooonerHotel/App/Lib/Action/Api/GslbAction.class.php
0 → 100644
View file @
0e278b86
<?php
/**
* Created by PhpStorm.
* User: wuxiande
* Date: 2019/7/19
* Time: 16:36
*/
class
GslbAction
extends
Action
{
/*
* 实时鉴权接口
* /api/gslb?spid=1&hotel_id=1&media_id=&others
*
* 1001, "arg error"
1002, "front conf error"
1003, "url expired"
1004, "sign arg error"
1005, "sign error"
1006, "no media"
*/
public
function
index
(){
$spid
=
$_GET
[
"spid"
];
$hid
=
$_GET
[
"hotel_id"
];
$mcode
=
$_GET
[
"media_id"
];
$sw_time
=
$_GET
[
"sw_time"
];
$sw_sign
=
$_GET
[
"sw_sign"
];
$result
[
"code"
]
=
1
;
$result
[
"msg"
]
=
"err"
;
/* 分前端鉴权(暂时不用)
$sql="SELECT virtual_ip,port FROM sh_hotel_device WHERE hotel_id=1 AND type=0;";
$frontArr = M("")->query($sql);
if (empty($frontArr)){
$result["code"]=1002;
$result["msg"]="front conf error";
}
*/
$sql
=
"SELECT mw.id,mw.code,mw.url_play,hm.status,hm.status_inject"
.
" FROM sh_hotel_media_map_
$spid
hm,sh_media_wasu mw"
.
" WHERE mw.code='
$mcode
' AND hm.hotel_id=
$hid
AND hm.media_id=mw.id;"
;
$arr
=
M
(
""
)
->
query
(
$sql
);
if
(
empty
(
$arr
)){
$result
[
"code"
]
=
1006
;
$result
[
"msg"
]
=
"no media"
;
}
else
{
$result
[
"code"
]
=
0
;
$result
[
"msg"
]
=
"ok"
;
$result
[
"media"
]
=
$arr
[
0
];
}
echo
json_encode
(
$result
);
exit
;
}
}
\ No newline at end of file
SooonerHotel/App/Lib/Action/Api/MonitorAction.class.php
View file @
0e278b86
...
...
@@ -84,6 +84,7 @@ class MonitorAction extends Action
echo
json_encode
(
$Devices
);
exit
;
}
...
...
@@ -153,6 +154,7 @@ class MonitorAction extends Action
$e
[
"错误"
]
=
"找不到该设备!"
;
echo
json_encode
(
$e
);
}
exit
;
}
}
\ No newline at end of file
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