239817b1 by 任超

style:我的预约

1 parent f081a1e4
......@@ -16,6 +16,9 @@ function pageData(){
$('.business_module li .cardItem').mouseout(function(){
$(this).find('.itemImg').attr('src',$(this).find('.itemImg').attr('pre'))
})
$('.center-appointment').click(function(){
window.open("./wdyy.html?title=个人中心&href="+window.location.pathname, "_self")
})
}
function getTimeState(){
// 获取当前时间
......
......@@ -2,14 +2,19 @@ layui.use('element', function () {
let element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块
});
$(function () {
compileData();
_initData();
$('#zjhm').text(getItem('myCookie').zjhm);
$('#username').text(getItem('myCookie').username);
$(document).on("click", ".business", function (e) {
window.open("./businessGuideDeatil.html?ywid=" + $(this).attr('ywid') + "")
})
})
function compileData() {
$('.online-booking').click(function(){
window.open("./yyxz.html?title="+decodeURI(GetQueryString('title')) + "&href="+GetQueryString('href'), "_self")
})
}
// 获取列表信息
function _initData(currentPage = 1) {
var appointment_list = $(".appointment_list");
......
......@@ -2,6 +2,9 @@ layui.use('element', function () {
let element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块
});
$(function () {
$('.layui-breadcrumb a').eq(1).attr('href',GetQueryString('href'));
$('.layui-breadcrumb a').eq(1).attr('title', decodeURI(GetQueryString('title')));
$('.layui-breadcrumb a').eq(1).text(decodeURI(GetQueryString('title')));
// 初始化数据
_initData()
// 判断是否能选择办事大厅
......@@ -125,7 +128,7 @@ $(function () {
// 下一步
$('.nextButton').click(function () {
if (isSelectofficeHall) {
window.open("./yysj.html?jgid=" + jgid + "", "_self")
window.open("./yysj.html?jgid=" + jgid + "&title="+decodeURI(GetQueryString('title'))+ "&href="+GetQueryString('href'), "_self")
} else {
layer.msg('请先选择办事大厅');
}
......
......@@ -2,6 +2,9 @@ layui.use('element', function () {
let element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块
});
$(function () {
$('.layui-breadcrumb a').eq(1).attr('href',GetQueryString('href'));
$('.layui-breadcrumb a').eq(1).attr('title', decodeURI(GetQueryString('title')));
$('.layui-breadcrumb a').eq(1).text(decodeURI(GetQueryString('title')));
getAppointmentDetail()
});
// GET 根据预约信息标识码appointmentId查看预约详情
......@@ -11,7 +14,7 @@ function getAppointmentDetail() {
url:
portal.api_url + "/portal/appointmentmh/getAppointmentDetail",
data: {
appointmentId: GetRequest(),
appointmentId: GetQueryString('appointmentId'),
},
dataType: "json",
success: function (result) {
......@@ -59,18 +62,4 @@ function getAppointmentDetail() {
}
},
});
}
function GetRequest() {
var url = location.search; //获取url中"?"符后的字串
var theRequest = new Object();
if (url.indexOf("?") != -1) {
var str = url.substr(1);
strs = str.split("?");
for (var i = 0; i < strs.length; i++) {
theRequest[strs[i].split("=")[0]] = decodeURIComponent(
strs[i].split("=")[1]
);
}
}
return theRequest.appointmentId;
}
}
\ No newline at end of file
......
......@@ -3,6 +3,9 @@ layui.use("element", function () {
let element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块
});
$(function () {
$('.layui-breadcrumb a').eq(1).attr('href',GetQueryString('href'));
$('.layui-breadcrumb a').eq(1).attr('title', decodeURI(GetQueryString('title')));
$('.layui-breadcrumb a').eq(1).text(decodeURI(GetQueryString('title')));
getAppointmentDay();
var swiper = new Swiper(".swiper-container", {
slidesPerView: 5,
......@@ -233,7 +236,10 @@ function makeAppointment(id) {
success: function (result) {//返回数据根据结果进行相应的处理
if (result.code == 200 && result.data !== null) {
appointmentId = result.data
window.location.href = "./yyjg.html?appointmentId=" + appointmentId
// window.location.href = "./yyjg.html?appointmentId=" + appointmentId
window.open("./yyjg.html?appointmentId=" + appointmentId + "&title="+decodeURI(GetQueryString('title'))+ "&href="+GetQueryString('href'), "_self")
}else {
del(result.message)
}
......
layui.use('element', function () {
let element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块
});
$(function () {
layui.use('element', function () {
let element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块
//监听导航点击
element.on('nav(demo)', function (elem) {
//console.log(elem)
layer.msg(elem.text());
});
});
$('.layui-breadcrumb a').eq(1).attr('href',GetQueryString('href'));
$('.layui-breadcrumb a').eq(1).text(decodeURI(GetQueryString('title')));
compileData();
})
function compileData() {
var accept = $('.accept');
$('.next_button button').click(function () {
if ($('.checkbox').find(".img").length>0) {
......@@ -19,10 +19,10 @@ $(function () {
}, function () {
layer.closeAll();
}, function () {
window.location.href = "./xzqy.html";
window.open("./xzqy.html?title="+decodeURI(GetQueryString('title'))+"&href="+GetQueryString('href'), "_self")
});
});
} else {
layui.use('layer', function () {
layer.msg('请先同意以上协议', function(){
......@@ -40,4 +40,4 @@ $(function () {
$(this).removeClass('.bordernone')
}
})
})
\ No newline at end of file
}
\ No newline at end of file
......
......@@ -51,7 +51,7 @@
</li>
<li>
<div class="cardItem">
<a href="./wdyy.html" title="我的预约">
<a class="center-appointment" title="我的预约">
<img class="itemImg" url="../staticImages/semyyuyue.png" src="../staticImages/myyuyue.png" pre="../staticImages/myyuyue.png">
<p class="itemName">我的预约</p>
</a>
......
......@@ -37,7 +37,7 @@
</ul>
</div>
<button type="button" class="layui-btn layui-btn-normal">
<a href="./yyxz.html">在线预约</a>
<a class="online-booking">在线预约</a>
</button>
</div>
<!-- -------------预约列表--------------- -->
......