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
75479433
Commit
75479433
authored
Sep 09, 2019
by
wangjiangze
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
516f49f4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
277 additions
and
2 deletions
+277
-2
HotelAction.class.php
SooonerHotel/App/Lib/Action/Media/HotelAction.class.php
+29
-0
PlayLogModel.class.php
SooonerHotel/App/Lib/Model/PlayLogModel.class.php
+5
-0
index.html
SooonerHotel/App/Tpl/Media/zh-cn/Hotel/index.html
+14
-2
injectlog.html
SooonerHotel/App/Tpl/Media/zh-cn/Hotel/injectlog.html
+229
-0
No files found.
SooonerHotel/App/Lib/Action/Media/HotelAction.class.php
View file @
75479433
...
@@ -122,4 +122,33 @@ class HotelAction extends CommonAction{
...
@@ -122,4 +122,33 @@ class HotelAction extends CommonAction{
echo
'false'
;
echo
'false'
;
}
}
}
}
//管理
public
function
injectLog
(){
$op
=
I
(
'op'
);
$userInfo
=
$_SESSION
[
"_USER_INFO"
];
if
(
$op
==
"getjson"
){
$model
=
D
(
"PlayLog"
);
$inputs
=
I
();
$list
=
$model
->
getList
(
"list"
,
$userInfo
,
$inputs
);
$count
=
$model
->
getList
(
"count"
,
$userInfo
,
$inputs
);
$total
=
$count
[
0
][
"count"
];
echo
"
{
\"total\":\"".$total."\",\"rows\":".json_encode($list)."
}
"
;
}
else
{
$this
->
media_id
=
I
(
"media_id"
);
$this
->
hotel_id
=
I
(
"hotel_id"
);
$spModel
=
D
(
"Sp"
);
$hotelModel
=
D
(
"Hotel"
);
if
(
$userInfo
[
'sp_ids'
]
&&
$userInfo
[
'grade'
]
>=
3
){
$sp_lists
=
$spModel
->
field
(
"id,`name`"
)
->
where
(
"`status`=0 and id in("
.
$userInfo
[
'sp_ids'
]
.
")"
)
->
select
();
$hotel_lists
=
$hotelModel
->
field
(
"id,`name`,sp_id"
)
->
where
(
"`status`=0 and sp_id in("
.
$userInfo
[
'sp_ids'
]
.
")"
)
->
select
();
}
else
{
$sp_lists
=
$spModel
->
field
(
"id,`name`"
)
->
where
(
"`status`=0"
)
->
select
();
$hotel_lists
=
$hotelModel
->
field
(
"id,`name`,sp_id"
)
->
where
(
"`status`=0"
)
->
select
();
}
$this
->
sp_lists
=
$sp_lists
;
$this
->
hotel_lists
=
$hotel_lists
;
$this
->
display
();
}
}
}
}
SooonerHotel/App/Lib/Model/PlayLogModel.class.php
View file @
75479433
...
@@ -14,6 +14,7 @@ class PlayLogModel extends RelationModel{
...
@@ -14,6 +14,7 @@ class PlayLogModel extends RelationModel{
$searchValue
=
$inputs
[
"searchValue"
]
?
$inputs
[
"searchValue"
]
:
''
;
$searchValue
=
$inputs
[
"searchValue"
]
?
$inputs
[
"searchValue"
]
:
''
;
$searchSp
=
$inputs
[
"searchSp"
]
?
$inputs
[
"searchSp"
]
:
0
;
$searchSp
=
$inputs
[
"searchSp"
]
?
$inputs
[
"searchSp"
]
:
0
;
$searchHotel
=
$inputs
[
"searchHotel"
]
?
$inputs
[
"searchHotel"
]
:
0
;
$searchHotel
=
$inputs
[
"searchHotel"
]
?
$inputs
[
"searchHotel"
]
:
0
;
$searchMediaid
=
$inputs
[
"searchMediaid"
]
?
$inputs
[
"searchMediaid"
]
:
0
;
$searchMonth
=
$inputs
[
"searchMonth"
]
?
$inputs
[
"searchMonth"
]
:
date
(
"Ym"
);
$searchMonth
=
$inputs
[
"searchMonth"
]
?
$inputs
[
"searchMonth"
]
:
date
(
"Ym"
);
if
(
$searchValue
){
if
(
$searchValue
){
...
@@ -25,6 +26,10 @@ class PlayLogModel extends RelationModel{
...
@@ -25,6 +26,10 @@ class PlayLogModel extends RelationModel{
if
(
$searchHotel
){
if
(
$searchHotel
){
$where
.=
" and A.hotel_id =
$searchHotel
"
;
$where
.=
" and A.hotel_id =
$searchHotel
"
;
}
}
if
(
$searchMediaid
){
$where
.=
" and A.media_id =
$searchMediaid
and A.tradeid='inject' "
;
}
if
(
$userInfo
[
'sp_ids'
]
&&
$userInfo
[
'grade'
]
>=
3
){
if
(
$userInfo
[
'sp_ids'
]
&&
$userInfo
[
'grade'
]
>=
3
){
$where
.=
" and A.sp_id in("
.
$userInfo
[
'sp_ids'
]
.
") "
;
$where
.=
" and A.sp_id in("
.
$userInfo
[
'sp_ids'
]
.
") "
;
}
}
...
...
SooonerHotel/App/Tpl/Media/zh-cn/Hotel/index.html
View file @
75479433
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
</select>
</select>
<select
class=
"select"
name=
"searchStatusInject"
>
<select
class=
"select"
name=
"searchStatusInject"
>
<option
value=
"-1"
>
请选择注入状态
</option>
<option
value=
"-1"
>
请选择注入状态
</option>
<option
value=
"0"
>
未注入
</option>
<option
value=
"0"
>
注入中
</option>
<option
value=
"1"
>
已注入
</option>
<option
value=
"1"
>
已注入
</option>
<option
value=
"2"
>
注入失败
</option>
<option
value=
"2"
>
注入失败
</option>
</select>
</select>
...
@@ -102,6 +102,8 @@ onRowContextMenu : onRowContextMenu
...
@@ -102,6 +102,8 @@ onRowContextMenu : onRowContextMenu
<div
iconCls=
"icon-edit"
id=
"menuEdit"
onclick=
"details()"
{
:buttonAuth
('
Media
','
Cloud
','
add
')}
>
查看详情
</div>
<div
iconCls=
"icon-edit"
id=
"menuEdit"
onclick=
"details()"
{
:buttonAuth
('
Media
','
Cloud
','
add
')}
>
查看详情
</div>
<div
iconCls=
"icon-reload"
id=
"menuStop"
onclick=
"restartInject(0)"
{
:buttonAuth
('
Media
','
Hotel
','
updateStatusInjectAjaxHandle
')}
>
重新注入
</div>
<div
iconCls=
"icon-reload"
id=
"menuStop"
onclick=
"restartInject(0)"
{
:buttonAuth
('
Media
','
Hotel
','
updateStatusInjectAjaxHandle
')}
>
重新注入
</div>
<div
class=
"menu-sep"
></div>
<div
class=
"menu-sep"
></div>
<div
iconCls=
"icon-lists"
id=
"menuStop"
onclick=
"injectLog()"
{
:buttonAuth
('
Media
','
Hotel
','
injectLog
')}
>
注入日志
</div>
<div
class=
"menu-sep"
></div>
<div
iconCls=
"icon-start"
id=
"menuStop"
onclick=
"enable(1)"
{
:buttonAuth
('
Media
','
Hotel
','
updateStatusAjaxHandle
')}
>
上线
</div>
<div
iconCls=
"icon-start"
id=
"menuStop"
onclick=
"enable(1)"
{
:buttonAuth
('
Media
','
Hotel
','
updateStatusAjaxHandle
')}
>
上线
</div>
<div
iconCls=
"icon-stop"
id=
"menuStart"
onclick=
"enable(2)"
{
:buttonAuth
('
Media
','
Hotel
','
updateStatusAjaxHandle
')}
>
下线
</div>
<div
iconCls=
"icon-stop"
id=
"menuStart"
onclick=
"enable(2)"
{
:buttonAuth
('
Media
','
Hotel
','
updateStatusAjaxHandle
')}
>
下线
</div>
</div>
</div>
...
@@ -112,6 +114,8 @@ onRowContextMenu : onRowContextMenu
...
@@ -112,6 +114,8 @@ onRowContextMenu : onRowContextMenu
<div
iconCls=
"icon-edit"
id=
"menuEdit"
onclick=
"details()"
{
:buttonAuth
('
Media
','
Cloud
','
add
')}
>
查看详情
</div>
<div
iconCls=
"icon-edit"
id=
"menuEdit"
onclick=
"details()"
{
:buttonAuth
('
Media
','
Cloud
','
add
')}
>
查看详情
</div>
<div
iconCls=
"icon-reload"
id=
"menuStop"
onclick=
"restartInject(0)"
{
:buttonAuth
('
Media
','
Hotel
','
updateStatusInjectAjaxHandle
')}
>
重新注入
</div>
<div
iconCls=
"icon-reload"
id=
"menuStop"
onclick=
"restartInject(0)"
{
:buttonAuth
('
Media
','
Hotel
','
updateStatusInjectAjaxHandle
')}
>
重新注入
</div>
<div
class=
"menu-sep"
></div>
<div
class=
"menu-sep"
></div>
<div
iconCls=
"icon-lists"
id=
"menuStop"
onclick=
"injectLog()"
{
:buttonAuth
('
Media
','
Hotel
','
injectLog
')}
>
注入日志
</div>
<div
class=
"menu-sep"
></div>
<div
iconCls=
"icon-start"
id=
"menuStop"
onclick=
"enable(1)"
{
:buttonAuth
('
Media
','
Hotel
','
updateStatusAjaxHandle
')}
>
上线
</div>
<div
iconCls=
"icon-start"
id=
"menuStop"
onclick=
"enable(1)"
{
:buttonAuth
('
Media
','
Hotel
','
updateStatusAjaxHandle
')}
>
上线
</div>
<div
iconCls=
"icon-stop"
id=
"menuStart"
onclick=
"enable(2)"
{
:buttonAuth
('
Media
','
Hotel
','
updateStatusAjaxHandle
')}
>
下线
</div>
<div
iconCls=
"icon-stop"
id=
"menuStart"
onclick=
"enable(2)"
{
:buttonAuth
('
Media
','
Hotel
','
updateStatusAjaxHandle
')}
>
下线
</div>
</div>
</div>
...
@@ -156,7 +160,7 @@ function InputAction(value, row, index) {
...
@@ -156,7 +160,7 @@ function InputAction(value, row, index) {
}
}
function
StatusInjectAction
(
value
,
row
,
index
){
function
StatusInjectAction
(
value
,
row
,
index
){
if
(
value
==
0
){
if
(
value
==
0
){
return
"
未注入
"
;
return
"
注入中
"
;
}
else
if
(
value
==
1
){
}
else
if
(
value
==
1
){
return
"<font color=green>已注入</font>"
;
return
"<font color=green>已注入</font>"
;
}
else
if
(
value
==
2
){
}
else
if
(
value
==
2
){
...
@@ -185,6 +189,14 @@ function details(){
...
@@ -185,6 +189,14 @@ function details(){
$
.
messager
.
alert
(
'提示'
,
'请选择要操作的记录!'
,
'info'
);
$
.
messager
.
alert
(
'提示'
,
'请选择要操作的记录!'
,
'info'
);
}
}
}
}
function
injectLog
(){
var
row
=
$
(
'#dg'
).
datagrid
(
'getSelected'
);
if
(
row
){
pop
(
'80%'
,
700
,
true
,
''
,
'datagrid'
,
'/Media/Hotel/injectLog/media_id/'
+
row
.
mcode
+
'/hotel_id/'
+
row
.
hotel_id
);
}
else
{
$
.
messager
.
alert
(
'提示'
,
'请选择要操作的记录!'
,
'info'
);
}
}
//禁用启用
//禁用启用
function
enable
(
status
){
function
enable
(
status
){
var
row
=
$
(
'#dg'
).
datagrid
(
'getSelected'
);
var
row
=
$
(
'#dg'
).
datagrid
(
'getSelected'
);
...
...
SooonerHotel/App/Tpl/Media/zh-cn/Hotel/injectlog.html
0 → 100644
View file @
75479433
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<title>
播放日志管理
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"__PUBLIC__/js/jquery-easyui-1.3.4/themes/default/easyui.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"__PUBLIC__/js/jquery-easyui-1.3.4/themes/icon.css"
>
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/jquery.min.js"
></script>
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/jquery-easyui-1.3.4/jquery.easyui.min.js"
></script>
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/jquery-easyui-1.3.4/locale/easyui-lang-{$language}.js"
></script>
<script
type=
"text/javascript"
src=
"__PUBLIC__/newVsdn/js/zDialog/zDrag.js"
></script>
<script
type=
"text/javascript"
src=
"__PUBLIC__/newVsdn/js/zDialog/zDialog.js"
></script>
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/common/functions.js"
></script>
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/common/md5.js"
></script>
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/DatePicker.js"
></script>
<link
href=
"__PUBLIC__/newVsdn/css/style_frame.css?v=20190829"
rel=
"stylesheet"
type=
"text/css"
/>
</head>
<body>
<!--搜索和按钮 开始 -->
<div
class=
"searchSp clearfix"
>
<div
class=
"layui-tab-content"
>
<div
class=
"layui-tab-item layui-show"
>
<div
class=
"hyperchanne clearfix"
>
<form
name=
"searchform"
method=
"post"
action=
""
id =
"searchform"
>
<input
type=
"hidden"
name=
"op"
value=
"getjson"
>
<input
type=
"hidden"
name=
"searchHotel"
value=
"{$hotel_id}"
>
<input
type=
"hidden"
name=
"searchMediaid"
value=
"{$media_id}"
>
</form>
</div>
<!--hyperchanne end-->
<div
class=
""
>
<!-- <ul class="operationBox">
<li class="add">
<a href="javascript:;" onclick="add()" class="on"><span></span>新增</a>
</li>
</ul>-->
</div>
<!--mainBox end-->
</div>
</div>
</div>
<!--搜索和按钮 结束-->
<table
id=
"dg"
title=
""
data-options=
"
iconCls: 'icon-edit',
singleSelect: true,
url: '/Media/Hotel/injectLog/',
method: 'post',
pagination: true,
pageList:[15,30,45,60],
rownumbers: true,
sortName:'id',
sortOrder:'asc',
queryParams: form2Json('searchform'),
fitColumns: true,
height:'auto',
onRowContextMenu : onRowContextMenu
"
>
<thead>
<tr>
<th
data-options=
"field:'sp_name',width:20"
sortable=
"true"
>
合作方名称
</th>
<th
data-options=
"field:'hotel_name',width:30"
>
酒店名称
</th>
<th
data-options=
"field:'media_name',width:60"
>
媒资名称
</th>
<th
data-options=
"field:'tradeid',width:60"
>
单次播放标识
</th>
<th
data-options=
"field:'http_code',width:20"
>
http响应码
</th>
<th
data-options=
"field:'err_code',width:20"
>
错误码
</th>
<th
data-options=
"field:'duration',width:20"
>
时长
</th>
<th
data-options=
"field:'starttime',width:30"
sortable=
"true"
>
开始播放时间
</th>
<th
data-options=
"field:'cache_status',width:20"
sortable=
"true"
formatter=
"CacheStatusAction"
>
命中状态
</th>
<!--<th field="action" align="center" formatter="InputAction">操作</th>-->
</tr>
</thead>
</table>
<div
id=
"mm1"
class=
"easyui-menu"
style=
"width:120px;display: none"
>
<!--<div iconCls="icon-edit" id="menuEdit" onclick="edit()" {:buttonAuth('Media','Hotel','add')}>编辑</div>-->
<div
iconCls=
"icon-list"
id=
"menuDel"
onclick=
"details()"
{
:buttonAuth
('
Media
','
Hotel
','
details
')}
>
查看详情
</div>
<!-- <div class="menu-sep"></div>
<div iconCls="icon-stop" id="menuStop" onclick="enable(1)" {:buttonAuth('Media','Hotel','updateStatusAjaxHandle')}>禁用</div>
<div iconCls="icon-start" id="menuStart" onclick="enable(0)" {:buttonAuth('Media','Hotel','updateStatusAjaxHandle')}>启用</div>-->
</div>
<div
id=
"mm2"
class=
"easyui-menu"
style=
"width:120px;display: none"
>
<!--<div iconCls="icon-edit" id="menuEdit" onclick="edit()" {:buttonAuth('Media','Hotel','add')}>编辑</div>-->
<div
iconCls=
"icon-list"
id=
"menuDel"
onclick=
"details()"
{
:buttonAuth
('
Media
','
Hotel
','
details
')}
>
查看详情
</div>
<!-- <div class="menu-sep"></div>
<div iconCls="icon-stop" id="menuStop" onclick="enable(1)" {:buttonAuth('Media','Hotel','updateStatusAjaxHandle')}>禁用</div>
<div iconCls="icon-start" id="menuStart" onclick="enable(0)" {:buttonAuth('Media','Hotel','updateStatusAjaxHandle')}>启用</div>-->
</div>
<script
type=
"text/javascript"
>
function
onRowContextMenu
(
e
,
rowIndex
,
rowData
){
e
.
preventDefault
();
$
(
'#dg'
).
datagrid
(
'unselectAll'
);
$
(
'#dg'
).
datagrid
(
'selectRow'
,
rowIndex
);
$
(
'#mm2'
).
menu
(
'show'
,
{
left
:
e
.
pageX
,
top
:
e
.
pageY
});
}
function
InputAction
(
value
,
row
,
injectLog
)
{
return
'<a href="javascript:void(0)" id="mb'
+
injectLog
+
'" class="easyui-menubutton" menu="#mm1" iconCls="icon-list" onmouseover="setSelectRow('
+
injectLog
+
')">'
+
this
.
title
+
'</a>'
;
}
function
CacheStatusAction
(
value
,
row
,
injectLog
)
{
if
(
value
==
1
){
return
"HIT"
;
}
else
if
(
value
==
0
){
return
"MISS"
;
}
else
{
return
value
;
}
}
function
setSelectRow
(
injectLog
)
{
$
(
'#dg'
).
datagrid
(
'unselectAll'
);
$
(
'#dg'
).
datagrid
(
'selectRow'
,
injectLog
);
}
//初始化菜单按钮
$
(
function
(){
$
(
'#dg'
).
datagrid
({
onLoadSuccess
:
function
(
data
)
{
for
(
i
=
0
;
i
<
$
(
'#dg'
).
datagrid
(
'getRows'
).
length
;
i
++
)
{
$
(
'#mb'
+
i
).
menubutton
();
}
}
})
});
//禁用启用
function
enable
(
status
){
var
row
=
$
(
'#dg'
).
datagrid
(
'getSelected'
);
if
(
row
){
var
msg
=
'启用'
;
if
(
status
==
1
)
msg
=
'禁用'
$
.
messager
.
confirm
(
'操作确认'
,
'确认['
+
msg
+
']该记录?'
,
function
(
r
){
if
(
r
){
$
.
post
(
"/Media/Hotel/updateStatusAjaxHandle/"
,
{
id
:
row
.
id
,
status
:
status
},
function
(
data
){
$
(
'#dg'
).
datagrid
(
'reload'
);
});
}
});
}
else
{
$
.
messager
.
alert
(
'提示'
,
'请选择要操作的记录!'
,
'info'
);
}
}
function
add
(){
pop
(
800
,
450
,
true
,
'dg'
,
'datagrid'
,
'/Media/Hotel/add/'
)
}
function
edit
(){
var
row
=
$
(
'#dg'
).
datagrid
(
'getSelected'
);
if
(
row
){
pop
(
800
,
450
,
true
,
'dg'
,
'datagrid'
,
'/Media/Hotel/add/id/'
+
row
.
id
);
}
else
{
$
.
messager
.
alert
(
'提示'
,
'请选择要操作的记录!'
,
'info'
);
}
}
function
details
(){
var
row
=
$
(
'#dg'
).
datagrid
(
'getSelected'
);
var
month
=
$
(
"input[name='searchMonth']"
).
val
();
if
(
row
){
pop
(
800
,
450
,
true
,
'dg'
,
'datagrid'
,
'/Media/Hotel/details/id/'
+
row
.
id
+
'/month/'
+
month
);
}
else
{
$
.
messager
.
alert
(
'提示'
,
'请选择要操作的记录!'
,
'info'
);
}
}
function
del
(){
var
row
=
$
(
'#dg'
).
datagrid
(
'getSelected'
);
if
(
row
){
$
.
messager
.
confirm
(
'操作确认'
,
'确认[删除]该记录?'
,
function
(
r
){
if
(
r
){
$
.
post
(
"/Media/Hotel/deleteHandle/"
,
{
id
:
row
.
id
},
function
(
data
){
$
(
'#dg'
).
datagrid
(
'reload'
);
});
}
});
}
else
{
$
.
messager
.
alert
(
'提示'
,
'请选择要操作的记录!'
,
'info'
);
}
}
$
(
"#submit_search"
).
click
(
function
()
{
$
(
'#dg'
).
datagrid
({
queryParams
:
form2Json
(
"searchform"
)
});
//点击搜索
});
/**
* JQuery扩展方法,用户对JQuery EasyUI的DataGrid控件进行操作。
*/
$
.
fn
.
extend
({
/**
* 修改DataGrid对象的默认大小,以适应页面宽度。
*
* @param heightMargin
* 高度对页内边距的距离。
* @param widthMargin
* 宽度对页内边距的距离。
* @param minHeight
* 最小高度。
* @param minWidth
* 最小宽度。
*
*/
resizeDataGrid
:
function
(
heightMargin
,
widthMargin
,
minHeight
,
minWidth
)
{
var
height
=
$
(
document
.
body
).
height
()
-
heightMargin
;
var
width
=
$
(
document
.
body
).
width
()
-
widthMargin
;
height
=
height
<
minHeight
?
minHeight
:
height
;
width
=
width
<
minWidth
?
minWidth
:
width
;
$
(
this
).
datagrid
(
'resize'
,
{
//height : height,
width
:
width
});
}
});
$
(
function
()
{
// datagrid数据表格ID
var
datagridId
=
'dg'
;
// 第一次加载时自动变化大小
$
(
'#'
+
datagridId
).
resizeDataGrid
(
0
,
10
,
0
,
0
);
// 当窗口大小发生变化时,调整DataGrid的大小
$
(
window
).
resize
(
function
()
{
$
(
'#'
+
datagridId
).
resizeDataGrid
(
0
,
10
,
0
,
0
);
});
});
</script>
</body>
</html>
\ 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