Browse Source

add:打不开快应用显示公众号;

Wang Chen 4 years ago
parent
commit
afb8bf193c

+ 8 - 1
app/Http/Controllers/QuickApp/WelcomeController.php

@@ -27,13 +27,20 @@ class WelcomeController extends BaseController
             $send_order              = SendOrderService::getSendOrderStatic($this->send_order_id);
             $send_order              = SendOrderService::getSendOrderStatic($this->send_order_id);
             $distribution_channel_id = $send_order->distribution_channel_id;
             $distribution_channel_id = $send_order->distribution_channel_id;
             $qappPackage             = QappPackageService::getPackage($distribution_channel_id);
             $qappPackage             = QappPackageService::getPackage($distribution_channel_id);
+
+            $showGzh     = 0;
+            $sendOrderId = $this->send_order_id;
+            if ($sendOrderId && in_array($sendOrderId, explode(',', env('SHOW_GZH_SEND_ORDER_IDS')))) {
+                $showGzh = 1;
+            }
             if ($send_order && $qappPackage) {
             if ($send_order && $qappPackage) {
                 $this->sendOrderStatistic($send_order);//统计
                 $this->sendOrderStatistic($send_order);//统计
                 return view('qapp.welcome')->with([
                 return view('qapp.welcome')->with([
                     'package'       => $qappPackage->package,
                     'package'       => $qappPackage->package,
                     'hash_bid'      => Hashids::encode($send_order->book_id),
                     'hash_bid'      => Hashids::encode($send_order->book_id),
                     'cid'           => $send_order->chapter_id,
                     'cid'           => $send_order->chapter_id,
-                    'send_order_id' => $this->send_order_id
+                    'send_order_id' => $this->send_order_id,
+                    'show_gzh'      => $showGzh
                 ]);
                 ]);
             }
             }
         }
         }

+ 2 - 0
resources/views/qapp/welcome.blade.php

@@ -265,6 +265,8 @@
     bid: "{{$hash_bid}}", //书籍id
     bid: "{{$hash_bid}}", //书籍id
     cid: "{{$cid}}", //章节id
     cid: "{{$cid}}", //章节id
     send_order_id: "{{$send_order_id}}",//派单ID
     send_order_id: "{{$send_order_id}}",//派单ID
+
+  : "{{$show_gzh}}",//打不开快应用,可以展示公众号
   };
   };
   //判断机型是否支持快应用
   //判断机型是否支持快应用
   try {
   try {