linwu 6 dni temu
rodzic
commit
0517d4c184

+ 1 - 1
app/admin/view/seat/seat_form.html

@@ -93,7 +93,7 @@
                     layer.msg("提交成功", {
                         icon: 1
                     });
-                    parent.layui.table.reload('lay-vote-index-table'); //重载表格
+                    parent.layui.table.reload('lay-seat-index-table'); //重载表格
                     parent.layer.close(index);
                 }
             });

+ 1 - 1
app/mobile/common.php

@@ -74,4 +74,4 @@ function tip($title = '', $msg = '')
 
     $html = view('/public/tip', $result);
     throw new \think\exception\HttpResponseException($html);
-}
+}

+ 8 - 7
app/mobile/controller/Seat.php

@@ -15,7 +15,7 @@ class Seat extends MobileBaseController
         if (empty($id)) {
             $id = session('mobile.seat.id');
             if (empty($id)) {
-                jump('该活动不存在或已结束');
+                tip('提示','该活动不存在或已结束');
             }
         } else {
             session('mobile.seat.id', $id);
@@ -23,7 +23,7 @@ class Seat extends MobileBaseController
 
         $seat = SeatModel::where('id', $id)->find();
         if (empty($seat)) {
-            jump('该活动不存在或已结束');
+            tip('提示','该活动不存在或已结束');
         }
 
         session('mobile.seat.id', $id);
@@ -32,12 +32,13 @@ class Seat extends MobileBaseController
         $apply = SeatApplyModel::where('open_id', $open_id)->where('seat_id', $id)->find();
         if (empty($apply)) {
             if ($seat['apply'] >= $seat['total']) {
-                jump('提示', '座位已被选完');
+                tip('提示', '座位已满');
             } else {
                 return redirect(url('seat/fillInfo'));
             }
         } else {
-            tip('选座成功', $apply['seat']);
+            tip('提示', '座位已满');
+            return redirect(url('seat/showSeat'));
         }
     }
 
@@ -45,7 +46,7 @@ class Seat extends MobileBaseController
     {
         $id = session('mobile.seat.id');
         if (empty($id)) {
-            jump('该活动不存在或已结束');
+            tip('提示','该活动不存在或已结束');
         }
 
         get_open_id();
@@ -105,7 +106,7 @@ class Seat extends MobileBaseController
         } catch (\Exception $e) {
             // 回滚事务
             Db::rollback();
-            ajax_error('座位已被选完');
+            ajax_error('座位已');
         }
 
         ajax_success();
@@ -118,7 +119,7 @@ class Seat extends MobileBaseController
 
         $seat = SeatApplyModel::where('seat_id', $id)->where('open_id',$open_id)->find();
 
-        tip('座位信息',$seat['seat']);
+        return view('',['msg'=>$seat['seat']]);
     }
 
     public function login()

+ 3 - 3
app/mobile/view/public/tip.html

@@ -8,9 +8,9 @@
 
     .msg{
         text-align:center;
-        margin:0;
+        margin-top:20px;
         padding:0;
-        font-size:24px;
+        font-size:34px;
     }
 </style>
 {/block}
@@ -26,7 +26,7 @@
 </van-nav-bar>
 <div style="width:100%;height:46px;"></div>
 <div class="icon">
-    <van-icon name="warning-o" size="160" color="#0081ff"></van-icon>
+    <van-icon name="warning-o" size="160" color="#e54d42"></van-icon>
 </div>
 <h3 class="msg">{$msg}</h3>
 {/block}

+ 41 - 0
app/mobile/view/seat/show_seat.html

@@ -0,0 +1,41 @@
+{extend name="public/base"/}
+{block name="css"}
+<style>
+    .icon{
+        text-align:center;
+        margin-top:50px;
+    }
+
+    .msg{
+        text-align:center;
+        margin:0 auto;
+        padding:10px;
+        border:1px solid #999;
+        width: 80%;
+        font-size:34px;
+        border-radius: 10px;
+    }
+</style>
+{/block}
+{block name="body"}
+<van-nav-bar
+        class="nav-theme"
+        :fixed="true"
+        :placeholder="true"
+>
+    <template #title>
+        <span class="text-white">选座成功</span>
+    </template>
+</van-nav-bar>
+<div style="width:100%;height:46px;"></div>
+<h3 class="msg">{$msg}</h3>
+{/block}
+{block name="script"}
+<script>
+    function v_setup() {
+        let base = {};
+
+        return base;
+    }
+</script>
+{/block}