|
@@ -95,12 +95,6 @@ class WelcomeController extends BaseController
|
|
|
$adTargetId = false;
|
|
|
if ($ad_status) {
|
|
|
$adTargetId = $this->cpcAd();
|
|
|
- if($adTargetId && !$is_show_activity){
|
|
|
- $pdd_ad = $this->pddAd();
|
|
|
- $is_show_activity = 1;
|
|
|
- $url = isset($pdd_ad['url'])?$pdd_ad['url']:'';
|
|
|
- $activity_img = isset($pdd_ad['img'])?$pdd_ad['img']:'';
|
|
|
- }
|
|
|
}
|
|
|
//广告frame
|
|
|
$is_show_ad_frame_setting = env('IS_SHOW_AD_FRAME_SETTING', '123');
|
|
@@ -142,7 +136,7 @@ class WelcomeController extends BaseController
|
|
|
$share_switch = ($this->appad())?1:0;
|
|
|
//突出包年的充值页面
|
|
|
$outstanding_year_order = $this->outstandingYearOrder();
|
|
|
-
|
|
|
+ $pdd_ad = $this->pddAd();
|
|
|
$options = json_encode([
|
|
|
'distribution_channel_id' => (int)$this->distribution_channel_id,
|
|
|
'send_order_id' => $send_order_id,
|
|
@@ -181,7 +175,9 @@ class WelcomeController extends BaseController
|
|
|
'appad_url'=>$add_ad_status['appad_url'],
|
|
|
'outstanding_year_order'=>$outstanding_year_order,
|
|
|
'share_domain'=>env('share_domain_url'),
|
|
|
- 'share_switch'=>$share_switch
|
|
|
+ 'share_switch'=>$share_switch,
|
|
|
+ 'pdd_ad'=>$pdd_ad,
|
|
|
+ 'special_pay_template'=>$this->isMiWan() //米玩站点特殊充值页面
|
|
|
]);
|
|
|
if ($this->uid == env('SPECIAL_USER_LOG', 2)) {
|
|
|
myLog('special')->info('welcome --------------------------');
|
|
@@ -529,30 +525,21 @@ class WelcomeController extends BaseController
|
|
|
}
|
|
|
|
|
|
private function pddAd(){
|
|
|
- $links = [
|
|
|
- ['img'=>'https://cdn-novel.iycdm.com/h5/ad/pdd/2019041501.jpg','url'=>'/advertise/pdd?link=2019041501'],
|
|
|
- ['img'=>'https://cdn-novel.iycdm.com/h5/ad/pdd/2019041502.jpg','url'=>'/advertise/pdd?link=2019041502'],
|
|
|
- ['img'=>'https://cdn-novel.iycdm.com/h5/ad/pdd/2019041601.jpg','url'=>'/advertise/pdd?link=2019041601'],
|
|
|
- ['img'=>'https://cdn-novel.iycdm.com/h5/ad/pdd/2019041602.jpg','url'=>'/advertise/pdd?link=2019041602'],
|
|
|
- ['img'=>'https://cdn-novel.iycdm.com/h5/ad/pdd/2019041603.jpg','url'=>'/advertise/pdd?link=2019041603'],
|
|
|
- ['img'=>'https://cdn-novel.iycdm.com/h5/ad/pdd/2019041604.jpg','url'=>'/advertise/pdd?link=2019041604'],
|
|
|
- ['img'=>'https://cdn-novel.iycdm.com/h5/ad/pdd/2019041605.jpg','url'=>'/advertise/pdd?link=2019041605'],
|
|
|
- ['img'=>'https://cdn-novel.iycdm.com/h5/ad/pdd/2019041606.jpg','url'=>'/advertise/pdd?link=2019041606'],
|
|
|
- ['img'=>'https://cdn-novel.iycdm.com/h5/ad/pdd/2019041607.jpg','url'=>'/advertise/pdd?link=2019041607'],
|
|
|
- ['img'=>'https://cdn-novel.iycdm.com/h5/ad/pdd/2019041608.jpg','url'=>'/advertise/pdd?link=2019041608'],
|
|
|
- ['img'=>'https://cdn-novel.iycdm.com/h5/ad/pdd/2019041609.jpg','url'=>'/advertise/pdd?link=2019041609'],
|
|
|
- ['img'=>'https://cdn-novel.iycdm.com/h5/ad/pdd/2019041610.jpg','url'=>'/advertise/pdd?link=2019041610'],
|
|
|
- ['img'=>'https://cdn-novel.iycdm.com/h5/ad/pdd/2019041611.jpg','url'=>'/advertise/pdd?link=2019041611'],
|
|
|
- ['img'=>'https://cdn-novel.iycdm.com/h5/ad/pdd/2019041612.jpg','url'=>'/advertise/pdd?link=2019041612'],
|
|
|
- ['img'=>'https://cdn-novel.iycdm.com/h5/ad/pdd/2019041613.jpg','url'=>'/advertise/pdd?link=2019041613'],
|
|
|
- ['img'=>'https://cdn-novel.iycdm.com/h5/ad/pdd/2019041614.jpg','url'=>'/advertise/pdd?link=2019041614'],
|
|
|
- ['img'=>'https://cdn-novel.iycdm.com/h5/ad/pdd/2019041615.jpg','url'=>'/advertise/pdd?link=2019041615']
|
|
|
- ];
|
|
|
- //$key = random_int(1,17);
|
|
|
- return collect($links)->random(1)->first();
|
|
|
- //return $links[$key];
|
|
|
+ $result = Redis::get('advertise:pdd');
|
|
|
+ if(!$result){
|
|
|
+ return [];
|
|
|
+ }
|
|
|
+ $result = json_decode($result,1);
|
|
|
+ return array_keys($result);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
+ private function isMiWan(){
|
|
|
+ $miwan_channel_ids = redisEnv('MIWAN_CHANNEL_ID');
|
|
|
+ if(!$miwan_channel_ids) return false;
|
|
|
+ return in_array($this->distribution_channel_id,explode(',',$miwan_channel_ids));
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 获取客服图片
|
|
|
*/
|