Browse Source

weidian crm

zz 6 năm trước cách đây
mục cha
commit
a1cab13b06
1 tập tin đã thay đổi với 8 bổ sung2 xóa
  1. 8 2
      app/Http/Controllers/Wap/Web/WelcomeController.php

+ 8 - 2
app/Http/Controllers/Wap/Web/WelcomeController.php

@@ -2078,7 +2078,9 @@ class WelcomeController extends BaseController
             return '';
         }
         //Log::info( '$this->distribution_channel_id is: '.$this->distribution_channel_id );
-        if(!in_array($this->distribution_channel_id,explode(',',$env_config[0]))){
+        $other_crm = Redis::hmget('channel:setting:'.$this->distribution_channel_id,['crm_status','crm_link']);
+        $other_switch = (!empty($other_crm[0]) && !empty($other_crm[1]));
+        if(!in_array($this->distribution_channel_id,explode(',',$env_config[0])) && !$other_switch ){
             return '';
         }
         //\Log::info('distribution_channel_id in');
@@ -2096,7 +2098,11 @@ class WelcomeController extends BaseController
             ->select('id')
             ->first();
         if($charge){
-            return ['title'=>'点击领取200书币>>','link'=>'/guidestrem?uid='.$this->uid];
+            if(!empty($other_crm[1])){
+                return ['title'=>'点击领取200书币>>','link'=>$other_crm[1]];
+            }else{
+                return ['title'=>'点击领取200书币>>','link'=>'/guidestrem?uid='.$this->uid];
+            }
         }
         return  '';
     }