Bläddra i källkod

Merge branch 'stabble' into phone

zz 6 år sedan
förälder
incheckning
35da1ec634

+ 11 - 0
app/Http/Controllers/Wap/Oauth/UsersV2Controller.php

@@ -11,6 +11,7 @@ use Log;
 use EasyWeChat\Foundation\Application;
 use DB;
 use Hashids;
+use Redis;
 
 class UsersV2Controller extends Controller
 {
@@ -87,6 +88,11 @@ class UsersV2Controller extends Controller
         $url = sprintf('%s://%s%s?%s',$url_info['scheme'],$url_info['host'],$url_info['path'],http_build_query($query));
         Log::info('wcCallbackParse back url is :');
         Log::info($url);
+        if($send_order_id){
+            try{
+                Redis::hset('book_read:' . $user->id, 'send_order_id', $send_order_id);
+            }catch (\Exception $e){}
+        }
         //$previous = url()->previous();
         return redirect()->to($url)->withHeaders(['referer'=>url()->current()]);
     }
@@ -159,6 +165,11 @@ class UsersV2Controller extends Controller
         $url = sprintf('%s://%s%s?%s',$url_info['scheme'],$url_info['host'],$url_info['path'],http_build_query($query));
         Log::info('wcCallbackParse back url is :');
         Log::info($url);
+        if($send_order_id){
+            try{
+                Redis::hset('book_read:' . $user->id, 'send_order_id', $send_order_id);
+            }catch (\Exception $e){}
+        }
         //$previous = url()->previous();
         return redirect()->to($url);
     }

+ 9 - 1
app/Http/Controllers/Wap/Web/WelcomeController.php

@@ -106,6 +106,13 @@ class WelcomeController extends BaseController
         $hide_chapter_channels = explode(',', env('HIDE_CHAPTER_CONSUME_CHANNEL'));
         $is_hide_chapter_consume = in_array($this->distribution_channel_id, $hide_chapter_channels) ? 1 : 0;
         //广告
+        
+        // 屏蔽书名
+        $self_config = ChannelService::check_channel_account_priv($this->distribution_channel_id,'hide_book_name');
+        $hide_book_name = 0;
+        if(!empty($self_config)){
+        	$hide_book_name = 1;
+        }
 
         $options = json_encode([
             'distribution_channel_id' => (int)$this->distribution_channel_id,
@@ -136,7 +143,8 @@ class WelcomeController extends BaseController
             'ad_type' => '1',
             'is_show_ad_frame' => $is_show_ad_frame,
             'show_title_in_reader' => $show_title_in_reader,
-            'is_hide_chapter_consume' => $is_hide_chapter_consume
+            'is_hide_chapter_consume' => $is_hide_chapter_consume,
+        	'hide_book_name' => $hide_book_name
         ]);
         if ($this->uid == env('SPECIAL_USER_LOG', 2)) {
             myLog('special')->info('welcome --------------------------');

+ 5 - 1
app/Http/Middleware/ReadOauth.php

@@ -1041,7 +1041,11 @@ class ReadOauth
         if (!$send_order_info) return;
         if ($send_order_info->book_id && $send_order_info->book_id != $bid) return;
         if ($send_order_info->distribution_channel_id != $distribution_channel_id) return;
-
+        if($uid){
+            try{
+                Redis::hset('book_read:' . $uid, 'send_order_id', $param);
+            }catch (\Exception $e){}
+        }
         is_numeric($bid) && $this->specialChannelIdStats($param, $distribution_channel_id, $uid, $bid);
         $key = date('Y-m-d');
         Cookie::queue('send_order_id', $param, env('U_COOKIE_EXPIRE'), null, null, false, false);

+ 16 - 0
app/Modules/Channel/Services/ChannelService.php

@@ -358,6 +358,22 @@ class ChannelService
     	return self::getDistributionChannelSwitchByCategoryAndCompany($company_id,$category);
     }
     
+    // 判断渠道的某个分类的 按照登录账号的权限
+    static function check_channel_account_priv($distribution_channel_id,$category){
+    	$distribution = self::getDistributionChannel($distribution_channel_id);
+    	$channel_user_id = isset($distribution->channel_user_id)?$distribution->channel_user_id:'';
+    	$channel_user = ChannelUserService::getById($channel_user_id);
+    	$account = isset($channel_user->phone)?$channel_user->phone:'';
+    
+    	\Log::info('check_channel_company_priv:category:'.$category.' distribution_channel_id:'.$distribution_channel_id.' channel_user_id:'.$channel_user_id.' account:'.$account);
+    	return self::getDistributionChannelSwitchByCategoryAndAccount($account,$category);
+    }
+    
+    static function getDistributionChannelSwitchByCategoryAndAccount($account,$category)
+    {
+    	return DistributionSelfDefineConfig::getDistributionChannelSwitchByCategoryAndAccount($account,$category);
+    }
+    
     /**
      * 根据站点属性,转换对应的回复链接
      */

+ 5 - 1
app/Modules/OfficialAccount/Models/DistributionSelfDefineConfig.php

@@ -8,7 +8,7 @@ class DistributionSelfDefineConfig extends Model
 {
     protected $tables = 'distribution_self_define_configs';
 
-    protected $fillable = ['distribution_channel_id','company_id','desc','status','type','created_at','updated_at'];
+    protected $fillable = ['distribution_channel_id','company_id','account','content','desc','status','type','created_at','updated_at'];
 
 
     static function getDistributionSelfDefineConfig($distribution_channel_id,$type)
@@ -20,6 +20,10 @@ class DistributionSelfDefineConfig extends Model
     {
     	return self::where(['company_id'=>$company_id,'type'=>$type,'status'=>1])->first();
     }
+    
+    static function getDistributionChannelSwitchByCategoryAndAccount($account,$type){
+    	return self::where(['account'=>$account,'type'=>$type,'status'=>1])->first();
+    }
     
     static function getDistributionsByType($type)
     {

+ 107 - 106
app/Modules/OfficialAccount/Services/CustomMsgService.php

@@ -228,7 +228,8 @@ class CustomMsgService
             $continueReadUrl = env('PROTOCOL').'://site'.encodeDistributionChannelId($distribution_channel_id).'.'.env('CUSTOM_HOST').'.com/continue?fromtype=not_pay';
 
             //拼接文案和用户最近阅读书籍的链接以及书籍名称
-            $data['content'] = '亲,你上次看的书还在等着你呐~点击继续阅读'."\n".'<a href="'.$continueReadUrl.'"> >《'.$userBook['book_name'].'》</a>'."\n".'首冲50元即可畅读100万字,年费VIP更可全年无限畅读。'."\n".'为方便下次阅读,请'.'<a href="https://help.leyuee.com/top.html">'.'置顶公众号'.'</a>';
+            //$data['content'] = '亲,你上次看的书还在等着你呐~点击继续阅读'."\n".'<a href="'.$continueReadUrl.'"> >《'.$userBook['book_name'].'》</a>'."\n".'首冲50元即可畅读100万字,年费VIP更可全年无限畅读。'."\n".'为方便下次阅读,请'.'<a href="https://help.leyuee.com/top.html">'.'置顶公众号'.'</a>';
+            $data['content'] = '亲,你上次看的书还在等着你呐~'."\n".'<a href="'.$continueReadUrl.'"> >点击继续阅读</a>'."\n".'首冲50元即可畅读100万字,年费VIP更可全年无限畅读。'."\n".'为方便下次阅读,请'.'<a href="https://help.leyuee.com/top.html">'.'置顶公众号'.'</a>';
             $data['type'] = 'one_task';// last_task,one_task
             $data['task_id'] = 1;
             $data['send_time'] = date("Y-m-d H:i:s");
@@ -1791,11 +1792,11 @@ class CustomMsgService
     		$force_users = ForceSubscribeService::forceUserCountByCustomPrams($custom_param['appids'],$custom_param['distribution_channel_id'],$custom_param['subscribe_time'],$custom_param['sex'],$custom_param['balance'],$custom_param['category_id'],$custom_param['order_type'],$custom_param['sign_time'],$custom_param['skip']);
     		$force_users = self::get_unique_users($force_users,'unpaid_send_activity',3600*48);
     	}
-    	// 付费用户推送
-    	elseif($category_type == 'pay_daily_push'){
-    		$custom_param['order_type'] = 'd';//6-13小时充值,考虑到0-6点不推送
-    		$force_users = ForceSubscribeService::forceUserCountByCustomPrams($custom_param['appids'],$custom_param['distribution_channel_id'],$custom_param['subscribe_time'],$custom_param['sex'],$custom_param['balance'],$custom_param['category_id'],$custom_param['order_type'],$custom_param['sign_time'],$custom_param['skip']);
-    		$force_users = self::get_unique_users($force_users,'pay_daily_push',3600*24);
+    	// 付费用户推送
+    	elseif($category_type == 'pay_daily_push'){
+    		$custom_param['order_type'] = 'd';//6-13小时充值,考虑到0-6点不推送
+    		$force_users = ForceSubscribeService::forceUserCountByCustomPrams($custom_param['appids'],$custom_param['distribution_channel_id'],$custom_param['subscribe_time'],$custom_param['sex'],$custom_param['balance'],$custom_param['category_id'],$custom_param['order_type'],$custom_param['sign_time'],$custom_param['skip']);
+    		$force_users = self::get_unique_users($force_users,'pay_daily_push',3600*24);
     	}
     	else{
     		
@@ -1865,20 +1866,20 @@ class CustomMsgService
     			['image'=>'https://zhuishuyun.oss-cn-hangzhou.aliyuncs.com/smart_push/toutiao.jpg']
     			];
     		}
-    		$send_content[] = $first_activity;
-    		
-    	}
-    	// 未付费优惠充值活动推送(多选项)
-    	elseif($category_type == 'unpaid_send_big_activity'){
-    		//活动链接
-    		$continueReadUrl = env('PROTOCOL').'://site'.encodeDistributionChannelId($distribution_channel_id).'.'.env('CUSTOM_HOST').'.com/sale/newUserSale?fromtype=unpaid_send_activity&send_time='.time();
-    		$send_content = '您的新用户专享礼包已送达'."\n\n".'送25000书币及优惠券,畅读全站小说无压力!'."\n\n".'过期失效,只有1次机会哦!'."\n\n".'<a href="'.$continueReadUrl.'">点击立即领取> ></a>'."\n\n".'为方便下次阅读,请'.'<a href="https://help.leyuee.com/top.html">'.'置顶公众号'.'</a>';
-    	}
-    	// 未付费9.9活动推送
-    	elseif($category_type == 'unpaid_send_activity'){
-    		//活动链接
-    		$continueReadUrl = env('PROTOCOL').'://site'.encodeDistributionChannelId($distribution_channel_id).'.'.env('CUSTOM_HOST').'.com/sale/newUserActivity?fromtype=unpaid_send_activity&send_time='.time();
-    		$send_content = '您的新用户专享礼包已送达'."\n\n".'充9.9元,得2000书币,只有一次机会哦!'."\n\n".'过期失效,不要错过!'."\n\n".'<a href="'.$continueReadUrl.'">点击立即领取> ></a>'."\n\n".'为方便下次阅读,请'.'<a href="https://help.leyuee.com/top.html">'.'置顶公众号'.'</a>';
+    		$send_content[] = $first_activity;
+    		
+    	}
+    	// 未付费优惠充值活动推送(多选项)
+    	elseif($category_type == 'unpaid_send_big_activity'){
+    		//活动链接
+    		$continueReadUrl = env('PROTOCOL').'://site'.encodeDistributionChannelId($distribution_channel_id).'.'.env('CUSTOM_HOST').'.com/sale/newUserSale?fromtype=unpaid_send_activity&send_time='.time();
+    		$send_content = '您的新用户专享礼包已送达'."\n\n".'送25000书币及优惠券,畅读全站小说无压力!'."\n\n".'过期失效,只有1次机会哦!'."\n\n".'<a href="'.$continueReadUrl.'">点击立即领取> ></a>'."\n\n".'为方便下次阅读,请'.'<a href="https://help.leyuee.com/top.html">'.'置顶公众号'.'</a>';
+    	}
+    	// 未付费9.9活动推送
+    	elseif($category_type == 'unpaid_send_activity'){
+    		//活动链接
+    		$continueReadUrl = env('PROTOCOL').'://site'.encodeDistributionChannelId($distribution_channel_id).'.'.env('CUSTOM_HOST').'.com/sale/newUserActivity?fromtype=unpaid_send_activity&send_time='.time();
+    		$send_content = '您的新用户专享礼包已送达'."\n\n".'充9.9元,得2000书币,只有一次机会哦!'."\n\n".'过期失效,不要错过!'."\n\n".'<a href="'.$continueReadUrl.'">点击立即领取> ></a>'."\n\n".'为方便下次阅读,请'.'<a href="https://help.leyuee.com/top.html">'.'置顶公众号'.'</a>';
     	}    	
     	// 付费用户推送
     	elseif($category_type == 'pay_daily_push'){
@@ -1886,23 +1887,23 @@ class CustomMsgService
     		$book_name = isset($userBook['book_name'])?$userBook['book_name']:'';
     		$user = UserService::getById($uid);
     		$balance = isset($user->balance)?$user->balance:'0';
-    		$nickname = isset($user->nickname)?$user->nickname:'';
-    		//用户最近阅读链接
+    		$nickname = isset($user->nickname)?$user->nickname:'';
+    		//用户最近阅读链接
     		$continueReadUrl = env('PROTOCOL').'://site'.encodeDistributionChannelId($distribution_channel_id).'.'.env('CUSTOM_HOST').'.com/continue?fromtype=pay_daily_push';
     		//拼接文案
     		if(empty($book_name)){
-    			$send_content = '尊敬的会员:'.$nickname."\n\n".'您的账户余额:'.$balance."\n\n".'<a href="'.$continueReadUrl.'">点击继续阅读~</a>'."\n";
+    			$send_content = '尊敬的会员:'.$nickname."\n\n".'您的账户余额:'.$balance."\n\n".'<a href="'.$continueReadUrl.'">点击继续阅读~</a>'."\n";
     		}else{
-    			$send_content = '尊敬的会员:'.$nickname."\n\n".'您的账户余额:'.$balance."\n\n".'最近阅读书籍:《'.$book_name.'》'."\n\n".'<a href="'.$continueReadUrl.'">点击继续阅读~</a>'."\n";
+    			$send_content = '尊敬的会员:'.$nickname."\n\n".'您的账户余额:'.$balance."\n\n".'最近阅读书籍:《'.$book_name.'》'."\n\n".'<a href="'.$continueReadUrl.'">点击继续阅读~</a>'."\n";
     		}
-    		\Log::info('pay_daily_push_send_content:'.$uid);\Log::info($send_content);
-    		
-    	}
-    	 
-    	// TODO最近阅读?
-    	else{}
-    
-    	return $send_content;
+    		\Log::info('pay_daily_push_send_content:'.$uid);\Log::info($send_content);
+    		
+    	}
+    	 
+    	// TODO最近阅读?
+    	else{}
+    
+    	return $send_content;
     }
     
     /**
@@ -2761,17 +2762,17 @@ class CustomMsgService
      * @param unknown_type $timestamp
      */
     static function upload_material_img($param) {
-    	$params = array("gzh_app_id"=>$param['gzh_app_id'],"img_url"=>$param['img_url'],"group_nick"=>$param['group_nick'],"timestamp"=>$param['timestamp']);
-    	$sign = get_sign($params);
-    	
-    	//获取封面图片media_id
-    	$mediaCustomerJson = self::getUserClient()->request("GET","upload_material_img/",
-    			['query'=>['gzh_app_id'=>$param['gzh_app_id'],'img_url'=>$param['img_url'],'group_nick'=>$param['group_nick'],'timestamp'=>$param['timestamp'],'sign'=>$sign],'connect_timeout' => 3]
-    	)->getBody()->getContents();
-    	
-    	\Log::info("alter_upload_material_img:".$param['gzh_app_id'].' img_url:'.$param['img_url']);
-    	\Log::info($mediaCustomerJson);
-    	
+    	$params = array("gzh_app_id"=>$param['gzh_app_id'],"img_url"=>$param['img_url'],"group_nick"=>$param['group_nick'],"timestamp"=>$param['timestamp']);
+    	$sign = get_sign($params);
+    	
+    	//获取封面图片media_id
+    	$mediaCustomerJson = self::getUserClient()->request("GET","upload_material_img/",
+    			['query'=>['gzh_app_id'=>$param['gzh_app_id'],'img_url'=>$param['img_url'],'group_nick'=>$param['group_nick'],'timestamp'=>$param['timestamp'],'sign'=>$sign],'connect_timeout' => 3]
+    	)->getBody()->getContents();
+    	
+    	\Log::info("alter_upload_material_img:".$param['gzh_app_id'].' img_url:'.$param['img_url']);
+    	\Log::info($mediaCustomerJson);
+    	
     	$mediaCustomerArray = json_decode($mediaCustomerJson,true);
     	return $mediaCustomerArray;
     }
@@ -2781,30 +2782,30 @@ class CustomMsgService
     	\Log::info('last_urls');\Log::info($last_urls);
     	$multy_urls = [];
     	foreach($last_urls as $last_url){
-    		if(strpos($last_url,'mmbiz.qpic.cn') > -1){
-    			\Log::info('wx_url_continue:'.$last_url);
-    			continue;
+    		if(strpos($last_url,'mmbiz.qpic.cn') > -1){
+    			\Log::info('wx_url_continue:'.$last_url);
+    			continue;
     		}
-    		$last_url = str_replace(array("&amp;","&quot;","amp;","quot;"), "", htmlspecialchars($last_url));
-    		$params = array("gzh_app_id"=>$base_param['gzh_app_id'],"img_url"=>$last_url,"group_nick"=>$base_param['group_nick'],"timestamp"=>$base_param['timestamp']);
+    		$last_url = str_replace(array("&amp;","&quot;","amp;","quot;"), "", htmlspecialchars($last_url));
+    		$params = array("gzh_app_id"=>$base_param['gzh_app_id'],"img_url"=>$last_url,"group_nick"=>$base_param['group_nick'],"timestamp"=>$base_param['timestamp']);
     		$sign = get_sign($params);
-    		$params['sign'] = $sign;
+    		$params['sign'] = $sign;
     		$url = env('MEDIA_API_BASE_URI').'upload_material_img?'.http_build_query($params);
     		$multy_url = [];
     		$multy_url['request_url'] = $url;
     		$multy_url['old_url'] = $last_url;
-    		$multy_urls[] = $multy_url;
+    		$multy_urls[] = $multy_url;
     	}
     	
     	// 最多尝试3次
     	$try_time = 0;
     	while($try_time < 3){
     		try{
-    			$url_mappings = self::multiRequest($multy_urls);
-    			\Log::info('$url_mappings');\Log::info($url_mappings);
-    			if(!empty($url_mappings)){
-    				\Log::info('multiRequest_success');
-    				break;
+    			$url_mappings = self::multiRequest($multy_urls);
+    			\Log::info('$url_mappings');\Log::info($url_mappings);
+    			if(!empty($url_mappings)){
+    				\Log::info('multiRequest_success');
+    				break;
     			}
     		}catch(\Exception $e){
     			\Log::info('multiRequest_ept:'.$e->getMessage());
@@ -2818,28 +2819,28 @@ class CustomMsgService
     	
     	foreach($url_mappings as $key=>$url_mapping){
     		\Log::info('replace_old_url:'.$url_mapping['old_url'].' new_url:'.$url_mapping['new_url']);
-    		$content = str_replace($url_mapping['old_url'], $url_mapping['new_url'], $content);
+    		$content = str_replace($url_mapping['old_url'], $url_mapping['new_url'], $content);
     	}
     	return $content;
     }
     
-    static function multiRequest($data){
-    	$client = new Client(
-    			['allow_redirects'=>true,
-    			'timeout'=>120000]);
-    
+    static function multiRequest($data){
+    	$client = new Client(
+    			['allow_redirects'=>true,
+    			'timeout'=>120000]);
+    
     	$promises  = [];
-    	$mappings = [];
-    
+    	$mappings = [];
+    
     	for($i=0;$i<count($data);$i++){
     		\Log::info('async_url:'.$data[$i]['request_url']);
-    		$promises[$i] = $client->getAsync($data[$i]['request_url']);
-    	}
+    		$promises[$i] = $client->getAsync($data[$i]['request_url']);
+    	}
     	$results = Promise\unwrap($promises);
-//     	\Log::info('multy_$results');\Log::info($results);
-    	$j = 0;
-    	foreach($data as $key=>&$v){
-    		$res = $results[$key]->getBody()->getContents();
+//     	\Log::info('multy_$results');\Log::info($results);
+    	$j = 0;
+    	foreach($data as $key=>&$v){
+    		$res = $results[$key]->getBody()->getContents();
     		$res = json_decode($res,true);
     		\Log::info('res:'.$key.' res:'.json_encode($res));
     		$mappings[$key]['old_url'] = $data[$key]['old_url'];
@@ -2849,45 +2850,45 @@ class CustomMsgService
     			\Log::info('multiRequest_error_return:'.$data[$key]['old_url'].' res:'.json_encode($res).' request_url:'.$data[$key]['request_url']);
     			return null;
     		}
-    	}
-    	return $mappings;
+    	}
+    	return $mappings;
     }
     
     // 单个链接上传替换
     static function one_upload_material_imgs($content,$last_urls){
     	\Log::info('one_upload_material_imgs_start');
-    	foreach($last_urls as $key=>$last_url){
-    		\Log::info('last_urls_count:'.count($last_urls).' now:'.$key);
-    		if(strpos($last_url,'mmbiz.qpic.cn') > -1){
-    			\Log::info('wx_url_continue:'.$last_url);
-    			continue;
-    		}
-    		$last_url = str_replace(array("&amp;","&quot;","amp;","quot;"), "", htmlspecialchars($last_url));
-    		 
-    		// TODO 加try 3次?
-    		$i = 0;
-    		while($i < 3){
-    			try{
-    				\Log::info('child_upload_material_img_start:i'.$i.' last_url:'.$last_url);
-    				$param['img_url'] = $last_url;
-    				$upload_res = self::upload_material_img($param);
-    				\Log::info('$upload_res');\Log::info($upload_res);
-    				if($upload_res['code'] == 1){
-    					$content = str_replace($last_url, $upload_res['data']['url'], $content);
-    					break;
-    				}
-    			}catch(\Exception $e){
-    				\Log::info('upload_matrial_img_ept:'.$e->getMessage());
-    				sleep(1);
-    			}
-    			$i++;
-    		}
-    		 
-    		if($i == 3){
-    			\Log::info('upload_matrial_img_return');
-    			return null;
-    		}
-    	
+    	foreach($last_urls as $key=>$last_url){
+    		\Log::info('last_urls_count:'.count($last_urls).' now:'.$key);
+    		if(strpos($last_url,'mmbiz.qpic.cn') > -1){
+    			\Log::info('wx_url_continue:'.$last_url);
+    			continue;
+    		}
+    		$last_url = str_replace(array("&amp;","&quot;","amp;","quot;"), "", htmlspecialchars($last_url));
+    		 
+    		// TODO 加try 3次?
+    		$i = 0;
+    		while($i < 3){
+    			try{
+    				\Log::info('child_upload_material_img_start:i'.$i.' last_url:'.$last_url);
+    				$param['img_url'] = $last_url;
+    				$upload_res = self::upload_material_img($param);
+    				\Log::info('$upload_res');\Log::info($upload_res);
+    				if($upload_res['code'] == 1){
+    					$content = str_replace($last_url, $upload_res['data']['url'], $content);
+    					break;
+    				}
+    			}catch(\Exception $e){
+    				\Log::info('upload_matrial_img_ept:'.$e->getMessage());
+    				sleep(1);
+    			}
+    			$i++;
+    		}
+    		 
+    		if($i == 3){
+    			\Log::info('upload_matrial_img_return');
+    			return null;
+    		}
+    	
     	}
     	
     	return $content;
@@ -2907,14 +2908,14 @@ class CustomMsgService
     	if(isset($ff_urls[0])){
     		unset($ff_urls[0]);
     	}
-    	\Log::info('ff_matchs:');
+    	\Log::info('ff_matchs:');
     	\Log::info($ff_urls);
     	
     	// 背景图模式
     	//background: url(&quot;http://yueduyun.oss-cn-hangzhou.aliyuncs.com/book_chapter_image_test/5pNo6A7wqQmB1WgQygDjkOM9VZn2vXeY/1/1_0.jpg&quot;)
-    	preg_match_all('/background: url\((.*)\)/U',$content,$bg_matchs);
+    	preg_match_all('/background: url\((.*)\)/U',$content,$bg_matchs);
     	$bg_urls = isset($bg_matchs[1])?$bg_matchs[1]:array();
-    	\Log::info('bg_urls:');
+    	\Log::info('bg_urls:');
     	\Log::info($bg_urls);
     	
     	$last_urls = array_merge($ff_urls,$bg_urls);

+ 5 - 1
app/Modules/User/Services/UserSignService.php

@@ -349,11 +349,15 @@ class UserSignService
     }
 
     public static function signCallBackPushActivityInfo($uid,$distribution_channel_id){
+
         $activity_setting = ActivityService::getActivitySetting();
         if(!$activity_setting)
             return false;
         $acyivity_id = isset($activity_setting['activity_id'])?$activity_setting['activity_id']:0;
-
+        $other = env('OTHER_ACTIVITY_ID',0);
+        if($acyivity_id == $other && !in_array($distribution_channel_id,explode(',', env('OTHER_ACTIVITY_CHANNEL', '1')))){
+            return false;
+        }
         if(!$acyivity_id)
             return false;
         $activity_title = isset($activity_setting['sign_call_back_text'])?$activity_setting['sign_call_back_text']:'';;

+ 4 - 4
resources/views/wap/index.blade.php

@@ -9,7 +9,7 @@
     <script>window.VueRouter || document.write('<script src="https://cdn-novel.iycdm.com/static/vue-router.min.js"><\/script>')</script>
     <script>(window.Vue && window.VueLazyload) || document.write('<script src="https://cdn-novel.iycdm.com/static/vue-lazyload.js"><\/script>')</script>
     <title>{{$title}}</title>
-    <link href=https://cdn-novel.iycdm.com/static2019-3-14/css/app.98e72397dd216cfd0dac351872544ff3.css rel=stylesheet>
+    <link href=https://cdn-novel.iycdm.com/static2019-3-21/css/app.8250f18bafb5078b9494a403b90bffa2.css rel=stylesheet>
 </head>
 <body>
 <div id=app></div>
@@ -32,8 +32,8 @@
     })();</script>
 <script id=options>window.options = {!! $options!!};</script>
 <script type=text/javascript
-        src=https://cdn-novel.iycdm.com/static2019-3-14/js/manifest.922b1b041d6a4c6bc7c5.js></script>
-<script type=text/javascript src=https://cdn-novel.iycdm.com/static2019-3-14/js/vendor.ffff3089fc2f18220e2f.js></script>
-<script type=text/javascript src=https://cdn-novel.iycdm.com/static2019-3-14/js/app.5858f87e7fc4af004e72.js></script>
+        src=https://cdn-novel.iycdm.com/static2019-3-21/js/manifest.b98306c96c72f278e590.js></script>
+<script type=text/javascript src=https://cdn-novel.iycdm.com/static2019-3-21/js/vendor.ffff3089fc2f18220e2f.js></script>
+<script type=text/javascript src=https://cdn-novel.iycdm.com/static2019-3-21/js/app.d053fac5c9a0ed181754.js></script>
 </body>
 </html>