|
@@ -66,6 +66,7 @@ class CoflController extends Controller
|
|
|
if(isset($params['unionid'])) unset($params['unionid']);
|
|
|
$url = $this->getLink($user[1]).'reader?'.http_build_query($params);
|
|
|
$this->stats('book',$crm);
|
|
|
+ $this->statsDetail($user[0],'book',$bid);
|
|
|
return redirect()->to($url);
|
|
|
}
|
|
|
|
|
@@ -92,9 +93,9 @@ class CoflController extends Controller
|
|
|
$this->stats('reward_200',$crm);
|
|
|
$fee = $this->freeCurrencyFee($token,$rfee);
|
|
|
}
|
|
|
-
|
|
|
$user = $this->getUsers($openid);
|
|
|
if(!$user || !$user[0] || !$user[1]) return redirect()->to($this->getLink().'?'.http_build_query($params));
|
|
|
+ $this->statsDetail($user[0],'reward',0);
|
|
|
$get_free_currency = UserBindHkWelfareService::isHasGet($user[0]);
|
|
|
if($get_free_currency){
|
|
|
//已经领过
|
|
@@ -201,6 +202,7 @@ class CoflController extends Controller
|
|
|
}
|
|
|
$crm = $request->get('crm');
|
|
|
$this->stats('recent',$crm);
|
|
|
+ $this->statsDetail($user[0],'recent',0);
|
|
|
$link = $this->getLink($distribution_channel_id).'recent?'.http_build_query($params);
|
|
|
return redirect()->to($link);
|
|
|
}
|
|
@@ -223,6 +225,7 @@ class CoflController extends Controller
|
|
|
}
|
|
|
$crm = $request->get('crm');
|
|
|
$this->stats('person',$crm);
|
|
|
+ $this->statsDetail($user[0],'person',0);
|
|
|
$link = $this->getLink($distribution_channel_id).'person?'.http_build_query($params);
|
|
|
return redirect()->to($link);
|
|
|
}
|
|
@@ -245,6 +248,7 @@ class CoflController extends Controller
|
|
|
}
|
|
|
$crm = $request->get('crm');
|
|
|
$this->stats('sign',$crm);
|
|
|
+ $this->statsDetail($user[0],'sign',0);
|
|
|
$link = $this->getLink($distribution_channel_id).'sign?'.http_build_query($params);
|
|
|
return redirect()->to($link);
|
|
|
}
|
|
@@ -322,6 +326,19 @@ class CoflController extends Controller
|
|
|
Cookie::queue('crm_flag', $flag, env('U_COOKIE_EXPIRE'), null, null, false, false);
|
|
|
}
|
|
|
|
|
|
+ private function statsDetail($uid,$page,$bid=0)
|
|
|
+ {
|
|
|
+ try{
|
|
|
+ DB::table('crm_visit_detail')->insert([
|
|
|
+ 'uid'=>$uid,'page'=>$page,
|
|
|
+ 'bid'=>$bid,'day'=>date('Y-m-d'),
|
|
|
+ 'created_at'=>date('Y-m-d H:i:s'),
|
|
|
+ 'updated_at'=>date('Y-m-d H:i:s')
|
|
|
+ ]);
|
|
|
+ }catch (\Exception $e){}
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
public function longActivity(Request $request)
|
|
|
{
|
|
@@ -417,6 +434,7 @@ class CoflController extends Controller
|
|
|
$page = 'jump.guidePersonalAccountOurs';
|
|
|
}*/
|
|
|
$page = 'jump.guidePersonalAccountOurs';
|
|
|
+ //$page = 'jump.guidePersonalAccount';
|
|
|
//$img = collect($imgs)->random();
|
|
|
return view($page,['img'=>$img]);
|
|
|
}
|