|
@@ -107,6 +107,9 @@ class ReadOauth
|
|
|
Redis::hset('book_read:' . $uid_cookie, 'send_order_id', $uri_send_order_id);
|
|
|
}
|
|
|
|
|
|
+ //个性化推送
|
|
|
+ $this->stylePush($request,$uid_cookie,$distribution_channel_id);
|
|
|
+
|
|
|
//禁止明文访问
|
|
|
if ($this->isForbidPrimaryNumberChannleID($origin_distribution_channel_id, $uid_cookie)) {
|
|
|
return response('<html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><title>该网站地址暂停访问</title></head><body style="padding:0;margin:0;font-size:0"><div style="width:300px;height:100px;margin: 20px auto"><p style="font-size:20px;color:red;text-align:center">该网站地址暂停访问,请联系客服微信获取新地址:wuxinchao12</p></body></html>');
|
|
@@ -762,6 +765,21 @@ class ReadOauth
|
|
|
return $redirect;
|
|
|
}
|
|
|
|
|
|
+ //个性化推送
|
|
|
+ private function stylePush(Request $request,$uid,$distribution_channel_id){
|
|
|
+ $gxhp = $request->get('gxhp');
|
|
|
+ if(!$gxhp || !$uid || !$distribution_channel_id) return ;
|
|
|
+
|
|
|
+ $date = date('Y-m-d');
|
|
|
+ $uv_key = sprintf('push:stylepush:uv:%s:gxhp:%s:date:%s',$distribution_channel_id,$gxhp,$date);
|
|
|
+ $pv_key = sprintf('push:stylepush:pv:%s:gxhp:%s:date:%s',$distribution_channel_id,$gxhp,$date);
|
|
|
+ try{
|
|
|
+ Redis::hset('book_read:' . $uid, 'gxhp', $gxhp);
|
|
|
+ Redis::sadd($uv_key, $uid);
|
|
|
+ Redis::incr($pv_key);
|
|
|
+ Redis::sadd(sprintf('push:stylepush:date:%s',$date),sprintf('%s_%s',$distribution_channel_id,$gxhp));
|
|
|
+ }catch (\Exception $e){}
|
|
|
+ }
|
|
|
private function yqTest(Request $request, $uid,$channel_id)
|
|
|
{
|
|
|
if (!$request->has('fromtype')) return '';
|