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
4f0f54b0
Commit
4f0f54b0
authored
Aug 07, 2019
by
wangjiangze
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
酒店片库,重新注入、查看详情
parent
21d2c0ff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
1 deletion
+46
-1
HotelAction.class.php
SooonerHotel/App/Lib/Action/Media/HotelAction.class.php
+14
-0
index.html
SooonerHotel/App/Tpl/Media/zh-cn/Hotel/index.html
+32
-1
No files found.
SooonerHotel/App/Lib/Action/Media/HotelAction.class.php
View file @
4f0f54b0
...
...
@@ -108,4 +108,18 @@ class HotelAction extends CommonAction{
echo
'false'
;
}
}
//ajax修改注入状态
public
function
updateStatusInjectAjaxHandle
(){
$model
=
D
(
"HotelMediaMap"
);
$data
=
$_POST
;
$searchSp
=
$data
[
'searchSp'
];
unset
(
$data
[
'searchSp'
]);
$data
[
'updatetime'
]
=
date
(
'Y-m-d H:i:s'
);
if
(
$model
->
table
(
"sh_hotel_media_map_
$searchSp
"
)
->
save
(
$data
)){
echo
'true'
;
}
else
{
echo
'false'
;
}
}
}
SooonerHotel/App/Tpl/Media/zh-cn/Hotel/index.html
View file @
4f0f54b0
...
...
@@ -89,6 +89,9 @@ onRowContextMenu : onRowContextMenu
<!-- <div iconCls="icon-edit" id="menuEdit" onclick="edit()" {:buttonAuth('Media','Hotel','add')}>编辑</div>-->
<div
iconCls=
"icon-cancel"
id=
"menuDel"
onclick=
"enable(0)"
{
:buttonAuth
('
Media
','
Hotel
','
deletehandle
')}
>
删除
</div>
<div
class=
"menu-sep"
></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
class=
"menu-sep"
></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>
...
...
@@ -96,11 +99,13 @@ onRowContextMenu : onRowContextMenu
<!-- <div iconCls="icon-edit" id="menuEdit" onclick="edit()" {:buttonAuth('Media','Hotel','add')}>编辑</div>-->
<div
iconCls=
"icon-cancel"
id=
"menuDel"
onclick=
"enable(0)"
{
:buttonAuth
('
Media
','
Hotel
','
deletehandle
')}
>
删除
</div>
<div
class=
"menu-sep"
></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
class=
"menu-sep"
></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>
<script>
function
imageFormat
(
value
,
row
,
index
)
{
return
"<a target='_blank' href='"
+
row
.
url_pic
+
"' title='点击查看'> <image src="
+
row
.
url_pic
+
" height='70px' width='100px'/></a>"
;
}
...
...
@@ -162,6 +167,14 @@ $(function(){
}
})
});
function
details
(){
var
row
=
$
(
'#dg'
).
datagrid
(
'getSelected'
);
if
(
row
){
pop
(
800
,
700
,
true
,
''
,
'datagrid'
,
'/Media/Cloud/add/id/'
+
row
.
media_id
);
}
else
{
$
.
messager
.
alert
(
'提示'
,
'请选择要操作的记录!'
,
'info'
);
}
}
//禁用启用
function
enable
(
status
){
var
row
=
$
(
'#dg'
).
datagrid
(
'getSelected'
);
...
...
@@ -184,6 +197,24 @@ function enable(status){
$
.
messager
.
alert
(
'提示'
,
'请选择要操作的记录!'
,
'info'
);
}
}
//重新注入
function
restartInject
(
status
){
var
row
=
$
(
'#dg'
).
datagrid
(
'getSelected'
);
var
searchSp
=
$
(
"select[name='searchSp']"
).
val
();
if
(
row
){
var
msg
=
'重新注入'
;
$
.
messager
.
confirm
(
'操作确认'
,
'确认['
+
msg
+
']该记录?'
,
function
(
r
){
if
(
r
){
$
.
post
(
"/Media/Hotel/updateStatusInjectAjaxHandle/"
,
{
id
:
row
.
id
,
status_inject
:
status
,
searchSp
:
searchSp
},
function
(
data
){
$
(
'#dg'
).
datagrid
(
'reload'
);
});
}
});
}
else
{
$
.
messager
.
alert
(
'提示'
,
'请选择要操作的记录!'
,
'info'
);
}
}
function
add
(){
pop
(
800
,
450
,
true
,
'dg'
,
'datagrid'
,
'/Media/Hotel/add/'
)
}
...
...
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