wangzq пре 2 година
родитељ
комит
0bf92c0fb9
1 измењених фајлова са 4 додато и 4 уклоњено
  1. 4 4
      app/Http/Controllers/QuickApp/User/ReadRecordController.php

+ 4 - 4
app/Http/Controllers/QuickApp/User/ReadRecordController.php

@@ -74,7 +74,7 @@ class ReadRecordController extends BaseController
 
 
         if ($res) {
         if ($res) {
             $bids = array_column($res,'bid');
             $bids = array_column($res,'bid');
-            $channel_id = ($package === 'com.beidao.kuaiying.zsy') ? 7477 : 0;
+            $channel_id = $request->input('distribution_channel_id',0);
             $book = BookConfigService::getBooksByIds($bids, [], false);//下架图书最近阅读可看到
             $book = BookConfigService::getBooksByIds($bids, [], false);//下架图书最近阅读可看到
             foreach ($res as $key => &$value) {
             foreach ($res as $key => &$value) {
                 $value['cover']        = '';
                 $value['cover']        = '';
@@ -92,7 +92,7 @@ class ReadRecordController extends BaseController
                         $value['status'] = $val->status;
                         $value['status'] = $val->status;
                         $value['size'] = $val->size;
                         $value['size'] = $val->size;
                         $value['author'] = $val->author;
                         $value['author'] = $val->author;
-                        if($channel_id === 7477){
+                        if(is_public_package_channel_id($channel_id)){
                             $hidden = getHiddenCp();
                             $hidden = getHiddenCp();
                         }else{
                         }else{
                             $hidden = array_merge(getHiddenCp(),['lianshang']);
                             $hidden = array_merge(getHiddenCp(),['lianshang']);
@@ -143,7 +143,7 @@ class ReadRecordController extends BaseController
 
 
         if ($res) {
         if ($res) {
             $bids = array_column($res,'bid');
             $bids = array_column($res,'bid');
-            $channel_id = ($package === 'com.beidao.kuaiying.zsy') ? 7477 : 0;
+            $channel_id = $request->input('distribution_channel_id',0);
             $book = BookConfigService::getBooksByIds($bids, [], false);//下架图书最近阅读可看到
             $book = BookConfigService::getBooksByIds($bids, [], false);//下架图书最近阅读可看到
             $book = array_column(($book->toArray()),null,'bid');
             $book = array_column(($book->toArray()),null,'bid');
             foreach ($res as  &$value) {
             foreach ($res as  &$value) {
@@ -162,7 +162,7 @@ class ReadRecordController extends BaseController
                     $value['status'] =  $info['status'];
                     $value['status'] =  $info['status'];
                     $value['size'] =  $info['size'];
                     $value['size'] =  $info['size'];
                     $value['author'] =  $info['author'];
                     $value['author'] =  $info['author'];
-                    if($channel_id === 7477){
+                    if(is_public_package_channel_id($channel_id)){
                         $hidden = getHiddenCp();
                         $hidden = getHiddenCp();
                     }else{
                     }else{
                         $hidden = array_merge(getHiddenCp(),['lianshang']);
                         $hidden = array_merge(getHiddenCp(),['lianshang']);