<?php
/*
 本代码由 口号帮 创建
 创建时间 2019-05-08 16:22:09
 技术支持 口号帮 
 严禁反编译、逆向等任何形式的侵权行为，违者将追究法律责任
*/

namespace App\Traits;use App\Models\BehaviorLog;use App\Models\Channel;use App\Models\DistributePage;trait LoginBehavior{public function loginBehavior($request,$member){$P2g0=new BehaviorLog();$behavior_log=$P2g0;$register_channel=Channel::where('channel_code',$member->channel_code)->first();if($register_channel)goto P2gBodyx2;goto P2gNextx2;P2gBodyx2:$register_channel_id=$register_channel->id;$register_channel_name=$register_channel->channel_name;goto P2gx1;P2gNextx2:$register_channel_id=0;$register_channel_name='';P2gx1:$register_page=DistributePage::where('id',$member->page_id)->first();if($register_page)goto P2gBodyx4;goto P2gNextx4;P2gBodyx4:$register_page_name=$register_page->name;goto P2gx3;P2gNextx4:$register_page_name='';P2gx3:$operate_channel=Channel::where('channel_code',$request->channel)->first();if($operate_channel)goto P2gBodyx6;goto P2gNextx6;P2gBodyx6:$operate_channel_id=$operate_channel->id;$operate_channel_name=$operate_channel->channel_name;goto P2gx5;P2gNextx6:$operate_channel_id=0;$operate_channel_name='';P2gx5:$operate_page=DistributePage::where('id',$request->page_id)->first();if($operate_page)goto P2gBodyx8;goto P2gNextx8;P2gBodyx8:$operate_page_name=$operate_page->name;goto P2gx7;P2gNextx8:$operate_page_name='';P2gx7:$P2g0=$request->path()=='api/v1/register/aes';if($P2g0)goto P2gBodyxa;goto P2gNextxa;P2gBodyxa:$operate_type=1;goto P2gx9;P2gNextxa:$P2g0=$request->path()=='api/v1/login/aes';$P2g2=(bool)$P2g0;$P2g3=!$P2g2;if($P2g3)goto P2gBodyxc;goto P2gNextxc;P2gBodyxc:$P2g1=$request->path()=='api/v1/verify/login/aes';$P2g2=(bool)$P2g1;goto P2gxb;P2gNextxc:P2gxb:if($P2g2)goto P2gBodyxd;goto P2gNextxd;P2gBodyxd:$operate_type=2;goto P2gx9;P2gNextxd:$P2g0=$request->path()=='api/v1/register';if($P2g0)goto P2gBodyxe;goto P2gNextxe;P2gBodyxe:$operate_type=11;goto P2gx9;P2gNextxe:$P2g0=$request->path()=='api/v1/login';$P2g2=(bool)$P2g0;$P2g3=!$P2g2;if($P2g3)goto P2gBodyxg;goto P2gNextxg;P2gBodyxg:$P2g1=$request->path()=='api/v1/verify/login';$P2g2=(bool)$P2g1;goto P2gxf;P2gNextxg:P2gxf:if($P2g2)goto P2gBodyxh;goto P2gNextxh;P2gBodyxh:$operate_type=22;goto P2gx9;P2gNextxh:$operate_type=103;P2gx9:if($member->phone)goto P2gBodyxj;goto P2gNextxj;P2gBodyxj:$P2g0=$member->phone;goto P2gxi;P2gNextxj:$P2g0='';P2gxi:$behavior_log->phone=$P2g0;$behavior_log->register_channel_id=$register_channel_id;$behavior_log->register_channel_name=$register_channel_name;$P2g0=$member->page_id??0;$behavior_log->register_page_id=$P2g0;$behavior_log->register_page_name=$register_page_name;$behavior_log->operate_type=$operate_type;$behavior_log->operate_channel_id=$operate_channel_id;$behavior_log->operate_channel_name=$operate_channel_name;if($request->platform)goto P2gBodyxl;goto P2gNextxl;P2gBodyxl:$P2g0=$request->platform;goto P2gxk;P2gNextxl:$P2g0='';P2gxk:$behavior_log->operate_platform=$P2g0;if($request->page_id)goto P2gBodyxn;goto P2gNextxn;P2gBodyxn:$P2g0=$request->page_id;goto P2gxm;P2gNextxn:$P2g0=0;P2gxm:$behavior_log->operate_page_id=$P2g0;$behavior_log->operate_page_name=$operate_page_name;$behavior_log->operate_params=null;$behavior_log->save();}}
?>