239817b1 by 任超

style:我的预约

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