Browse Source

hua wei activity

zz 6 years ago
parent
commit
0efeb9a183

+ 3 - 1
app/Http/Controllers/Wap/Web/ActivityController.php

@@ -190,6 +190,8 @@ class ActivityController extends BaseController
     public function huaweiLotteryView()
     public function huaweiLotteryView()
     {
     {
         $count_info = DB::table('huaweilottery_user_counts')->where('uid', $this->uid)->select('count')->first();
         $count_info = DB::table('huaweilottery_user_counts')->where('uid', $this->uid)->select('count')->first();
+        $total = DB::table('huaweilottery_record')->sum('price');
+        $left_total = 5000000-($total?$total:0);
         $count = 0;
         $count = 0;
         if($count_info && $count_info->count){
         if($count_info && $count_info->count){
             $count = $count_info->count;
             $count = $count_info->count;
@@ -208,7 +210,7 @@ class ActivityController extends BaseController
             ->where('price','>',0)
             ->where('price','>',0)
             ->select('created_at','price')
             ->select('created_at','price')
             ->get();
             ->get();
-        return view('pay.activity.huaweiLottery', ['count' => $count, 'time_diff' => $diff,'list'=>$list]);
+        return view('pay.activity.huaweiLottery', ['count' => $count, 'time_diff' => $diff,'list'=>$list,'total'=>$total]);
     }
     }
 
 
     public function huaweiLottery()
     public function huaweiLottery()

+ 1 - 1
resources/views/pay/activity/huaweiLottery.blade.php

@@ -396,7 +396,7 @@
         </div>
         </div>
         <div class="remaining">
         <div class="remaining">
             <div class="rmb">¥</div>
             <div class="rmb">¥</div>
-            <div class="remaining-rmb">奖金池剩余:26235623书币</div>
+            <div class="remaining-rmb">奖金池剩余:{{$total}}书币</div>
         </div>
         </div>
         <div class="rule">
         <div class="rule">
             <div class="rule_title">
             <div class="rule_title">