Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨建斌
/
page
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
1
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
e7f041e5
authored
2018-03-21 23:07:26 +0800
by
yangjianbin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
init
1 parent
b43c4392
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
application/views/config/index.php
application/views/config/index.php
View file @
e7f041e
<?php
$this
->
load
->
view
(
'common/header'
);
?>
<body>
<div
class=
"page-container"
>
<div
class=
"page-container"
>
<div>
<button
class=
"btn btn-primary radius"
onclick=
"layer_show('添加', '
<?=
site_url
(
'/config/add'
)
?>
')"
>
添加
</button>
<button
class=
"btn btn-primary radius"
onclick=
"layer_show('添加', '
<?=
site_url
(
'/config/add'
)
?>
')"
>
添加
</button>
</div>
<div
class=
"body mt-20"
>
...
...
@@ -26,10 +26,10 @@
</tbody>
</table>
</div>
</div>
<?php
$this
->
load
->
view
(
'common/footer'
);
?>
</div>
<?php
$this
->
load
->
view
(
'common/footer'
);
?>
<script>
<script>
var
table
=
$
(
'#table'
).
dataTable
({
aaSorting
:
[[
1
,
"desc"
]],
serverSide
:
true
,
...
...
@@ -44,7 +44,7 @@
var
ret
=
{},
json
=
jQuery
.
parseJSON
(
json
);
ret
.
data
=
json
.
data
||
[];
var
draw
=
getUrlParam
(
'draw'
);
if
(
draw
)
{
if
(
draw
)
{
ret
.
draw
=
draw
;
}
ret
.
recordsTotal
=
0
;
...
...
@@ -68,7 +68,7 @@
<button class="btn radius size-M">请选择 <i class="Hui-iconfont"></i></button>\
<ul class="dropDown-menu menu radius box-shadow">\
<li><a href="javascript:;" onclick="layer_show(\'编辑\', \'/index.php/config/edit/'
+
data
+
'\')">编辑</a></li>\
<li><a href="javascript:;del('
+
data
+
')">删除</a></li>\
<li><a href="javascript:;del('
+
data
+
')">删除</a></li>\
</ul></span>'
;
}
},
...
...
@@ -86,10 +86,10 @@
function
del
(
id
)
{
layer
.
confirm
(
'确认删除'
,
{
btn
:
[
'确认'
,
'取消'
],
btn
:
[
'确认'
,
'取消'
],
title
:
'删除产品'
,
icon
:
3
},
function
()
{
},
function
()
{
$
.
ajax
({
type
:
'delete'
,
url
:
apiBaseUrl
+
'config/product/'
+
id
,
...
...
@@ -104,10 +104,12 @@
}
else
{
layer
.
msg
(
'删除成功'
);
}
if
(
!
data
.
code
)
{
window
.
parent
.
reload
();
setTimeout
(
function
()
{
if
(
!
data
.
code
)
{
window
.
reload
();
layer_close
();
}
},
500
);
},
error
:
function
()
{
layer
.
alert
(
"请求失败"
)
...
...
@@ -116,9 +118,10 @@
});
}
function
reload
()
{
table
.
fnDraw
();
}
</script>
</script>
</body>
<html>
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment