Selaa lähdekoodia

Merge branch 'stabble' into yunqi

zz 6 vuotta sitten
vanhempi
commit
f2296455d7
1 muutettua tiedostoa jossa 14 lisäystä ja 8 poistoa
  1. 14 8
      app/Http/Controllers/Wap/Order/OrdersController.php

+ 14 - 8
app/Http/Controllers/Wap/Order/OrdersController.php

@@ -191,17 +191,23 @@ class OrdersController extends BaseController
         //}
         \Log::info('order:$template_id:' . $template_id);
         \Log::info('order:$distribution_channel_id:' . ($this->distribution_channel_id));
+
         if ($template_id == 2) { //模板2只有在长篇小说过来的用户才显示
-            if ($bid) {
-                $bid = Hashids::decode($bid)[0];
-                \Log::info('order:$bid:' . $bid);
-                $book = BookService::getBookById($bid);
-                \Log::info('order:$$book:' . json_encode($book));
-                if ($book->size < 200000) {
+            //部分渠道需要2元模板不管哪个入口进来都展示
+            $exclude_channels = explode(',', env('PRICE_TWO_SHOW_ALL_CHANNEL'));
+            if(!in_array($this->distribution_channel_id,$exclude_channels))
+            {
+                if ($bid) {
+                    $bid = Hashids::decode($bid)[0];
+                    \Log::info('order:$bid:' . $bid);
+                    $book = BookService::getBookById($bid);
+                    \Log::info('order:$$book:' . json_encode($book));
+                    if ($book->size < 200000) {
+                        $template_id = 1;
+                    }
+                } else {
                     $template_id = 1;
                 }
-            } else {
-                $template_id = 1;
             }
         }
         if($temp){