|
|
@@ -31,50 +31,6 @@ class PPSimController extends Controller
|
|
|
}
|
|
|
|
|
|
|
|
|
- public function launch9x(Request $request)
|
|
|
- {
|
|
|
-
|
|
|
- $gid = $request->input('gid');
|
|
|
- $level=$request->input('level',0);
|
|
|
- $lang=$request->input('lang',env('DEFAULT_LOCALE','pu'));
|
|
|
- $userid = $request->UserID;
|
|
|
- $lang=['pu'=>'pt','en'=>'en','sp'=>'es'][$lang]??$lang;
|
|
|
-
|
|
|
- $protocol = $request->isSecure() ? 'https://' : 'http://';
|
|
|
- $domain = $protocol . $request->getHost();
|
|
|
-
|
|
|
- $rid=substr($gid,2);
|
|
|
- $params=[
|
|
|
- 'norot'=>1,
|
|
|
- 'lang'=>$lang,
|
|
|
- 'level'=>$level,
|
|
|
- 'gid'=>$rid,
|
|
|
- 'UserID'=>$userid,
|
|
|
- 't'=>time()
|
|
|
- ];
|
|
|
- $params['sign'] = ApiSign::sign($params);
|
|
|
-
|
|
|
- $url="$domain/api/pgsoft/lunchorg?".http_build_query($params);
|
|
|
- switch(substr($gid,0,2)){
|
|
|
- //igt
|
|
|
- case "92":
|
|
|
- $url = "$domain/api/igt/lunchorg?".http_build_query($params);
|
|
|
- break;
|
|
|
- //jili
|
|
|
- case "91":
|
|
|
- $url = "$domain/api/jiligames/lunchorg?".http_build_query($params);
|
|
|
- break;
|
|
|
- //pg
|
|
|
- case "90":
|
|
|
- $url="$domain/api/pgsoft/lunchorg?".http_build_query($params);
|
|
|
- break;
|
|
|
- default:
|
|
|
- $url="$domain/api/pp-0-/lunchorg?".http_build_query($params);
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- return redirect($url);
|
|
|
- }
|
|
|
public function gameLunch(Request $request)
|
|
|
{
|
|
|
|
|
|
@@ -136,8 +92,10 @@ class PPSimController extends Controller
|
|
|
Redis::setex($token, 7200, json_encode($session));
|
|
|
$gamecode=$gid;
|
|
|
$short2=substr($gamecode, 0, 2);
|
|
|
- $host='test.pgn-nmu2nd.com';
|
|
|
- $game_url='https://'.$host.'/';
|
|
|
+ $host='spp.usgamewin.com';
|
|
|
+ $game_url='https://testpp.usgamewin.com/';
|
|
|
+// $host='test.pgn-nmu2nd.com';
|
|
|
+// $game_url='https://test.pgn-nmu2nd.com/';
|
|
|
$hide_logo=PPGameIDs::$ids[$gamecode]['hide_logo']||false;
|
|
|
return view('game.ppsim.html5', compact('host', 'token','gamecode','short2','lang','gameName','game_url','hide_logo'));
|
|
|
|
|
|
@@ -163,165 +121,6 @@ class PPSimController extends Controller
|
|
|
public function gameLunchOrg(Request $request)
|
|
|
{
|
|
|
|
|
|
- $gid = $request->input('gid');
|
|
|
- $level=$request->input('level',0);
|
|
|
- $lang=$request->input('lang',env('DEFAULT_LOCALE','pu'));
|
|
|
-
|
|
|
- $lang=['pu'=>'pt','en'=>'en','sp'=>'es'][$lang]??$lang;
|
|
|
-// $lang='pt';
|
|
|
-
|
|
|
- $userid = $request->UserID;
|
|
|
- $GlobalUID = 'a1b1c1-b53b-'.ServerService::GetLocalSign().'-' . $userid;
|
|
|
-
|
|
|
-
|
|
|
- GameCard::$enableStateCheck = false;
|
|
|
-// $gamecard = GameCard::where('gid', $gid)->first();
|
|
|
-
|
|
|
-// $in_gameid = OuroGameService::getUserInGame($userid, $GlobalUID);
|
|
|
-// if ($in_gameid != intval($gamecard->id)) {
|
|
|
-// Util::WriteLog('24680game', compact('in_gameid', 'gamecard', 'GlobalUID'));
|
|
|
-//// die;
|
|
|
-// }
|
|
|
-//
|
|
|
-// $gamecard = GameCard::where('gid', $gid)->where('brand', 'PGSoft')->first();
|
|
|
-// $gamecard->increment('play_num', 1);
|
|
|
-// //$this->logGameClick($gamecard->id,$userid);
|
|
|
-//
|
|
|
-// LogGamecardClick::recordClick($gamecard->id, $userid);
|
|
|
-
|
|
|
-// $lang = GlobalUserInfo::getLocale();
|
|
|
- $supportLang = ['en' => "en-US", 'da' => "da-DK", 'es' => "es-AR", 'id' => "id-ID", 'ja' => "ja-JP", 'ko' => "ko-KR", 'pt' => "pt-BR", 'th' => "th-TH", 'vi' => "vi-VN", 'zh' => "zh-CN", 'my' => "my-MM"];
|
|
|
-
|
|
|
- if (!in_array($lang, array_keys($supportLang))) {
|
|
|
- $lang = 'en';
|
|
|
- }
|
|
|
- $lang=$supportLang[$lang];
|
|
|
-
|
|
|
- $cdnserver = 'https://sjj.pgn-nmu2nd.com';
|
|
|
- $LogonPass='123';
|
|
|
- $sign = GlobalUserInfo::genGuuidSign((object)compact('GlobalUID','LogonPass'));
|
|
|
- $or = $this->convertString(env('JILI_GAME_DOMAIN','jj.pgn-nmu2nd.com'));
|
|
|
-// $api = $this->convertString('orgbr.pgn-nmu2nd.com');
|
|
|
-// $api = $this->convertString('api.pgn-nmu2nd.com');
|
|
|
-
|
|
|
- $data=['UserID'=>ServerService::GlobalToUserID($GlobalUID)];
|
|
|
-
|
|
|
-
|
|
|
- $gameIdToCodes=[302=>'mcp',51=>'mc',49=>'fullhouse',403=>'fullhouse3',300=>'fg3',223=>'fgp',109=>'fg',35=>'ols2',258=>'dl',47=>'bfs',421=>'lj'];
|
|
|
-
|
|
|
- $params = ['lang' => $lang, 'ssoKey' => $sign, 'apiId' => 2,'gameId'=>$gid,'gs'=>$or,'domain_platform'=>$or,'domain_gs'=>$or,'be'=>$or];
|
|
|
- $url = $cdnserver . "/{$gameIdToCodes[$gid]}/index.html?" . http_build_query($params).'&iu=true&legalLang=true';
|
|
|
-// https://jj.pgn-nmu2nd.com/mcp/index.html?ssoKey=1e790573d14d23bf6c3c330e3edeef8a1d8b3cae&lang=en-US&legalLang=true&gameId=302&gs=moc.dn2umn-ngp.jj&domain_platform=moc.dn2umn-ngp.jj&domain_gs=semagilij&be=moc.dn2umn-ngp.jj&iu=true&apiId=2&demo=true
|
|
|
-
|
|
|
-
|
|
|
- $trans="no-rotated-iframe-container";
|
|
|
- $posClass = "defaultPos";
|
|
|
- $iconClass="widthIcon";
|
|
|
- if(in_array($gid,[49,403])){
|
|
|
- $iconClass="heightIcon";
|
|
|
-
|
|
|
- if (strpos(strtolower($request->header('User-Agent')), 'iphone') !== false) {
|
|
|
- $posClass = "iosPos";
|
|
|
- $iconClass="widthIcon";
|
|
|
- $trans="rotated-iframe-container";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- $leaveUrl=$request->getSchemeAndHttpHost().'/api/jiligames/leave?UserID='.$userid;
|
|
|
-
|
|
|
-
|
|
|
- echo '<!DOCTYPE html>
|
|
|
-<html lang="en">
|
|
|
-<head>
|
|
|
- <meta charset="UTF-8">
|
|
|
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
- <title>JiliGames</title>
|
|
|
- <style>
|
|
|
- body, html {
|
|
|
- margin: 0;
|
|
|
- padding: 0;
|
|
|
- background: #000;
|
|
|
- height: 100vh;
|
|
|
- overflow: hidden;
|
|
|
- -webkit-overflow-scrolling: touch; /* 启用惯性滚动 */
|
|
|
- }
|
|
|
-
|
|
|
- .rotated-iframe-container {
|
|
|
- width: 100vh; /* 旋转后高度变为宽度 */
|
|
|
- height: 100vw; /* 旋转后宽度变为高度 */
|
|
|
- transform: rotate(-90deg);
|
|
|
- transform-origin: top right;
|
|
|
- position: absolute;
|
|
|
- top: 0;
|
|
|
- right: 100%;
|
|
|
- overflow: hidden;
|
|
|
- }
|
|
|
-
|
|
|
- .no-rotated-iframe-container {
|
|
|
- width: 100vw; /* 旋转后高度变为宽度 */
|
|
|
- height: 100vh; /* 旋转后宽度变为高度 */
|
|
|
- position: absolute;
|
|
|
- top: 0;
|
|
|
- }
|
|
|
-
|
|
|
- .rotated-iframe {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- transform-origin: top right;
|
|
|
- }
|
|
|
- .widthIcon{
|
|
|
- width: 13vh; height: 13%;
|
|
|
- }
|
|
|
- .heightIcon{
|
|
|
- width: 13%; height: 13vw;
|
|
|
- }
|
|
|
- .defaultPos{
|
|
|
- position: absolute; top: 10px; left: 10px; z-index: 9999;
|
|
|
- }
|
|
|
- .iosPos{
|
|
|
- position: absolute; bottom: 10px; left: 10px; z-index: 9999; transform: rotate(-90deg);
|
|
|
- }
|
|
|
- </style>
|
|
|
-</head>
|
|
|
-<body>
|
|
|
- <script>
|
|
|
- document.addEventListener("touchstart", (e) => {
|
|
|
- // 确保滑动事件生效
|
|
|
- }, { passive: true });
|
|
|
-
|
|
|
- document.addEventListener("touchmove", (e) => {
|
|
|
- // 确保惯性滚动生效
|
|
|
- }, { passive: true });
|
|
|
-
|
|
|
- function backhome(){
|
|
|
- var xhr = new XMLHttpRequest();
|
|
|
- var url = "'.$leaveUrl.'"; // 这里替换成你实际要访问的 URL
|
|
|
- window.location.href=url;
|
|
|
-// console.log(url);
|
|
|
-// xhr.open("GET", url, true);
|
|
|
-// xhr.send();
|
|
|
-// setTimeout(()=>{
|
|
|
-// if(window.parent&&window.parent!=window){
|
|
|
-// window.parent.postMessage("backhome","*")
|
|
|
-// }else {
|
|
|
-// document.location = "game://a=1&b=2";
|
|
|
-// }
|
|
|
-// },500)
|
|
|
-// document.body.innerHTML=`<span style="color:#000">${url}</span>`;
|
|
|
- }
|
|
|
-</script>
|
|
|
-<div class="'.$trans.'">
|
|
|
- <!-- 嵌入的 iframe -->
|
|
|
- <iframe class="rotated-iframe" frameborder="0" src="'.$url.'"></iframe>
|
|
|
-</div>
|
|
|
-<div id="game-lobby" style="" class="'.$iconClass.' '.$posClass.'">
|
|
|
- <a href="#" onclick="backhome()" > <img src="https://static2.pgn-nmu2nd.com/0temp/back.png" style="display: block; width: 100%; height: 100%; margin-left: auto; margin-right: auto;"></a>
|
|
|
- </div>
|
|
|
-</body>
|
|
|
-</html>';
|
|
|
-
|
|
|
- return "";
|
|
|
}
|
|
|
|
|
|
private function convertString($input)
|