_getAccountId()); $info = array( 'account_id' => myself()->_getAccountId(), //账号id 'channel' => myself()->_getChannel(), //账号channel 'openid' => myself()->_getOpenId(), //账号openid 'adress' => myself()->_getAddress(), //账号openid 'name' => $user['name'], //用户名字 'rank' => $user['rank'], //段位 'gold' => $user['gold'], //金币 'diamond' => $user['diamond'], //钻石 'account_register_time' => myself()->_getRegisterTime(), //账号注册时间 'ip' => $_SERVER['REMOTE_ADDR'], //用户ip '_os' => getReqVal('_os', ''), '_net' => getReqVal('_net', ''), ); return $info; } private static function userInfoByAccountId($account_id) { $user = User::find($account_id); $info = array( 'account_id' => $user['account_id'], //账号id 'channel' => $user['channel'], //账号channel 'openid' => 'unknown', 'adress' => $user['address'], //账号openid 'name' => $user['name'], //用户名字 'rank' => $user['rank'], //段位 'gold' => $user['gold'], //金币 'diamond' => $user['diamond'], //钻石 'account_register_time' => $user['createtime'], //账号注册时间 'ip' => $_SERVER['REMOTE_ADDR'], //用户ip '_os' => getReqVal('_os', ''), '_net' => getReqVal('_net', ''), ); return $info; } private static function goldRecord($params = []) { if (isset($params['account_id']) && !empty($params['account_id'])) { $account_id = $params['account_id']; } else { $account_id = myself()->_getAccountId(); } $data = array( "#account_id" => $account_id, "#event_name"=> "gold_record", "#ip"=> $_SERVER['REMOTE_ADDR'], "#time"=> myself()->_getNowTime(), "#type"=> "track", "properties"=>'' ); return $data; } private static function ItemRecord(){ $data = [ "#account_id" => myself()->_getAccountId(), "#event_name"=> "item_record", "#ip"=> $_SERVER['REMOTE_ADDR'], "#controller"=> getReqVal('c', ''), "#artion"=> getReqVal('a', ''), "#time"=> myself()->_getNowTime(), "#type"=> "track", "properties"=>'' ]; return $data; } }