瀏覽代碼

weidian crm

zz 6 年之前
父節點
當前提交
a1cab13b06
共有 1 個文件被更改,包括 8 次插入2 次删除
  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  '';
     }