|
@@ -42,6 +42,8 @@ class WelcomeController extends BaseController
|
|
|
private $force_subscribe_info = null;
|
|
|
|
|
|
private $property = '';
|
|
|
+
|
|
|
+ private $user = null;
|
|
|
/**
|
|
|
* 首页
|
|
|
*/
|
|
@@ -64,6 +66,7 @@ class WelcomeController extends BaseController
|
|
|
$bottom_show_type = $activity_options['bottom_show_type'];
|
|
|
$activity_img = $activity_options['activity_img'];
|
|
|
$user = $activity_options['user'];
|
|
|
+ $this->user = $user;
|
|
|
$hidden_reader_menus = false;
|
|
|
$send_order_id = $this->send_order_id;
|
|
|
//隐藏阅读页面菜单
|
|
@@ -103,6 +106,7 @@ class WelcomeController extends BaseController
|
|
|
}
|
|
|
//设置用户是否充值
|
|
|
$this->setIsPaid();
|
|
|
+ $this->setProperty($user->openid);
|
|
|
$channel_activities_flag = $this->judgeChannelActivity($user);
|
|
|
//最近阅读页面 推荐
|
|
|
if(isset($user->sex)){
|
|
@@ -330,9 +334,9 @@ class WelcomeController extends BaseController
|
|
|
//if( in_array($this->distribution_channel_id,explode(',',env('OUTSTANDING_YEAR_ORDER_SITE'))) ){
|
|
|
//if($this->uid%2 == 0){
|
|
|
//$userDivisionProperty = UserDivisionPropertyService::getUserProperty($this->uid);
|
|
|
- $userDivisionProperty = UserDivisionCpcPropertyService::getUserProperty($this->uid);
|
|
|
+ //$userDivisionProperty = UserDivisionCpcPropertyService::getUserProperty($this->uid);
|
|
|
|
|
|
- $userDivisionProperty && $userDivisionProperty == 'high' && $outstanding_year_order = true;
|
|
|
+ $this->property == 'high' && $outstanding_year_order = true;
|
|
|
//}
|
|
|
//}
|
|
|
return $outstanding_year_order;
|
|
@@ -599,12 +603,12 @@ class WelcomeController extends BaseController
|
|
|
if(is_null($cpc_status) || $cpc_status == 1){
|
|
|
$cookie_ad_status = Cookie::get('cpc_ad_status');
|
|
|
if($cookie_ad_status) return $cookie_ad_status == 'show';
|
|
|
- $property = UserDivisionCpcPropertyService::userLevel($openid);
|
|
|
+ //$property = UserDivisionCpcPropertyService::userLevel($openid);
|
|
|
/*if(UserService::isCpcUser($this->uid)){
|
|
|
Cookie::queue('cpc_ad_status', 'show');
|
|
|
return true;
|
|
|
}*/
|
|
|
- if($property && $property->property == 'none'){
|
|
|
+ if($this->property == 'none'){
|
|
|
Cookie::queue('cpc_ad_status', 'show');
|
|
|
return true;
|
|
|
}
|
|
@@ -2108,8 +2112,16 @@ class WelcomeController extends BaseController
|
|
|
}
|
|
|
|
|
|
|
|
|
- private function userPproperty($openid){
|
|
|
- $old = UserDivisionCpcPropertyService::userLevel($openid);
|
|
|
+ private function userPproperty(){
|
|
|
+ if($this->property == 'undefined'){
|
|
|
+ if($this->user && time()-strtotime($this->user->created_at) >= 3*66400){
|
|
|
+ $info = UserDivisionCpcPropertyService::calculateUserPropertyV2($this->uid);
|
|
|
+ if($info && $info['property'] != 'undefined'){
|
|
|
+ UserDivisionCpcPropertyService::updateV2($info['openid'],$info['property']);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /*$old = UserDivisionCpcPropertyService::userLevel($openid);
|
|
|
if(!$old) return ;
|
|
|
$this->property = $old->property;
|
|
|
if($old->type != 'NEW') return ;
|
|
@@ -2124,7 +2136,7 @@ class WelcomeController extends BaseController
|
|
|
dispatch($job);
|
|
|
} catch (\Exception $e) {
|
|
|
\Log::info($e);
|
|
|
- }
|
|
|
+ }*/
|
|
|
}
|
|
|
|
|
|
private function guidePersonalAccount($openid){
|
|
@@ -2214,6 +2226,11 @@ class WelcomeController extends BaseController
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private function setProperty($openid){
|
|
|
+ $property = UserDivisionCpcPropertyService::userLevelV2($openid);
|
|
|
+ $this->property = $property;
|
|
|
+ }
|
|
|
+
|
|
|
//统计ua
|
|
|
private function recordUA($ua)
|
|
|
{
|