Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
任超
/
js.portalStaticPage
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
2a36cc3a
authored
2020-12-30 10:08:32 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:我的预约
1 parent
e4ab9cf6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
staticCss/wdyy.css
staticJs/wdyy.js
staticCss/wdyy.css
View file @
2a36cc3
...
...
@@ -140,7 +140,7 @@
}
.item_info
{
padding
:
30px
;
height
:
1
80
px
;
height
:
1
93
px
;
}
.item_info
li
{
width
:
100%
;
...
...
staticJs/wdyy.js
View file @
2a36cc3
...
...
@@ -34,7 +34,7 @@ function _initData(currentPage = 1) {
if
(
records
[
i
].
state
==
'0'
)
{
li
+=
'<div class="item_title success">'
li
+=
'<h3>预约成功</h3>'
li
+=
'<a href="./yyjg.html?appointmentId='
+
records
[
i
].
appointmentId
+
'">查看<i class="layui-icon layui-icon-right"></i></a>'
li
+=
'<a href="./yyjg.html?appointmentId='
+
records
[
i
].
appointmentId
+
'">查看<i class="layui-icon layui-icon-right"></i></a>'
li
+=
'</div>'
}
else
if
(
records
[
i
].
state
==
'1'
)
{
li
+=
'<div class="item_title success">'
...
...
@@ -72,7 +72,16 @@ function _initData(currentPage = 1) {
// 用户取消预约
$
(
document
).
on
(
"click"
,
".cancel_reservation"
,
function
(
e
)
{
_cancleAppointment
(
$
(
this
).
attr
(
'appointmentId'
),
$
(
this
).
attr
(
'jgid'
),
$
(
this
).
attr
(
'periodRulesId'
),
getCookie
(
'myCookie'
).
userid
)
let
that
=
this
;
layui
.
use
(
'layer'
,
function
()
{
layer
.
confirm
(
'此操作将取消预约'
,
{
btn
:
[
'是'
,
'否'
]
//按钮
},
function
()
{
_cancleAppointment
(
$
(
that
).
attr
(
'appointmentId'
),
$
(
that
).
attr
(
'jgid'
),
$
(
that
).
attr
(
'periodRulesId'
),
getCookie
(
'myCookie'
).
userid
)
},
function
()
{
layer
.
msg
(
'已取消'
);
});
})
})
function
_cancleAppointment
(
appointmentId
,
jgid
,
periodRulesId
,
userid
)
{
...
...
@@ -92,7 +101,10 @@ function _cancleAppointment(appointmentId, jgid, periodRulesId, userid) {
//数据,这里使用的是Json格式进行传输
success
:
function
(
result
)
{
//返回数据根据结果进行相应的处理
if
(
result
.
code
==
200
)
{
layui
.
use
(
'layer'
,
function
()
{
var
layer
=
layui
.
layer
;
layer
.
msg
(
'取消预约成功'
);
})
_initData
();
}
}
...
...
@@ -118,10 +130,10 @@ function paged(pageCount, curr) {
}
});
})
if
(
pageCount
==
0
)
{
if
(
pageCount
==
0
)
{
$
(
'#page'
).
hide
();
$
(
'.noData'
).
show
();
}
else
{
}
else
{
$
(
'#page'
).
show
();
$
(
'.noData'
).
hide
();
}
...
...
Please
register
or
sign in
to post a comment