作者 sgj
1 个管道 的构建 失败 耗费 7 秒

修改提交 会弹窗

@@ -195,7 +195,7 @@ class BookingController extends AdminBaseController @@ -195,7 +195,7 @@ class BookingController extends AdminBaseController
195 $where['yy.uid'] = array('gt',0); 195 $where['yy.uid'] = array('gt',0);
196 $list = DB::name('yuyue') 196 $list = DB::name('yuyue')
197 ->alias('yy') 197 ->alias('yy')
198 - ->join('qnb_user u','u.id=yy.teach_id') 198 + ->join('qnb_user u','u.id=yy.teach_id','LEFT')
199 ->field('yy.*,u.user_nickname') 199 ->field('yy.*,u.user_nickname')
200 ->where($where) 200 ->where($where)
201 ->order('id','desc') 201 ->order('id','desc')
@@ -189,11 +189,12 @@ class CommentController extends UserBaseController @@ -189,11 +189,12 @@ class CommentController extends UserBaseController
189 $yuyue_data = Db::name('yuyue') 189 $yuyue_data = Db::name('yuyue')
190 ->alias('yy') 190 ->alias('yy')
191 ->join('qnb_user qu','qu.id = yy .uid') 191 ->join('qnb_user qu','qu.id = yy .uid')
192 - ->join('order o','o.uid=yy.uid')  
193 - ->join('goods g','g.id=o.gid') 192 + ->join('order o','o.uid=yy.uid','LEFT')
  193 + ->join('goods g','g.id=o.gid','LEFT')
194 ->field('yy.*,qu.user_nickname,qu.mobile,qu.headimgurl,g.name as gname') 194 ->field('yy.*,qu.user_nickname,qu.mobile,qu.headimgurl,g.name as gname')
195 ->where(['yy.id'=>$id]) 195 ->where(['yy.id'=>$id])
196 ->find(); 196 ->find();
  197 + //dump($yuyue_data);
197 198
198 $cdata = Db::name('commente1') 199 $cdata = Db::name('commente1')
199 ->alias('yy') 200 ->alias('yy')
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 <div class="orderList"> 16 <div class="orderList">
17 <h1> 17 <h1>
18 <b>{$yuyue.status|yuyue_status_name}</b> 18 <b>{$yuyue.status|yuyue_status_name}</b>
19 - <i>{$yuyue.yuyue_day1}</i> 19 + <!-- <i>{$yuyue.yuyue_day1}</i>-->
20 </h1> 20 </h1>
21 <div class="yList_info"> 21 <div class="yList_info">
22 <img src="{$yuyue.headimgurl}" class="yu_user_head"/> 22 <img src="{$yuyue.headimgurl}" class="yu_user_head"/>
@@ -26,14 +26,13 @@ @@ -26,14 +26,13 @@
26 </div> 26 </div>
27 <div class="yu_date"> 27 <div class="yu_date">
28 <b class="yu_week">{$yuyue.yuyue_week}</b> 28 <b class="yu_week">{$yuyue.yuyue_week}</b>
29 - <i class="yu_times">{$yuyue.yuyue_hour1}</i> 29 + <!-- <i class="yu_times">{$yuyue.yuyue_hour1}</i>-->
30 </div> 30 </div>
31 </div> 31 </div>
  32 + <a href="tel:{$yuyue.mobile}">
32 <div class="order_details"> 33 <div class="order_details">
33 - <a href="tel:/{$yuyue.mobile}">  
34 <img src="/static/image/tell_stu.png"> 34 <img src="/static/image/tell_stu.png">
35 - </a>  
36 - </div> 35 + </div> </a>
37 </div> 36 </div>
38 </div> 37 </div>
39 <div class="ping_show study_detail"> 38 <div class="ping_show study_detail">
@@ -41,8 +40,6 @@ @@ -41,8 +40,6 @@
41 <img src="/static/image/ping_icon.png"/> 40 <img src="/static/image/ping_icon.png"/>
42 <b>学车情况</b> 41 <b>学车情况</b>
43 </div> 42 </div>
44 -  
45 -  
46 <empty name="cdata"> 43 <empty name="cdata">
47 <div class="no_yuyue"> 44 <div class="no_yuyue">
48 暂无评价 45 暂无评价
@@ -62,23 +62,37 @@ @@ -62,23 +62,37 @@
62 <i class="yu_times">{$vo.yuyue_begin}:00 - {$vo.yuyue_end}:00</i> 62 <i class="yu_times">{$vo.yuyue_begin}:00 - {$vo.yuyue_end}:00</i>
63 </div> 63 </div>
64 </div> 64 </div>
  65 +
  66 +
65 <switch name="$vo.status"> 67 <switch name="$vo.status">
  68 +
66 <case value="0"> 69 <case value="0">
67 <div class="yuyue_btn"> 70 <div class="yuyue_btn">
68 <b class="click_yuyue" data-id="{$vo.id}">取消预约</b> 71 <b class="click_yuyue" data-id="{$vo.id}">取消预约</b>
69 </div> 72 </div>
70 </case> 73 </case>
  74 +
  75 +
71 <case value="1"> 76 <case value="1">
72 - <div class="yuyue_btn">  
73 - <b class="click_yuyue" data-id="{$vo.id}">取消预约</b>  
74 - </div> 77 + <php>
  78 + $yuyue=strtotime($vo['yuyue_day']);
  79 + $now=time();
  80 + </php>
  81 + <if condition="$now lt $yuyue">
  82 + <div class="yuyue_btn">
  83 + <b class="click_yuyue" data-id="{$vo.id}">取消预约</b>
  84 + </div>
  85 + </if>
  86 +
75 </case> 87 </case>
  88 +
76 <case value="2"> 89 <case value="2">
77 <div class="yuyue_btn" onclick=location.href="{:url('user/comment/index',array('id'=> 90 <div class="yuyue_btn" onclick=location.href="{:url('user/comment/index',array('id'=>
78 $vo['teach_id'],'yuyue_id'=>$vo['id']))}"> 91 $vo['teach_id'],'yuyue_id'=>$vo['id']))}">
79 <b class="click_yuyue">去评价</b> 92 <b class="click_yuyue">去评价</b>
80 </div> 93 </div>
81 </case> 94 </case>
  95 +
82 <case value="3"> 96 <case value="3">
83 <div class="yuyue_btn" 97 <div class="yuyue_btn"
84 onclick=location.href="{:url('user/comment/show_stu',array('yuyue_id'=> 98 onclick=location.href="{:url('user/comment/show_stu',array('yuyue_id'=>
@@ -2087,6 +2087,7 @@ function birthday_old($id){ @@ -2087,6 +2087,7 @@ function birthday_old($id){
2087 return $now - $bir; 2087 return $now - $bir;
2088 } 2088 }
2089 function id_xueshi($id){ 2089 function id_xueshi($id){
  2090 +
2090 $name = Db::name('yuyue') 2091 $name = Db::name('yuyue')
2091 ->where(['uid'=>$id,'status'=>'3']) 2092 ->where(['uid'=>$id,'status'=>'3'])
2092 ->field(' SUM(yuyue_end - yuyue_begin) as yyxs ') 2093 ->field(' SUM(yuyue_end - yuyue_begin) as yyxs ')