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
78d2fdf2
authored
2018-03-17 14:58:23 +0800
by
Zelig
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'develop' of
http://g.28ms.com:8000/yangjianbin/page
into develop
2 parents
72cdd41f
db2e7890
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
2 deletions
application/views/common/footer.php
application/views/common/header.php
application/views/work/add.php
application/views/common/footer.php
View file @
78d2fdf
...
...
@@ -11,3 +11,24 @@
<script
type=
"text/javascript"
src=
"/resource/datatable.js"
></script>
<script
src=
"https://cdn.bootcss.com/holder/2.9.4/holder.min.js"
></script>
<script
type=
"text/javascript"
src=
"/resource/upload.js"
></script>
<script>
(
function
(
$
){
$
.
fn
.
serializeJson
=
function
(){
var
serializeObj
=
{};
var
array
=
this
.
serializeArray
();
var
str
=
this
.
serialize
();
$
(
array
).
each
(
function
(){
if
(
serializeObj
[
this
.
name
]){
if
(
$
.
isArray
(
serializeObj
[
this
.
name
])){
serializeObj
[
this
.
name
].
push
(
this
.
value
);
}
else
{
serializeObj
[
this
.
name
]
=
[
serializeObj
[
this
.
name
],
this
.
value
];
}
}
else
{
serializeObj
[
this
.
name
]
=
this
.
value
;
}
});
return
serializeObj
;
};
})(
jQuery
);
</script>
...
...
application/views/common/header.php
View file @
78d2fdf
...
...
@@ -23,4 +23,7 @@
<meta
name=
"keywords"
content=
""
>
<meta
name=
"description"
content=
""
>
<title>
标题
</title>
<script>
var
apiBaseUrl
=
"http://151.28ms.com:8088/"
;
</script>
</head>
...
...
application/views/work/add.php
View file @
78d2fdf
...
...
@@ -8,7 +8,7 @@
<div
class=
"panel panel-default"
>
<div
class=
"panel-header"
>
填写借款人信息
</div>
<div
class=
"panel-body"
>
<form
action=
"
<?=
site_url
(
'work/added'
)
?>
"
method=
"post"
class=
"form form-horizontal"
id=
"work_add"
>
<form
action=
'order/into/applyOrder'
method=
"post"
class=
"form form-horizontal"
id=
"work_add"
>
<div
class=
"row cl"
>
<label
class=
"form-label col-xs-4 col-sm-3"
>
姓名
</label>
<div
class=
"formControls col-xs-3 col-sm-3"
>
...
...
@@ -29,7 +29,7 @@
</div>
<div
class=
"row cl"
>
<div
class=
"col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3"
>
<input
class=
"btn btn-primary radius"
type=
"submit
"
value=
"提交"
>
<input
id=
"work_add_btn"
class=
"btn btn-primary radius"
type=
"button
"
value=
"提交"
>
</div>
</div>
</form>
...
...
@@ -57,6 +57,31 @@
}
}
});
$
(
"#work_add_btn"
).
click
(
function
(){
var
targetUrl
=
$
(
"#work_add"
).
attr
(
"action"
);
var
data
=
$
(
"#work_add"
).
serializeJson
();
$
.
ajax
({
type
:
'post'
,
url
:
apiBaseUrl
+
targetUrl
,
cache
:
false
,
data
:
JSON
.
stringify
(
data
),
dataType
:
'json'
,
contentType
:
"application/json; charset=UTF-8"
,
success
:
function
(
data
){
if
(
data
.
msg
){
alert
(
data
.
msg
);
}
else
if
(
data
.
code
!=
0
){
alert
(
'请求失败'
);
}
else
{
alert
(
'请求成功'
);
}
},
error
:
function
(){
alert
(
"请求失败"
)
}
})
})
});
</script>
</body>
...
...
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