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
d9912690
authored
2018-03-31 11:33:31 +0800
by
wang
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
init
1 parent
b08860a7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
2 deletions
application/views/login.php
application/views/perm/roleEdit.php
application/views/login.php
View file @
d991269
...
...
@@ -13,7 +13,7 @@
<div
class=
"login_name"
>
<p>
后台管理系统
</p>
</div>
<form
action=
"
system/user/update
"
id=
"edit"
>
<form
action=
"
"
id=
"edit"
>
<input
name=
"username"
type=
"text"
placeholder=
"用户名"
>
<input
name=
"password"
type=
"password"
placeholder=
"密码"
>
</form>
...
...
@@ -27,5 +27,50 @@
(推荐IE10以上浏览器或谷歌浏览器或firefox浏览器, 获得更快响应速度)
</div>
</div>
<?php
$this
->
load
->
view
(
'common/footer'
);
?>
<script>
function
save
()
{
//获得款中的节点
var
targetUrl
=
$
(
"#edit"
).
attr
(
"action"
);
//需要填写目的url
var
data
=
$
(
"#edit"
).
serializeJson
();
var
newData
=
{
username
:
data
[
'nameZh'
],
password
:
data
[
'id'
]
};
$
.
ajax
({
type
:
'post'
,
url
:
apiBaseUrl
+
targetUrl
,
cache
:
false
,
data
:
JSON
.
stringify
(
newData
),
dataType
:
'json'
,
contentType
:
"application/json; charset=UTF-8"
,
success
:
function
(
data
)
{
// console.log(data);
if
(
data
.
msg
)
{
layer
.
alert
(
data
.
msg
);
}
else
if
(
data
.
code
!=
0
)
{
layer
.
alert
(
'操作失败'
);
}
else
{
layer
.
msg
(
'操作成功'
);
// $.session.set('user_id', data['id']);
window
.
parent
.
reload
();
layer_close
();
}
if
(
data
.
code
)
{
setTimeout
(
function
()
{
window
.
parent
.
reload
();
layer_close
();
},
500
);
}
},
error
:
function
()
{
layer
.
alert
(
"操作失败"
)
}
});
// layer_close();
}
</script>
</body>
</html>
\ No newline at end of file
...
...
application/views/perm/roleEdit.php
View file @
d991269
...
...
@@ -92,7 +92,6 @@
id
:
data
[
'id'
],
menuIds
:
menuIds
};
$
.
ajax
({
type
:
'put'
,
url
:
apiBaseUrl
+
targetUrl
,
...
...
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