Toggle navigation
This project
Loading...
Sign in
najixian
/
xt_dc_admin
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Download as
Email Patches
Plain Diff
Browse Files
Commit
2b413adafe69ab1dbcd81f7f77c08a1d5760b6a8
Authored by
teemitop
2019-07-11 18:23:35 +0800
1 parent
25612978
build: skipped
添加sn码 灰度更新时间列表调整
Changes
5
Builds
0
Inline
Side-by-side
Showing
5 changed files
with
109 additions
and
3 deletions
application/admin/controller/Api.php
application/admin/controller/Template.php
application/admin/view/seller/get_device_online_status.html
application/admin/view/template/android.html
application/admin/view/template/getdotime.html
application/admin/controller/Api.php
View file @
2b413ad
...
...
@@ -152,11 +152,14 @@ class Api{
//获取灰度更新时间
public
function
getdotime
()
{
$dotime
=
db
(
'dotime'
)
->
where
(
array
(
'id'
=>
1
))
->
select
();
$result
=
array
();
$dotime
=
db
(
'dotime'
)
->
select
();
foreach
(
$dotime
as
$key
=>
$value
)
{
$result
[
'data'
][]
=
$value
[
'dtime'
];
}
//echo db::table('dotime')->getLastSql();die;
if
(
$dotime
){
if
(
@
$result
[
'data'
]
){
$result
[
'ret'
]
=
200
;
$result
[
'data'
]
=
$dotime
[
0
][
'dtime'
];
$result
[
'msg'
]
=
'success'
;
}
else
{
$result
[
'ret'
]
=
0
;
...
...
application/admin/controller/Template.php
View file @
2b413ad
...
...
@@ -686,4 +686,19 @@ class Template extends Common{
}
return
view
();
}
//获取灰度更新列表
public
function
getdotime
(){
if
(
Request
::
isAjax
()){
$list
=
db
(
'dotime'
)
->
select
();
foreach
(
$list
as
$key
=>
$value
)
{
$list
[
$key
][
'dtime'
]
=
$value
[
'dtime'
];
}
$this
->
assign
(
'title'
,
'灰度更新日期'
);
$result
=
[
'code'
=>
0
,
'msg'
=>
'获取成功!'
,
'data'
=>
$list
,
'rel'
=>
1
];
return
$result
;
}
$this
->
assign
(
'title'
,
'灰度更新日期'
);
return
view
();
}
}
\ No newline at end of file
...
...
application/admin/view/seller/get_device_online_status.html
View file @
2b413ad
...
...
@@ -52,6 +52,7 @@
{
field
:
'device'
,
title
:
'设备编号'
},
{
field
:
'user_token'
,
title
:
'TOKEN'
},
{
field
:
'type'
,
title
:
'厂商'
,
width
:
100
},
{
field
:
'sn'
,
title
:
'SN'
,
width
:
100
},
{
field
:
'version'
,
title
:
'设备版本号'
,
width
:
100
}
]],
done
:
function
(
res
,
curr
,
count
){
...
...
application/admin/view/template/android.html
View file @
2b413ad
...
...
@@ -12,6 +12,9 @@
<button
class=
"layui-btn layui-btn"
onclick=
"editUpdateDotime()"
>
<i
class=
"fa fa-file-image-o"
></i>
灰度更新时间(点击更新)
</button>
<a
href=
"{:url('getdotime')}"
class=
"layui-btn layui-btn layui-btn-danger"
>
<i
class=
"fa fa-file-image-o"
></i>
灰度更新日期选择
</a>
<a
href=
"{:url('android')}"
class=
"layui-btn layui-btn layui-btn-danger"
>
<i
class=
"fa fa-file-image-o"
></i>
下载包
</a>
...
...
application/admin/view/template/getdotime.html
0 → 100644
View file @
2b413ad
{include file="common/head"/}
<div
class=
"admin-main fadeInUp animated"
>
<fieldset
class=
"layui-elem-field layui-field-title"
>
<legend>
{$title}
</legend>
</fieldset>
<div
class=
"layui-field-box"
>
<blockquote
class=
"layui-elem-quote"
>
<div
class=
"layui-form-item"
>
<!--<div class="layui-input-inline" style="width: 100px;">
<input type="text" name="dotime" id="dotime" value="{$dotime.dtime}" autocomplete="off" class="layui-input">
</div>
<button class="layui-btn layui-btn" onclick="editUpdateDotime()">
<i class="fa fa-file-image-o"></i> 灰度更新时间(点击更新)
</button>-->
<a
href=
"{:url('getdotime')}"
class=
"layui-btn layui-btn layui-btn-danger"
>
<i
class=
"fa fa-file-image-o"
></i>
灰度更新日期选择
</a>
<a
href=
"{:url('android')}"
class=
"layui-btn layui-btn layui-btn-danger"
>
<i
class=
"fa fa-file-image-o"
></i>
下载包
</a>
<a
href=
"{:url('androidUpload')}"
class=
"layui-btn layui-btn"
>
<i
class=
"fa fa-file-image-o"
></i>
上传包
</a>
</div>
</blockquote>
<table
class=
"layui-table"
id=
"list"
lay-filter=
"list"
></table>
</div>
</div>
{include file="common/foot"/}
<script
type=
"text/html"
id=
"barDemo"
>
<
a
class
=
"layui-btn layui-btn-danger layui-btn-xs"
lay
-
event
=
"del"
>
{:
lang
(
'del'
)}
<
/a
>
</script>
<script
src=
"/static/common/js/jquery-1.8.1.min.js"
></script>
<script>
layui
.
use
([
'table'
,
'form'
],
function
()
{
var
table
=
layui
.
table
,
form
=
layui
.
form
,
$
=
layui
.
jquery
;
var
tableIn
=
table
.
render
({
elem
:
'#list'
,
url
:
'{:url("getdotime")}'
,
method
:
'post'
,
cols
:
[[
{
field
:
'id'
,
title
:
'主键ID'
,
width
:
80
}
,{
field
:
'dtime'
,
title
:
'日期'
}
,{
width
:
160
,
title
:
'操作'
,
align
:
'center'
,
toolbar
:
'#barDemo'
}
]]
});
//删除
table
.
on
(
'tool(list)'
,
function
(
obj
){
var
data
=
obj
.
data
;
if
(
obj
.
event
===
'del'
){
layer
.
confirm
(
'{:lang("Are you sure you want to delete it")}'
,
function
(
index
){
$
.
post
(
"{:url('androidDel')}"
,{
id
:
data
.
id
},
function
(
res
){
if
(
res
.
code
==
1
){
layer
.
msg
(
res
.
msg
,{
time
:
1000
,
icon
:
1
});
obj
.
del
();
}
else
{
layer
.
msg
(
res
.
msg
,{
time
:
1000
,
icon
:
2
});
}
});
layer
.
close
(
index
);
});
}
});
});
//变更灰度更新时间
/*function editUpdateDotime(){
var dotime = $("#dotime").val();
$.ajax({
url : "/admin/template/editupdatedotime",
type : "post",
async : true,
data : { "dotime" : dotime},
success : function(data){
if(data['code'] > 0){
layer.msg(data.msg,{time:1000,icon:1});
}else{
layer.msg(data.msg,{time:1000,icon:2});
}
}
})
}*/
</script>
</body>
</html>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment