正在显示
2 个修改的文件
包含
60 行增加
和
51 行删除
@@ -244,10 +244,9 @@ | @@ -244,10 +244,9 @@ | ||
244 | }, | 244 | }, |
245 | success: function (data) { | 245 | success: function (data) { |
246 | if (data.code == '1') { | 246 | if (data.code == '1') { |
247 | - // alert("成功"); | ||
248 | window.location.href = "{:url('portal/index/confirm_order',['gid'=>$gid])}"; | 247 | window.location.href = "{:url('portal/index/confirm_order',['gid'=>$gid])}"; |
249 | } else { | 248 | } else { |
250 | - alert(data.msg); | 249 | + layer.msg(data.msg); |
251 | } | 250 | } |
252 | } | 251 | } |
253 | }) | 252 | }) |
@@ -5,7 +5,8 @@ | @@ -5,7 +5,8 @@ | ||
5 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | 5 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
6 | <meta content="yes" name="apple-mobile-web-app-capable"> | 6 | <meta content="yes" name="apple-mobile-web-app-capable"> |
7 | <meta content="yes" name="apple-touch-fullscreen"> | 7 | <meta content="yes" name="apple-touch-fullscreen"> |
8 | - <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,maximum-scale=1, minimum-scale=1, user-scalable=no"> | 8 | + <meta name="viewport" |
9 | + content="width=device-width, initial-scale=1,maximum-scale=1,maximum-scale=1, minimum-scale=1, user-scalable=no"> | ||
9 | <title>我的预约</title> | 10 | <title>我的预约</title> |
10 | <link rel="stylesheet" href="/static/css/common.css"> | 11 | <link rel="stylesheet" href="/static/css/common.css"> |
11 | <link rel="stylesheet" href="/static/css/style.css"> | 12 | <link rel="stylesheet" href="/static/css/style.css"> |
@@ -43,9 +44,9 @@ | @@ -43,9 +44,9 @@ | ||
43 | <div class="btn_yuyue" onclick=location.href="{:url('user/yuyue/index')}"> | 44 | <div class="btn_yuyue" onclick=location.href="{:url('user/yuyue/index')}"> |
44 | <img src="/static/image/btn_yuyue.png"> | 45 | <img src="/static/image/btn_yuyue.png"> |
45 | </div> | 46 | </div> |
46 | - <else /> | 47 | + <else/> |
47 | <volist name="data" id="vo"> | 48 | <volist name="data" id="vo"> |
48 | - <div class="yuyueList" > | 49 | + <div class="yuyueList"> |
49 | <div class="yList_top"> | 50 | <div class="yList_top"> |
50 | <b>{$vo.status|yuyue_status_name}</b> | 51 | <b>{$vo.status|yuyue_status_name}</b> |
51 | <i>{$vo.yuyue_day|date_to_date}</i> | 52 | <i>{$vo.yuyue_day|date_to_date}</i> |
@@ -73,16 +74,19 @@ | @@ -73,16 +74,19 @@ | ||
73 | </div> | 74 | </div> |
74 | </case> | 75 | </case> |
75 | <case value="2"> | 76 | <case value="2"> |
76 | - <div class="yuyue_btn" onclick=location.href="{:url('user/comment/index',array('id'=>$vo['teach_id'],'yuyue_id'=>$vo['id']))}"> | 77 | + <div class="yuyue_btn" onclick=location.href="{:url('user/comment/index',array('id'=> |
78 | + $vo['teach_id'],'yuyue_id'=>$vo['id']))}"> | ||
77 | <b class="click_yuyue">去评价</b> | 79 | <b class="click_yuyue">去评价</b> |
78 | </div> | 80 | </div> |
79 | </case> | 81 | </case> |
80 | <case value="3"> | 82 | <case value="3"> |
81 | - <div class="yuyue_btn" onclick=location.href="{:url('user/comment/show_stu',array('yuyue_id'=>$vo['id']))}"> | 83 | + <div class="yuyue_btn" |
84 | + onclick=location.href="{:url('user/comment/show_stu',array('yuyue_id'=> | ||
85 | + $vo['id']))}"> | ||
82 | <b class="click_yuyue">查看评价</b> | 86 | <b class="click_yuyue">查看评价</b> |
83 | </div> | 87 | </div> |
84 | </case> | 88 | </case> |
85 | - <default /> | 89 | + <default/> |
86 | </switch> | 90 | </switch> |
87 | 91 | ||
88 | 92 | ||
@@ -100,7 +104,7 @@ | @@ -100,7 +104,7 @@ | ||
100 | <div class="btn_yuyue" onclick=location.href="{:url('user/yuyue/index')}"> | 104 | <div class="btn_yuyue" onclick=location.href="{:url('user/yuyue/index')}"> |
101 | <img src="/static/image/btn_yuyue.png"> | 105 | <img src="/static/image/btn_yuyue.png"> |
102 | </div> | 106 | </div> |
103 | - <else /> | 107 | + <else/> |
104 | <volist name="dxdata" id="vo"> | 108 | <volist name="dxdata" id="vo"> |
105 | <div class="yuyueList"> | 109 | <div class="yuyueList"> |
106 | <div class="yList_top"> | 110 | <div class="yList_top"> |
@@ -135,7 +139,7 @@ | @@ -135,7 +139,7 @@ | ||
135 | <div class="btn_yuyue" onclick=location.href="{:url('user/yuyue/index')}"> | 139 | <div class="btn_yuyue" onclick=location.href="{:url('user/yuyue/index')}"> |
136 | <img src="/static/image/btn_yuyue.png"> | 140 | <img src="/static/image/btn_yuyue.png"> |
137 | </div> | 141 | </div> |
138 | - <else /> | 142 | + <else/> |
139 | <volist name="dpdata" id="vo"> | 143 | <volist name="dpdata" id="vo"> |
140 | <div class="yuyueList"> | 144 | <div class="yuyueList"> |
141 | <div class="yList_top"> | 145 | <div class="yList_top"> |
@@ -153,7 +157,8 @@ | @@ -153,7 +157,8 @@ | ||
153 | <i class="yu_times">{$vo.yuyue_begin}:00 - {$vo.yuyue_end}:00</i> | 157 | <i class="yu_times">{$vo.yuyue_begin}:00 - {$vo.yuyue_end}:00</i> |
154 | </div> | 158 | </div> |
155 | </div> | 159 | </div> |
156 | - <div class="yuyue_btn" onclick=location.href="{:url('user/comment/index',array('id'=>$vo['teach_id'],'yuyue_id'=>$vo['id']))}"> | 160 | + <div class="yuyue_btn" onclick=location.href="{:url('user/comment/index',array('id'=> |
161 | + $vo['teach_id'],'yuyue_id'=>$vo['id']))}"> | ||
157 | <b class="click_yuyue">去评价</b> | 162 | <b class="click_yuyue">去评价</b> |
158 | </div> | 163 | </div> |
159 | </div> | 164 | </div> |
@@ -170,7 +175,7 @@ | @@ -170,7 +175,7 @@ | ||
170 | <div class="btn_yuyue" onclick=location.href="{:url('user/yuyue/index')}"> | 175 | <div class="btn_yuyue" onclick=location.href="{:url('user/yuyue/index')}"> |
171 | <img src="/static/image/btn_yuyue.png"> | 176 | <img src="/static/image/btn_yuyue.png"> |
172 | </div> | 177 | </div> |
173 | - <else /> | 178 | + <else/> |
174 | <volist name="ypdata" id="vo"> | 179 | <volist name="ypdata" id="vo"> |
175 | <div class="yuyueList"> | 180 | <div class="yuyueList"> |
176 | <div class="yList_top"> | 181 | <div class="yList_top"> |
@@ -188,7 +193,8 @@ | @@ -188,7 +193,8 @@ | ||
188 | <i class="yu_times">{$vo.yuyue_begin}:00 - {$vo.yuyue_end}:00</i> | 193 | <i class="yu_times">{$vo.yuyue_begin}:00 - {$vo.yuyue_end}:00</i> |
189 | </div> | 194 | </div> |
190 | </div> | 195 | </div> |
191 | - <div class="yuyue_btn" onclick=location.href="{:url('user/comment/show_stu',array('yuyue_id'=>$vo['id']))}"> | 196 | + <div class="yuyue_btn" onclick=location.href="{:url('user/comment/show_stu',array('yuyue_id'=> |
197 | + $vo['id']))}"> | ||
192 | <b class="click_yuyue">查看评价</b> | 198 | <b class="click_yuyue">查看评价</b> |
193 | </div> | 199 | </div> |
194 | </div> | 200 | </div> |
@@ -214,50 +220,53 @@ | @@ -214,50 +220,53 @@ | ||
214 | <script type="text/javascript" src="/static/js/common.js"></script> | 220 | <script type="text/javascript" src="/static/js/common.js"></script> |
215 | <script type="text/javascript" src="/static/js/study_car.js"></script> | 221 | <script type="text/javascript" src="/static/js/study_car.js"></script> |
216 | <script> | 222 | <script> |
217 | - $(function(){ | ||
218 | - $('.yList_top').each(function(){ | ||
219 | - var colorHtml=$(this).children('b').html(); | ||
220 | - if(colorHtml=="待学车"){ | ||
221 | - $(this).children('b').css("color","#53a6fa"); | 223 | + $(function () { |
224 | + $('.yList_top').each(function () { | ||
225 | + var colorHtml = $(this).children('b').html(); | ||
226 | + if (colorHtml == "待学车") { | ||
227 | + $(this).children('b').css("color", "#53a6fa"); | ||
222 | } | 228 | } |
223 | }); | 229 | }); |
224 | - $('.click_yuyue').click(function(){ | ||
225 | - var id=$(this).attr("data-id"); | ||
226 | - var cancel_fa=$(this).parent().parent(); | ||
227 | - var con_text=$(this).html().trim(); | ||
228 | - if(con_text=="取消预约"){ | ||
229 | - var yu_day=$(this).parent().prev().prev().find('i').text(); | ||
230 | - var yu_times=$(this).parent().prev().find('.yu_times').text().split('-')[0]; | ||
231 | - var yuTime=new Date(yu_day+' '+yu_times).getTime(); | ||
232 | - var two_hour = 12*3600*1000; | ||
233 | - var date=new Date().getTime(); | ||
234 | - if(yuTime-date<=two_hour){ | ||
235 | - $('.tan_car').attr("src","/static/image/tan_car2.png"); | ||
236 | - $('.tan_car').css({"width":"4.97rem","height":"2.88rem"}); | 230 | + $('.click_yuyue').click(function () { |
231 | + var id = $(this).attr("data-id"); | ||
232 | + var cancel_fa = $(this).parent().parent(); | ||
233 | + var con_text = $(this).html().trim(); | ||
234 | + if (con_text == "取消预约") { | ||
235 | + var yu_day = $(this).parent().prev().prev().find('i').text(); | ||
236 | + var yu_times = $(this).parent().prev().find('.yu_times').text().split('-')[0]; | ||
237 | + var yuTime = new Date(yu_day + ' ' + yu_times).getTime(); | ||
238 | + var two_hour = 12 * 3600 * 1000; | ||
239 | + var date = new Date().getTime(); | ||
240 | + if (yuTime - date <= two_hour) { | ||
241 | + $('.tan_car').attr("src", "/static/image/tan_car2.png"); | ||
242 | + $('.tan_car').css({"width": "4.97rem", "height": "2.88rem"}); | ||
237 | $('.tan_text').html("抱歉,已过取消预约时间无法取消"); | 243 | $('.tan_text').html("抱歉,已过取消预约时间无法取消"); |
238 | tankuang(); | 244 | tankuang(); |
239 | - $('.btn_qr').click(function() { | 245 | + $('.btn_qr').click(function () { |
240 | $("html").css("overflow", "auto"); | 246 | $("html").css("overflow", "auto"); |
241 | $("body").css("overflow", "auto"); | 247 | $("body").css("overflow", "auto"); |
242 | $(".full_bg").hide(); | 248 | $(".full_bg").hide(); |
243 | $(".yu_tan").hide(); | 249 | $(".yu_tan").hide(); |
244 | }); | 250 | }); |
245 | - }else{ | 251 | + } else { |
246 | tankuang(); | 252 | tankuang(); |
247 | - $('.btn_qr').click(function(){ | ||
248 | - $("html").css("overflow","auto"); | ||
249 | - $("body").css("overflow","auto"); | 253 | + $('.btn_qr').click(function () { |
254 | + $("html").css("overflow", "auto"); | ||
255 | + $("body").css("overflow", "auto"); | ||
250 | $(".full_bg").hide(); | 256 | $(".full_bg").hide(); |
251 | $(".yu_tan").hide(); | 257 | $(".yu_tan").hide(); |
252 | $.ajax({ | 258 | $.ajax({ |
253 | - url:"{:url('redo')}", | ||
254 | - type:"post", | ||
255 | - data:{ | ||
256 | - id:id | ||
257 | - },success:function (res) { | ||
258 | - if(res.code==1){ | 259 | + url: "{:url('redo')}", |
260 | + type: "post", | ||
261 | + data: { | ||
262 | + id: id | ||
263 | + }, success: function (res) { | ||
264 | + if (res.code == 1) { | ||
259 | cancel_fa.remove(); | 265 | cancel_fa.remove(); |
266 | + layer.msg("取消预约成功"); | ||
267 | + setTimeout(function () { | ||
260 | window.history.go(0); | 268 | window.history.go(0); |
269 | + }, 1500); | ||
261 | } | 270 | } |
262 | } | 271 | } |
263 | }) | 272 | }) |
@@ -266,24 +275,25 @@ | @@ -266,24 +275,25 @@ | ||
266 | } | 275 | } |
267 | }); | 276 | }); |
268 | }); | 277 | }); |
269 | - $(function(){ | ||
270 | - function get(url/*后台的地址*/,obj/*后台需要的数据*/){ | ||
271 | - var promise = new Promise(function(resolve, reject){ | 278 | + $(function () { |
279 | + function get(url/*后台的地址*/, obj/*后台需要的数据*/) { | ||
280 | + var promise = new Promise(function (resolve, reject) { | ||
272 | $.ajax({ | 281 | $.ajax({ |
273 | - url:url, | ||
274 | - data:obj, | ||
275 | - success:function(res){ | 282 | + url: url, |
283 | + data: obj, | ||
284 | + success: function (res) { | ||
276 | resolve(res); | 285 | resolve(res); |
277 | }, | 286 | }, |
278 | - failure:function(err){ | 287 | + failure: function (err) { |
279 | reject(err); | 288 | reject(err); |
280 | } | 289 | } |
281 | }) | 290 | }) |
282 | });//等一下发嗯 | 291 | });//等一下发嗯 |
283 | return promise; | 292 | return promise; |
284 | } | 293 | } |
285 | - var $div_li =$(".yuyueMenu ul li"); | ||
286 | - $div_li.click(function(){ | 294 | + |
295 | + var $div_li = $(".yuyueMenu ul li"); | ||
296 | + $div_li.click(function () { | ||
287 | $(this).addClass("yuyue_cur") | 297 | $(this).addClass("yuyue_cur") |
288 | .siblings().removeClass("yuyue_cur"); | 298 | .siblings().removeClass("yuyue_cur"); |
289 | var index = $div_li.index(this); | 299 | var index = $div_li.index(this); |
-
请 注册 或 登录 后发表评论