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
e81e2c78
authored
2018-03-22 23:07:50 +0800
by
yangjianbin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
init
1 parent
e59c50c0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletions
application/views/tool/cal.php
application/views/tool/cal.php
View file @
e81e2c7
...
...
@@ -63,7 +63,7 @@
<div
class=
"row cl pb-20 col-sm-12"
>
<div
class=
"col-sm-offset-4 col-sm-2"
>
<button
class=
"btn btn-primary btn-block"
onclick=
"submit()"
>
计算
</button>
<button
class=
"btn btn-primary btn-block"
>
计算
</button>
</div>
<div
class=
"col-sm-2"
>
<input
class=
"btn btn-warning btn-block"
value=
"重置"
type=
"reset"
>
...
...
@@ -80,6 +80,32 @@
$
(
'#loanDeadline'
).
val
(
data
.
loandeadline
);
})
$
(
'#form'
).
submit
(
function
(
e
)
{
e
.
stopPropagation
();
e
.
preventDefault
();
var
borrowAmount
=
$
(
'[name=borrowAmount]'
).
val
();
var
productId
=
$
(
'[name=productId]'
).
val
();
var
str
=
'borrowAmount='
+
borrowAmount
+
'&productId='
+
productId
;
$
.
ajax
({
type
:
'get'
,
url
:
apiBaseUrl
+
'application/tool/interest?'
+
str
,
cache
:
false
,
dataType
:
'json'
,
contentType
:
"application/json; charset=UTF-8"
,
success
:
function
(
data
){
if
(
data
.
code
!=
0
){
layer
.
alert
(
'请求失败'
);
}
else
{
$
(
'#totalRepay'
).
val
(
data
.
data
.
totalRepay
);
$
(
'#totalAmount'
).
val
(
data
.
data
[
0
].
totalAmount
);
}
},
error
:
function
(){
layer
.
alert
(
"请求失败"
)
}
})
})
function
submit
(){
var
borrowAmount
=
$
(
'[name=borrowAmount]'
).
val
();
var
productId
=
$
(
'[name=productId]'
).
val
();
...
...
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