refactor(web):改造成vue工程
This commit is contained in:
13
.editorconfig
Normal file
13
.editorconfig
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
# 设置字符集
|
||||||
|
charset = utf-8
|
||||||
|
# 缩进风格,可选space、tab
|
||||||
|
indent_style = space
|
||||||
|
# 缩进的空格数
|
||||||
|
indent_size = 2
|
||||||
|
end_of_line = lf
|
||||||
|
|
||||||
|
insert_final_newline = false
|
||||||
|
max_line_length = 300
|
||||||
24
.gitignore
vendored
Normal file
24
.gitignore
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
pnpm-debug.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
|
||||||
|
node_modules
|
||||||
|
dist
|
||||||
|
dist-ssr
|
||||||
|
*.local
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/extensions.json
|
||||||
|
.idea
|
||||||
|
.DS_Store
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.sw?
|
||||||
3
.vscode/extensions.json
vendored
Normal file
3
.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"recommendations": ["Vue.volar"]
|
||||||
|
}
|
||||||
5
README.md
Normal file
5
README.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# Vue 3 + Vite
|
||||||
|
|
||||||
|
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
|
||||||
|
|
||||||
|
Learn more about IDE Support for Vue in the [Vue Docs Scaling up Guide](https://vuejs.org/guide/scaling-up/tooling.html#ide-support).
|
||||||
515
home.html
515
home.html
@@ -1,515 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<title>传奇霸主_传奇霸主官网_传奇霸主微端下载</title>
|
|
||||||
<meta name="description" content="传奇霸主 1.76复古版本,刀刀切割,炫酷时装">
|
|
||||||
<meta name="keywords" content="传奇霸主 1.76复古版本 刀刀切割 炫酷时装">
|
|
||||||
<script>
|
|
||||||
document.onkeydown = document.onkeyup = document.onkeypress = function(event) {
|
|
||||||
var e = event || window.event || arguments.callee.caller.arguments[0];
|
|
||||||
if (e && e.keyCode == 123) {
|
|
||||||
e.returnValue = false;
|
|
||||||
return (false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<link rel="stylesheet" href="static/home/css/idangerous.swiper2.7.6.css">
|
|
||||||
<link rel="stylesheet" href="static/home/css/sprite.css">
|
|
||||||
<link rel="stylesheet" href="static/home/css/base.css">
|
|
||||||
<link rel="stylesheet" href="static/home/css/index.css">
|
|
||||||
<script type="text/javascript" src="static/home/js/jquery.min.js"></script>
|
|
||||||
<script type="text/javascript" src="static/home/js/idangerous.swiper2.7.6.min.js"></script>
|
|
||||||
<script type="text/javascript" src="static/home/js/jq_mousewheel.js"></script>
|
|
||||||
<link rel="stylesheet" type="text/css" href="static/home/css/style.css">
|
|
||||||
<link rel="stylesheet" href="static/home/css/Gw.css">
|
|
||||||
<script type="text/javascript" src="static/home/js/require.js" defer="" async="true" data-main="/static/home/js/common"></script>
|
|
||||||
<script src="static/js/common.js?v=1"></script>
|
|
||||||
</head>
|
|
||||||
<body oncontextmenu="return false" onselectstart="return false">
|
|
||||||
<div id="top">
|
|
||||||
<div class="top-wrap">
|
|
||||||
<div style="position: absolute;left:-174px;top: 0;height: 38px;line-height: 38px;color: #333">本游戏适合18岁以上玩家进入
|
|
||||||
</div>
|
|
||||||
<div class="top-log"><a href="javascript:void(0);"></a></div>
|
|
||||||
<div class="top-flash">
|
|
||||||
<div class="show-flash"></div>
|
|
||||||
<div class="default-flash"></div>
|
|
||||||
</div>
|
|
||||||
<div class="top-other">
|
|
||||||
<!--<a href="javascript:void (0)" class="top-login">登录</a><span class="fenge">|</span>
|
|
||||||
<a href="javascript:void(0);" class="top-register">注册</a>-->
|
|
||||||
<a href="https://127.0.0.1" class="top-kefu" target="_blank">在线客服</a>
|
|
||||||
</div>
|
|
||||||
<div class="g-all-game" id="allGame"><span class="g-all-game-btn">所有游戏</span></div>
|
|
||||||
<div class="mobile-game"><a href="javascript:void(0);">手游下载</a></div>
|
|
||||||
<div class="g-all-game-list" id="allGameList" data-kid="26F7CBD8-A214-4BD7-B158-1EA0E4E3158D">
|
|
||||||
<div class="g-all-game-img" style="display: block;">
|
|
||||||
<a href="javascript:void(0);" title="传奇世界">
|
|
||||||
<img src="static/home/img/27093352BTEIe.jpeg" alt="传奇世界" width="400" height="262" title="传奇世界">
|
|
||||||
</a>
|
|
||||||
<div class="all-game-txt">
|
|
||||||
《传奇世界》是一款ARPG角色扮演类网页游戏。宏大的世界观,将上古神话背景与游戏体验做了完美的结合,只有不断历练自己才能通过各种挑战,顺利击杀精英、逼退对手,获得珍稀奖励、给力装备,为征战之途做好万全的准备。
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<dl class="all-game-hot" id="TopAllGameName">
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div><div class="main-wrap">
|
|
||||||
<div class="wrap">
|
|
||||||
<!-- 第一屏 -->
|
|
||||||
<div class="section sec1">
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
<!--<a href="javascript:void(0);"><img class="logo" src="static/home/img/logo.png"></a>-->
|
|
||||||
<ul class="menu-list">
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">官网首页<br><span>HOME</span></a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">新闻中心<br><span>NEWS</span></a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">礼包中心<br><span>GIFT</span></a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">游戏资料<br><span>GAME INFO</span></a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">游戏攻略<br><span>RAIDERS</span></a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="kf-web" href="http://wpa.qq.com/msgrd?v=3&uin=123456&site=qq" target="_blank">客服中心<br><span>SERVICE</span></a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<a class="ico start_btn" href="play" target="_blank">开始游戏</a>
|
|
||||||
</div>
|
|
||||||
<div class="btns">
|
|
||||||
<!--<div class="gzhBox"><img src="static/home/img/qcode.jpeg"></div>-->
|
|
||||||
<a href="http://wpa.qq.com/msgrd?v=3&uin=123456&site=qq"></a>
|
|
||||||
<a id="dlq_url" href="/microClient/yfbx.rar" class="i-b_pc"></a>
|
|
||||||
<a href="javascript:void(0);" class="i-b_message"></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- 第二屏 -->
|
|
||||||
<div class="section sec2 clearfix">
|
|
||||||
<div class="container clearfix">
|
|
||||||
<div class="sec2Top clearfix">
|
|
||||||
<!-- 滚图 -->
|
|
||||||
<div class="banner fl">
|
|
||||||
<div class="banner_swiper swiper-container" id="slideBox"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 新闻公告 -->
|
|
||||||
<div class="news fr">
|
|
||||||
<!-- 新闻公告 -->
|
|
||||||
<div class="newsTab">
|
|
||||||
<a href="javascript:void(0);" class="act">最新</a>
|
|
||||||
<a href="javascript:void(0);">活动</a>
|
|
||||||
<a href="javascript:void(0);">公告</a>
|
|
||||||
<a href="javascript:void(0);">新闻</a>
|
|
||||||
</div>
|
|
||||||
<a href="javascript:void(0);" class="more1">查看更多</a>
|
|
||||||
<div class="newSlide">
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>02-28</span>[最新] | 《传奇霸主》双线236服于03月03日火爆开启 </a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>02-28</span>[最新] | 《传奇霸主》双线235服于03月02日火爆开启 </a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>02-28</span>[最新] | 《传奇霸主》合服公告 </a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>02-28</span>[最新] | 《传奇霸主》双线234服于03月01日火爆开启 </a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>02-11</span>[最新] | 《传奇霸主》双线233服于02月28日火爆开启 </a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>02-11</span>[最新] | 《传奇霸主》双线232服于02月27日火爆开启 </a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="newSlide">
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>05-10</span>[活动] | 《传奇霸主》精彩开服活动 </a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="newSlide">
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>02-28</span>[公告] | 《传奇霸主》双线236服于03月03日火爆开启 </a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>02-28</span>[公告] | 《传奇霸主》双线235服于03月02日火爆开启 </a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>02-28</span>[公告] | 《传奇霸主》合服公告 </a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>02-28</span>[公告] | 《传奇霸主》双线234服于03月01日火爆开启 </a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>02-11</span>[公告] | 《传奇霸主》双线233服于02月28日火爆开启 </a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>02-11</span>[公告] | 《传奇霸主》双线232服于02月27日火爆开启 </a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="newSlide">
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>02-28</span>[新闻] | 《传奇霸主》双线236服于03月03日火爆开启 </a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>02-28</span>[新闻] | 《传奇霸主》双线235服于03月02日火爆开启 </a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>02-28</span>[新闻] | 《传奇霸主》合服公告 </a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>02-28</span>[新闻] | 《传奇霸主》双线234服于03月01日火爆开启 </a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>02-11</span>[新闻] | 《传奇霸主》双线233服于02月28日火爆开启 </a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>02-11</span>[新闻] | 《传奇霸主》双线232服于02月27日火爆开启 </a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container clearfix">
|
|
||||||
<div class="roleBox">
|
|
||||||
<div class="xszdBox">
|
|
||||||
<div class="xszdBoxXZD">
|
|
||||||
<ul>
|
|
||||||
<li><a href="javascript:void(0);" class="zd1">基本操作</a>
|
|
||||||
</li>
|
|
||||||
<li><a href="javascript:void(0);" class="zd2">如何交易</a>
|
|
||||||
</li>
|
|
||||||
<li><a href="javascript:void(0);" class="zd3">如何聊天</a>
|
|
||||||
</li>
|
|
||||||
<li><a href="javascript:void(0);" class="zd4">任务介绍</a>
|
|
||||||
</li>
|
|
||||||
<li><a href="javascript:void(0);" class="zd5">NPC传送</a>
|
|
||||||
</li>
|
|
||||||
<li><a href="javascript:void(0);" class="zd6">活动一览</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<p class="xszdNav">
|
|
||||||
<a href="javascript:void(0);" class="n1">技能详情</a>
|
|
||||||
<a href="javascript:void(0);" class="n2">装备详情</a>
|
|
||||||
<a href="javascript:void(0);" class="n3">怪物详情</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="role">
|
|
||||||
<!-- 职业介绍 -->
|
|
||||||
<div class="role_swiper" id="role_swiper">
|
|
||||||
<div class="wrapper">
|
|
||||||
<div class="slide roleRlide show">
|
|
||||||
<div class="content clearfix">
|
|
||||||
<div class="b_nextTop">
|
|
||||||
<img class="fl jn" src="static/home/img/zs_j.png">
|
|
||||||
<p class="fl">职业技能:</p>
|
|
||||||
<p class="fl">职业属性:近战物理攻击</p>
|
|
||||||
<p class="fl">上手难度:
|
|
||||||
<span class="i-star-a"></span>
|
|
||||||
<span class="i-star-a"></span>
|
|
||||||
<span class="i-star-a"></span>
|
|
||||||
<span class="i-star-a"></span>
|
|
||||||
<span class="i-star"></span>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="roleTab">
|
|
||||||
<a href="javascript:;" class="i-r_m i-r_m_a">男</a>
|
|
||||||
<a href="javascript:;" class="i-r_w">女</a>
|
|
||||||
</div>
|
|
||||||
<div class="roleBoxRw">
|
|
||||||
<div class="man">
|
|
||||||
<img class="rtImg" src="static/home/img/zs_m.png">
|
|
||||||
<div class="roleBoxBg"><img src="static/home/img/zs_w.png"></div>
|
|
||||||
</div>
|
|
||||||
<div class="woman" style="display:none">
|
|
||||||
<img class="rtImg" src="static/home/img/zs_w.png">
|
|
||||||
<div class="roleBoxBg"><img src="static/home/img/zs_m.png"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="slide roleRlide">
|
|
||||||
<div class="content clearfix">
|
|
||||||
<div class="b_nextTop">
|
|
||||||
<img class="fl jn" src="static/home/img/fs_j.png">
|
|
||||||
<p class="fl">职业技能:</p>
|
|
||||||
<p class="fl">职业属性:远程魔法攻击</p>
|
|
||||||
<p class="fl">上手难度:
|
|
||||||
<span class="i-star-a"></span>
|
|
||||||
<span class="i-star-a"></span>
|
|
||||||
<span class="i-star-a"></span>
|
|
||||||
<span class="i-star-a"></span>
|
|
||||||
<span class="i-star-a"></span>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="roleTab">
|
|
||||||
<a href="javascript:;" class="i-r_m i-r_m_a">男</a>
|
|
||||||
<a href="javascript:;" class="i-r_w">女</a>
|
|
||||||
</div>
|
|
||||||
<div class="roleBoxRw">
|
|
||||||
<div class="man">
|
|
||||||
<img class="rtImg" src="static/home/img/fs_m.png">
|
|
||||||
<div class="roleBoxBg"><img src="static/home/img/fs_w.png"></div>
|
|
||||||
</div>
|
|
||||||
<div class="woman" style="display:none">
|
|
||||||
<img class="rtImg" src="static/home/img/fs_w.png">
|
|
||||||
<div class="roleBoxBg"><img src="static/home/img/fs_m.png"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="slide roleRlide">
|
|
||||||
<div class="content clearfix">
|
|
||||||
<div class="b_nextTop">
|
|
||||||
<img class="fl jn" src="static/home/img/ds_j.png">
|
|
||||||
<p class="fl">职业技能:</p>
|
|
||||||
<p class="fl">职业属性:远程道术攻击</p>
|
|
||||||
<p class="fl">上手难度:
|
|
||||||
<span class="i-star-a"></span>
|
|
||||||
<span class="i-star-a"></span>
|
|
||||||
<span class="i-star-a"></span>
|
|
||||||
<span class="i-star"></span>
|
|
||||||
<span class="i-star"></span>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="roleTab">
|
|
||||||
<a href="javascript:;" class="i-r_m i-r_m_a">男</a>
|
|
||||||
<a href="javascript:;" class="i-r_w">女</a>
|
|
||||||
</div>
|
|
||||||
<div class="roleBoxRw">
|
|
||||||
<div class="man">
|
|
||||||
<img class="rtImg" src="static/home/img/ds_m.png">
|
|
||||||
<div class="roleBoxBg"><img src="static/home/img/ds_w.png"></div>
|
|
||||||
</div>
|
|
||||||
<div class="woman" style="display:none">
|
|
||||||
<img class="rtImg" src="static/home/img/ds_w.png">
|
|
||||||
<div class="roleBoxBg"><img src="static/home/img/ds_m.png"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="wrapperNav">
|
|
||||||
<a href="javascript:;" class="nZ act">战</a>
|
|
||||||
<a href="javascript:;" class="nF">法</a>
|
|
||||||
<a href="javascript:;" class="nD">道</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container clearfix">
|
|
||||||
<div class="ctZl clearfix">
|
|
||||||
<!-- 游戏资料 -->
|
|
||||||
<div class="yxzl fl">
|
|
||||||
<div class="i-t_yxzl">游戏资料</div>
|
|
||||||
<div class="i-bc_m">
|
|
||||||
<div class="clearfix wfjs">
|
|
||||||
<div class="link fl">
|
|
||||||
> <a href="javascript:void(0);">攻城篇</a>
|
|
||||||
> <a href="javascript:void(0);">熔炉</a>
|
|
||||||
> <a href="javascript:void(0);">拍卖行</a><br>
|
|
||||||
> <a href="javascript:void(0);">行会</a>
|
|
||||||
> <a href="javascript:void(0);">封号系统</a>
|
|
||||||
> <a href="javascript:void(0);">神盾系统</a><br>
|
|
||||||
> <a href="javascript:void(0);">法阵系统</a>
|
|
||||||
> <a href="javascript:void(0);" class="linkMore">MORE +</a><br>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="clearfix xtjs">
|
|
||||||
<div class="link fl">
|
|
||||||
> <a href="javascript:void(0);">封号系统</a>
|
|
||||||
> <a href="javascript:void(0);">神盾系统</a>
|
|
||||||
> <a href="javascript:void(0);">法阵系统</a><br>
|
|
||||||
> <a href="javascript:void(0);">玉佩系统</a>
|
|
||||||
> <a href="javascript:void(0);">生肖系统</a>
|
|
||||||
> <a href="javascript:void(0);" class="linkMore">MORE +</a><br>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 游戏攻略 -->
|
|
||||||
<div class="yxgl fr">
|
|
||||||
<a class="i-more2 more" href="javascript:void(0);"></a>
|
|
||||||
<div class="i-t_yxgl">游戏攻略</div>
|
|
||||||
<div class="i-bc_m">
|
|
||||||
<!-- 新闻公告 -->
|
|
||||||
<div class="tab">
|
|
||||||
<a href="javascript:;" class="act">最新攻略</a>
|
|
||||||
</div>
|
|
||||||
<div class="slide">
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>05-06</span>[新闻] | 《传奇霸主》疗伤石怎么合成?在哪打疗伤石 </a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>05-06</span>[新闻] | 《传奇霸主》战士5级技能什么比较好? </a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>05-06</span>[新闻] | 《传奇霸主》道士的月灵怎么召唤?技能获得方法 </a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>05-06</span>[新闻] | 《传奇霸主》法师灭天火6级雷电哪个好?技能伤害对比 </a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>05-06</span>[新闻] | 《传奇霸主》灭天火怎么获得?技能获取途径说明 </a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>05-06</span>[新闻] | 《传奇霸主》转职技能和装备跟着转吗?技能对照表 </a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<span>05-06</span>[新闻] | 《传奇霸主》创造宝石怎么获得?哪里打爆率高 </a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="ctZl clearfix">
|
|
||||||
<!-- 影音中心 -->
|
|
||||||
<div class="yyzx fl">
|
|
||||||
<a class="i-more2" href="javascript:void(0);">查看更多</a>
|
|
||||||
<div class="i-t_yyzx">影音中心</div>
|
|
||||||
<div class="video_box">
|
|
||||||
<div class="video">
|
|
||||||
<img src="static/home/img/img202101111746210.png">
|
|
||||||
<div class="i-mask"></div>
|
|
||||||
<a class="i-b_player" href="javascript:void(0);"></a>
|
|
||||||
<p class="descrip">[游戏视频]盛世新年服,首次龙城激情pk解说!</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 名人堂 -->
|
|
||||||
<div class="mrt fl">
|
|
||||||
<a class="i-more2" href="javascript:void(0);">查看更多</a>
|
|
||||||
<div class="i-t_mrt">名人堂</div>
|
|
||||||
<div class="player">
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<img src="static/home/img/img202101271114290.jpeg" style="height: 100%;width: 100%;cursor: pointer;">
|
|
||||||
<p class="descrip">[名人堂]盛世沙城</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<img src="static/home/img/img202101271115480.jpeg" style="height: 100%;width: 100%;cursor: pointer;">
|
|
||||||
<p class="descrip">[名人堂]盛世新年</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- 弹窗 -->
|
|
||||||
<div class="mask" id="mask">
|
|
||||||
<div class="message_mask">
|
|
||||||
<a class="close"><span class="i-close"></span></a>
|
|
||||||
<div class="content">
|
|
||||||
<span class="tl"></span>
|
|
||||||
<span class="tr"></span>
|
|
||||||
<span class="bl"></span>
|
|
||||||
<span class="br"></span>
|
|
||||||
<p>您的意见非常宝贵,请在这里留下给我们的建议,</p>
|
|
||||||
<p>我们将在后续做出相关改进。</p>
|
|
||||||
<textarea name="textarea" id="message" cols="20" rows="8" placeholder=""></textarea>
|
|
||||||
<a class="i-b_submit" onclick="send_message();"></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script type="text/javascript" src="static/home/js/index.js"></script>
|
|
||||||
<script>
|
|
||||||
var host = window.location.host;
|
|
||||||
$(function () {
|
|
||||||
//新闻公告切换
|
|
||||||
var news_base_url1 = host + 'news/',
|
|
||||||
news_params1 = ['', 'hd/', 'gg/', 'news/'];
|
|
||||||
$('.newSlide').eq(0).show();
|
|
||||||
$('.news .newsTab a').on('mouseenter', function () {
|
|
||||||
var idx = $(this).index();
|
|
||||||
$(this).addClass('act').siblings().removeClass('act');
|
|
||||||
$(".newSlide").hide().eq(idx).show();
|
|
||||||
});
|
|
||||||
|
|
||||||
//攻略切换
|
|
||||||
var news_base_url2 = host + 'yxgl/',
|
|
||||||
news_params2 = ['', 'xsgl/', 'jjgl/', 'hdgl/'];
|
|
||||||
$(".yxgl .slide").eq(0).show();
|
|
||||||
$('.yxgl .tab a').on('mouseenter', function () {
|
|
||||||
var idx = $(this).index();
|
|
||||||
$(this).addClass('act').siblings().removeClass('act');
|
|
||||||
$(".yxgl .slide").hide().eq(idx).show();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
function send_message() {
|
|
||||||
if ($('#message').val() != '') {
|
|
||||||
alert('意见提交成功!');
|
|
||||||
$('#mask').fadeOut();
|
|
||||||
$('#message').val('');
|
|
||||||
} else {
|
|
||||||
$('#mask').fadeOut();
|
|
||||||
$('#message').val('');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
185
index.html
185
index.html
@@ -1,162 +1,23 @@
|
|||||||
<!--
|
<!doctype html>
|
||||||
* 冰雪传奇H5
|
<html lang="en">
|
||||||
* 2022 XX信息科技有限公司
|
<head>
|
||||||
*
|
<meta charset="UTF-8"/>
|
||||||
* @author 123456
|
<link rel="icon" type="image/svg+xml" href="/vite.svg"/>
|
||||||
* @wx 123456
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
* @qq 123456
|
<meta charset="utf-8">
|
||||||
-->
|
<meta name="viewport"
|
||||||
<!DOCTYPE HTML>
|
content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"/>
|
||||||
<html>
|
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
||||||
<head>
|
<meta name="full-screen" content="true"/>
|
||||||
<meta charset="utf-8">
|
<meta name="screen-orientation" content="portrait"/>
|
||||||
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
|
<meta name="x5-fullscreen" content="true"/>
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta name="360-fullscreen" content="true"/>
|
||||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
<script src="static/js/md5.js"></script>
|
||||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
<script src="static/js/common.js?v=1"></script>
|
||||||
<meta content="telephone=no" name="format-detection">
|
<title>神临苍月</title>
|
||||||
<meta content="email=no" name="format-detection">
|
</head>
|
||||||
<meta name="screen-orientation" content="portrait">
|
<body oncontextmenu="return false" ondragstart="return false">
|
||||||
<meta name="x5-orientation" content="portrait">
|
<div id="app"></div>
|
||||||
<meta name="full-screen" content="yes">
|
<script type="module" src="/src/main.js"></script>
|
||||||
<meta name="x5-fullscreen" content="true">
|
</body>
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
</html>
|
||||||
<meta name="renderer" content="webkit">
|
|
||||||
<title>清渊传奇 经典复古 轻松打金</title>
|
|
||||||
<meta name="description" content="传奇霸主 1.76复古版本,刀刀切割,炫酷时装">
|
|
||||||
<meta name="keywords" content="传奇霸主1.76复古版本 刀刀切割 炫酷时装">
|
|
||||||
<style type="text/css">
|
|
||||||
body,html,p,a,div,img{margin:0px;padding:0px}
|
|
||||||
body{background:#000}
|
|
||||||
ul, li { list-style: none; }
|
|
||||||
img{border:none;display:block;width:100%;}
|
|
||||||
a{text-decoration:none;display:block}
|
|
||||||
|
|
||||||
body { font-size:14px; }
|
|
||||||
|
|
||||||
.wrap{width:100%;margin:0 auto}
|
|
||||||
|
|
||||||
.top{ display: none; /*width:600px;position:fixed;top:0;z-index:999;left:0*/}
|
|
||||||
|
|
||||||
.container { position: relative; }
|
|
||||||
.logo {
|
|
||||||
position: absolute;
|
|
||||||
width: 200px;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
top: 8%;
|
|
||||||
}
|
|
||||||
.menu-list {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
.menu-list li {width: 95px; float: left; text-align: center;}
|
|
||||||
.menu-list a { color: #ccc; font-size: 12px; text-align: center;}
|
|
||||||
.menu-list a:hover{ color: #e1bc98; }
|
|
||||||
.menu-list span{ font-family: Arial; color: #999; font-size: 12px; text-align: center; }
|
|
||||||
.enter_game {
|
|
||||||
background: transparent url(static/img/enter_game.png) no-repeat;
|
|
||||||
background-size: 100%;
|
|
||||||
display: block;
|
|
||||||
width: 54%;
|
|
||||||
height: 20%;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 13%;
|
|
||||||
left: 23%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.enter_game:active {
|
|
||||||
background-size: 98%;
|
|
||||||
background-position-x: 3px;
|
|
||||||
}
|
|
||||||
.enter_game{
|
|
||||||
-webkit-animation: enter_game_eff 1s linear alternate infinite;
|
|
||||||
animation: enter_game_eff 1s linear alternate infinite;
|
|
||||||
}
|
|
||||||
@-webkit-keyframes enter_game_eff{
|
|
||||||
0%{-webkit-transform:scale(0.9);}
|
|
||||||
100%{-webkit-transform:scale(1);}
|
|
||||||
}
|
|
||||||
@keyframes enter_game_eff{
|
|
||||||
0%{transform:scale(0.9);}
|
|
||||||
100%{transform:scale(1);}
|
|
||||||
}
|
|
||||||
|
|
||||||
.pr{position:relative}
|
|
||||||
.dw{position:absolute;right:3%;width:28%;height:100%;top:0}
|
|
||||||
.dw1{position:absolute;left:50%;width:30%;top:2%;margin-left:-15%;height:32%}
|
|
||||||
.dw2{position:absolute;left:50%;width:50%;bottom:40%;margin-left:-25%;height:60%}
|
|
||||||
|
|
||||||
.footer { text-align:center;color:#6b6b6b; padding: 20px 0 50px; }
|
|
||||||
|
|
||||||
@media screen and (max-width:600px) {
|
|
||||||
.wrap{width:100%;}
|
|
||||||
}
|
|
||||||
@media screen and (min-width:600px) {
|
|
||||||
body { background: url(static/mobile/img/bg.jpg) no-repeat center top; background-attachment: fixed; background-size: cover; }
|
|
||||||
.wrap{width:580px;}
|
|
||||||
.menu-list { top: 75px; }
|
|
||||||
.menu-list li {width: 129px;}
|
|
||||||
.menu-list a { font-size: 14px; }
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
document.onkeydown = document.onkeyup = document.onkeypress = function(event) {
|
|
||||||
var e = event || window.event || arguments.callee.caller.arguments[0];
|
|
||||||
if (e && e.keyCode == 123) {
|
|
||||||
e.returnValue = false;
|
|
||||||
return (false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body oncontextmenu="return false" onselectstart="return false" ondragstart="return false">
|
|
||||||
<div class="wrap">
|
|
||||||
<div class="top">
|
|
||||||
<img src="static/mobile/img/top.jpeg">
|
|
||||||
<a href="/play" class="dw"></a>
|
|
||||||
</div>
|
|
||||||
<div class="container">
|
|
||||||
<img src="static/mobile/img/01.jpeg" alt="">
|
|
||||||
<img src="static/img/logo.png" class="logo">
|
|
||||||
<ul class="menu-list" id="menu" style="display: none;">
|
|
||||||
<li><a href="home.html" target="_blank">官网首页<br><span>HOME</span></a></li>
|
|
||||||
<li><a href="play" target="_blank">开始游戏<br><span>PLAY</span></a></li>
|
|
||||||
<li><a href="javascript:void(0);" id="kf">在线客服<br><span>QQ</span></a></li>
|
|
||||||
</ul>
|
|
||||||
<a href="/play" target="_blank" class="enter_game"></a>
|
|
||||||
</div>
|
|
||||||
<img src="static/mobile/img/03.gif" alt="">
|
|
||||||
<div class="pr">
|
|
||||||
<img src="static/mobile/img/02.gif" alt="">
|
|
||||||
<a href="/ios/" class="dw1"></a>
|
|
||||||
</div>
|
|
||||||
<div class="pr">
|
|
||||||
<img src="static/mobile/img/04.gif" alt="">
|
|
||||||
<a href="/ios/" class="dw2"></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="footer">
|
|
||||||
<p>2022 © XX信息技术有限公司</p>
|
|
||||||
</div>
|
|
||||||
<script src="static/js/jquery.js"></script>
|
|
||||||
<script src="static/js/common.js?v=1"></script>
|
|
||||||
<script>
|
|
||||||
$(function() {
|
|
||||||
$('#kf').click(function() {
|
|
||||||
if(isMobile()) {
|
|
||||||
var qqUrl = 'http://wpa.qq.com/msgrd?v=3&uin=123456&site=qq';
|
|
||||||
window.location.href = qqUrl;
|
|
||||||
} else {
|
|
||||||
window.open('http://wpa.qq.com/msgrd?v=3&uin=123456&site=qq');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
/*setTimeout(function() {
|
|
||||||
$('#menu').show();
|
|
||||||
}, 1e3);*/
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Welcome to nginx!</title>
|
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
width: 35em;
|
|
||||||
margin: 0 auto;
|
|
||||||
font-family: Tahoma, Verdana, Arial, sans-serif;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>Welcome to nginx!</h1>
|
|
||||||
<p>If you see this page, the nginx web server is successfully installed and
|
|
||||||
working. Further configuration is required.</p>
|
|
||||||
|
|
||||||
<p>For online documentation and support please refer to
|
|
||||||
<a href="http://nginx.org/">nginx.org</a>.<br/>
|
|
||||||
Commercial support is available at
|
|
||||||
<a href="http://nginx.com/">nginx.com</a>.</p>
|
|
||||||
|
|
||||||
<p><em>Thank you for using nginx.</em></p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
529
js/index.js
529
js/index.js
@@ -1,529 +0,0 @@
|
|||||||
/**
|
|
||||||
* 冰雪传奇H5
|
|
||||||
* 2022 XX信息科技有限公司
|
|
||||||
*
|
|
||||||
* @author 123456
|
|
||||||
* @wx 123456
|
|
||||||
* @qq 123456
|
|
||||||
*/
|
|
||||||
|
|
||||||
let host = window.location.hostname||'100.88.157.105';
|
|
||||||
let port = 80;
|
|
||||||
|
|
||||||
var webUrl = getHttp() + host + (port && 80 != port ? ':' + port : ''),
|
|
||||||
account = getQueryString('account'),
|
|
||||||
token = getQueryString('token'),
|
|
||||||
noLogin = !account || !token;
|
|
||||||
|
|
||||||
if (noLogin) {
|
|
||||||
setTimeout(function() {
|
|
||||||
loadBarClear();
|
|
||||||
loadBarFull();
|
|
||||||
setTimeout(function() {
|
|
||||||
window.location.href = webUrl + '/login';
|
|
||||||
}, randomRange(250, 500));
|
|
||||||
}, 1e3);
|
|
||||||
}
|
|
||||||
|
|
||||||
window['gameName'] = '夜风冰雪';
|
|
||||||
window['gameLogo'] = 'LOGO6';
|
|
||||||
|
|
||||||
// 请勿更改
|
|
||||||
window['game'] = 'YFBX';
|
|
||||||
window['pf'] = 'yfbx';
|
|
||||||
window['pfID'] = 10001;
|
|
||||||
|
|
||||||
window['userInfo'] = {
|
|
||||||
'account': account,
|
|
||||||
'token': token,
|
|
||||||
'openID': md5(account + window['game'] + window['pfID']).toUpperCase(),
|
|
||||||
'cm': 1,
|
|
||||||
'adult': 0
|
|
||||||
};
|
|
||||||
|
|
||||||
// 检测 Tampermonkey 插件
|
|
||||||
function checkTampermonkey() {
|
|
||||||
setTimeout(() => {
|
|
||||||
const TampermonkeyVars = ["unsafeWindow", "GM_info"]
|
|
||||||
if (!TampermonkeyVars.every(e => typeof window[e] == 'undefined')) {
|
|
||||||
// 如果检测到 Tampermonkey 插件,执行以下代码
|
|
||||||
alert('检测到您正在使用 Tampermonkey 插件,本网站禁止使用此类插件!');
|
|
||||||
// 可以选择阻止页面访问或其他操作
|
|
||||||
window.location.href = '/login'; // 将用户重定向到空白页
|
|
||||||
} else checkTampermonkey()
|
|
||||||
}, 5000)
|
|
||||||
}
|
|
||||||
checkTampermonkey()
|
|
||||||
|
|
||||||
// 游戏个性设置: 设备/版本/界面/NPC参数
|
|
||||||
window['device'] = 0; // 客户端设备(一般无需更改): 0=自适应, 1=PC端界面, 2=移动端界面
|
|
||||||
window['gameMode'] = 0; // 版本玩法: 0=三职业, 1=单职业(游戏内仅出现战士职业装备)
|
|
||||||
window['uiStyle'] = 1; // 血球特效: 0=默认, 1=龙头动态火焰特效
|
|
||||||
window['npcStyle'] = 1; // NPC特效: 0=默认, 1=微变版本NPC动态特效
|
|
||||||
window['specialId'] = 2; // 打金服ID
|
|
||||||
window['withdraw'] = {'sid': 1, 'type': 3, 'ratio': 10000}; // 提现
|
|
||||||
|
|
||||||
window['isShowGongGao'] = true;
|
|
||||||
window['isAutoShowGongGao'] = !getCookie('auto_show_notice') ? (setCookie('auto_show_notice', 1, 1), true) : false;
|
|
||||||
window['isMicro'] = window['pfID'];
|
|
||||||
window['selectServer'] = true;
|
|
||||||
window['fontFamily'] = 'Arial';
|
|
||||||
window['loginType'] = 1; // 登录类型 0:测试 1:正式
|
|
||||||
window['loginWay'] = 1;
|
|
||||||
|
|
||||||
window['isReport'] = 0; // 是否上报后台
|
|
||||||
window['isReportPF'] = 0; // 是否上报渠道
|
|
||||||
window['isDisablePay'] = 0; // 是否关闭充值
|
|
||||||
window['loginView'] = 'app.MainLoginView';
|
|
||||||
|
|
||||||
// 相关URL
|
|
||||||
window['webHost'] = host;
|
|
||||||
window['webUrl'] = webUrl;
|
|
||||||
window['serviceListdUrl'] = webUrl + '/server';
|
|
||||||
window['setServiceListdUrl'] = webUrl + '/server';
|
|
||||||
window['payUrl'] = webUrl + '/pay';
|
|
||||||
window['apiUrl'] = webUrl + '/api';
|
|
||||||
window['orderUrl'] = webUrl + '/api?act=order';
|
|
||||||
window['reportUrl'] = webUrl + '/api?act=report'; // 上报接口
|
|
||||||
window['errorReportUrl'] = webUrl + '/api?act=report&do=error';// 错误上报接口
|
|
||||||
window['checkUrl'] = webUrl + '/api?act=check'; // 验证URL
|
|
||||||
window['versionUrl'] = webUrl + '/api?act=version'; // 请求客户端版本
|
|
||||||
window['getActorInfoUrl'] = webUrl + '/api?act=actor';
|
|
||||||
window['roleInfoUrl'] = webUrl + '/api?act=role';
|
|
||||||
window['gongGaoUrl'] = webUrl + '/notice.txt';
|
|
||||||
|
|
||||||
// 客服信息
|
|
||||||
window['kfQQ'] = '123456';
|
|
||||||
window['kfWX'] = '123456';
|
|
||||||
window['kfQQUrl'] = 'https://127.0.0.1';
|
|
||||||
window['kfQQGroupUrl'] = 'https://127.0.0.1';
|
|
||||||
|
|
||||||
window['gameVerTxt1'] = '审批文号:新广出审[2022]007号 出版物号:ISBN 001-1-0001-0001-1 著作权人:XX信息科技有限公司';
|
|
||||||
window['gameVerTxt2'] = '出版单位:XX信息科技有限公司 运营单位:XX信息科技有限公司';
|
|
||||||
window['gameVerTxt3'] = '健康游戏忠告:抵制不良游戏,拒绝盗版游戏。注意自我保护,谨防受骗上当。适度游戏益脑,沉迷游戏伤身。合理安排时间,享受健康生活。';
|
|
||||||
|
|
||||||
window['publicRes'] = 'https://cdn-cq-res.kubbo.cn/';
|
|
||||||
var arr = ['loading_1_jpg', 'loading_1_jpg', 'mp_jzjm_png', 'mp_jzjm2_png'];
|
|
||||||
window['gameLoadImg'] = !getCookie('first_loading') ? (setCookie('first_loading', 1), arr[0]) : arr[randomRange(0, 4)];
|
|
||||||
window['version1'] = 'zjt1_png';
|
|
||||||
window['version2'] = 'zjt2_png';
|
|
||||||
window['version3'] = 'zjt3_png';
|
|
||||||
|
|
||||||
window['resVersion'] = '1';
|
|
||||||
window['thmVersion'] = '1';
|
|
||||||
window['tableVersion'] = '1.2.80';
|
|
||||||
window['mainVersion'] = '1.2.2';
|
|
||||||
|
|
||||||
window['isDebug'] = false;
|
|
||||||
var isJsDebug = false;
|
|
||||||
|
|
||||||
// 设置标题
|
|
||||||
//document.title = window['gameName'];
|
|
||||||
|
|
||||||
function reporting(type, result) {
|
|
||||||
if(noLogin) return;
|
|
||||||
|
|
||||||
if (window['isReport'] && window['reportUrl']) {
|
|
||||||
let loginType = window['loginWay'] ? 1 : 0;
|
|
||||||
let msgInfo = {
|
|
||||||
type: type,
|
|
||||||
counter: window['pfID'],
|
|
||||||
env: window['game'] + '|' + loginType,
|
|
||||||
time: Date.parse(new Date().toString()) / 1000,
|
|
||||||
result: result
|
|
||||||
};
|
|
||||||
|
|
||||||
msgInfo['data'] = {
|
|
||||||
uid: window['userInfo']['uid'],
|
|
||||||
serverAlias: window['userInfo']['server']
|
|
||||||
};
|
|
||||||
|
|
||||||
var str = JSON.stringify(msgInfo);
|
|
||||||
var xhr = new XMLHttpRequest();
|
|
||||||
xhr.onreadystatechange = function() { //服务器返回值的处理函数,此处使用匿名函数进行实现
|
|
||||||
if (xhr.readyState == 4 && xhr.status == 200) {
|
|
||||||
//
|
|
||||||
}
|
|
||||||
};
|
|
||||||
xhr.open('GET', window['reportUrl'] + '&msg=' + str, true); //提交get请求到服务器
|
|
||||||
xhr.send(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function onerrorFunction(error, uid) {
|
|
||||||
var xhr = new XMLHttpRequest();
|
|
||||||
xhr.open('POST', window['checkUrl'] + window.location.search, true);//提交get请求到服务器
|
|
||||||
xhr.setRequestHeader('Content-Type', 'application/json');
|
|
||||||
let params = 'pfID=' + window['pfID'] + '&uid=' + uid + '&error=' + error;
|
|
||||||
xhr.open('GET', window['errorReportUrl'] + '&' + params, true);//提交get请求到服务器
|
|
||||||
xhr.send(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
window.onerror = function(message, url, line) {
|
|
||||||
let str = "Message : " + message + "\nURL : " + url + "\nLine Number : " + line;
|
|
||||||
this.onerrorFunction(str, 0);
|
|
||||||
alert(str);
|
|
||||||
}
|
|
||||||
|
|
||||||
//1.平台参数格式化
|
|
||||||
if(!noLogin) {
|
|
||||||
if (window['loginType']) {
|
|
||||||
switch (window['pfID']) {
|
|
||||||
case 10001:
|
|
||||||
var urlData = window.location.search;
|
|
||||||
if (urlData.indexOf('?') != -1) {
|
|
||||||
urlData = urlData.substr(1);
|
|
||||||
var strs = urlData.split('&');
|
|
||||||
for (var i = 0; i < strs.length; i++) {
|
|
||||||
window['userInfo'][strs[i].split('=')[0]] = unescape(strs[i].split('=')[1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
// 测试
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
var urlData = window.location.search;
|
|
||||||
if (urlData.indexOf('?') != -1) {
|
|
||||||
urlData = urlData.substr(1);
|
|
||||||
var strs = urlData.split('&');
|
|
||||||
for (var i = 0; i < strs.length; i++) {
|
|
||||||
window['userInfo'][strs[i].split('=')[0]] = unescape(strs[i].split('=')[1]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//2.登录验证
|
|
||||||
function loginFunction() {
|
|
||||||
//alert('维护中');
|
|
||||||
//return;
|
|
||||||
|
|
||||||
if(noLogin) return;
|
|
||||||
|
|
||||||
// window['userInfo']['serverInfo'] = serverInfo;
|
|
||||||
//1.平台验证
|
|
||||||
if (window['loginType']) {
|
|
||||||
switch (window['pfID']) {
|
|
||||||
case 10001:
|
|
||||||
var xhr = new XMLHttpRequest();
|
|
||||||
xhr.onreadystatechange = function() { // 服务器返回值的处理函数,此处使用匿名函数进行实现
|
|
||||||
if (xhr.readyState == 4 && xhr.status == 200) {
|
|
||||||
//console.log(xhr.responseText);
|
|
||||||
var obj = JSON.parse(xhr.responseText);
|
|
||||||
//验证成功
|
|
||||||
if (0 == obj.code) {
|
|
||||||
reporting(10001, 1);
|
|
||||||
start();
|
|
||||||
} else {
|
|
||||||
loadError = true;
|
|
||||||
reporting(10001, 0);
|
|
||||||
var errorMsg = obj.msg ? obj.msg : '通行证验证失败!',
|
|
||||||
label = document.getElementById('label');
|
|
||||||
if(label) {
|
|
||||||
var linkHtml = '<span class="font_small"><a onClick="window.history.back()" class="link_color">点击返回</a> / <a onClick="window.location.reload()" class="link_color">尝试刷新</a></span>';
|
|
||||||
label.innerHTML = errorMsg + linkHtml;
|
|
||||||
} else {
|
|
||||||
alert(filterHTML(errorMsg));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
xhr.open('GET', window['checkUrl'] + '&do=verify&' + window.location.search.substr(1), true); //提交get请求到服务器
|
|
||||||
xhr.send(null);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
reporting(10001, 1);
|
|
||||||
start();
|
|
||||||
// window['checkFunction']();//检测上报
|
|
||||||
// window['checkSuccess']();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//3.支付
|
|
||||||
function payFunction(param) {
|
|
||||||
console.log(param);
|
|
||||||
window.open('./pay/?productId=' + param.productId + '&productName=' + param.productName + '&amount=' + param.amount + '&actorid=' + param.gameExtra + '&serverId=' + param.serverId, '_blank');
|
|
||||||
}
|
|
||||||
|
|
||||||
//4.工具类
|
|
||||||
function callJsFunction(msg) {
|
|
||||||
if (msg && msg['type']) {
|
|
||||||
switch (msg['type']) {
|
|
||||||
case 'showGame':
|
|
||||||
showGame();
|
|
||||||
break;
|
|
||||||
case 'showLoadProgress':
|
|
||||||
showLoadProgress(msg['progress'], msg['des']);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
//测试
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let jobAry = ['', '战士', '法师', '战士']
|
|
||||||
|
|
||||||
function ReportingFunction(msg) {
|
|
||||||
if (msg && msg) {
|
|
||||||
if (msg['type'] == 12 || msg['type'] == 1000) { //等级上报
|
|
||||||
//创建xhr对象
|
|
||||||
let reportingUrl = window['reportUrl'];
|
|
||||||
reportingUrl += '&do=' + encodeURIComponent('game_profile');
|
|
||||||
reportingUrl += '&udbid=' + encodeURIComponent(1024009155 + '');
|
|
||||||
reportingUrl += '&gam=' + encodeURIComponent(window['game'] + '');
|
|
||||||
reportingUrl += '&pas=';
|
|
||||||
reportingUrl += '&gse=' + encodeURIComponent('s1');
|
|
||||||
reportingUrl += '&pro=' + encodeURIComponent('logingame');
|
|
||||||
reportingUrl += '&ya_appid=' + encodeURIComponent('udblogin');
|
|
||||||
let json_data = {
|
|
||||||
game_event: msg['type'] == 12 ? 'new_role': 'level_change',
|
|
||||||
role_name: msg.data['roleName'],
|
|
||||||
role_level: msg.data['level'] + '',
|
|
||||||
fight_cap: '',
|
|
||||||
sex: msg.data['sex'] > 0 ? 'f': 'm',
|
|
||||||
job: jobAry[msg.data['job']],
|
|
||||||
partner: '',
|
|
||||||
equip: msg.data['guildName']
|
|
||||||
}
|
|
||||||
json_data = JSON.stringify(json_data);
|
|
||||||
reportingUrl += '&json_data=' + encodeURIComponent(json_data);
|
|
||||||
// json_data = { "role_level": "11", "role_name": "s1.虞鹏天", "game_event": "level_change", "fight_cap": "1371", "job": "1" }
|
|
||||||
var xhr = new XMLHttpRequest();
|
|
||||||
xhr.onreadystatechange = function() { //服务器返回值的处理函数,此处使用匿名函数进行实现
|
|
||||||
if (xhr.readyState == 4 && xhr.status == 200) { //
|
|
||||||
//var obj = JSON.parse(xhr.responseText);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
xhr.open('GET', reportingUrl, true); //提交get请求到服务器
|
|
||||||
xhr.send(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//6.屏蔽右键
|
|
||||||
document.onkeydown = function() {
|
|
||||||
// var e = window.event || arguments[0];
|
|
||||||
//F12
|
|
||||||
// if (e.keyCode == 123) {
|
|
||||||
// return false;
|
|
||||||
// //Ctrl+Shift+I
|
|
||||||
// } else if ((e.ctrlKey) && (e.shiftKey) && (e.keyCode == 73)) {
|
|
||||||
// return false;
|
|
||||||
// //Shift+F10
|
|
||||||
// } else if ((e.shiftKey) && (e.keyCode == 121)) {
|
|
||||||
// return false;
|
|
||||||
// //Ctrl+U
|
|
||||||
// } else if ((e.ctrlKey) && (e.keyCode == 85)) {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 反馈
|
|
||||||
*/
|
|
||||||
function feedbackFunction(info) {
|
|
||||||
removeIfram();
|
|
||||||
let msgInfo = {
|
|
||||||
act: 'feedback',
|
|
||||||
game: window['game'],
|
|
||||||
platform: window['pf'],
|
|
||||||
server: window['userInfo']['server'],
|
|
||||||
uid: info['uid'],
|
|
||||||
rolename: info['rolename'],
|
|
||||||
ts: Date.parse(new Date().toString()) / 1000
|
|
||||||
};
|
|
||||||
msgInfo['sign'] = new md5().hex_md5((msgInfo.game + msgInfo.platform + msgInfo.server + msgInfo.uid + msgInfo.rolename + msgInfo.ts + 123456));
|
|
||||||
let param = '';
|
|
||||||
for (let key in msgInfo) {
|
|
||||||
param += key + '=' + msgInfo[key] + '&'
|
|
||||||
}
|
|
||||||
param = param.substring(0, param.length - 1)
|
|
||||||
let srcStr = webUrl + '/api?' + param;
|
|
||||||
var div = document.createElement('div');
|
|
||||||
div.id = 'iframDiv';
|
|
||||||
div.innerHTML = '<iframe id="main" scrolling="no" noresize="true" frameborder="0" style="width: 90%;height: 90%;padding-left:5%;padding-top:2%;" src=' + srcStr + '></iframe>';
|
|
||||||
// div.style = 'position: relative; width:100%; height:100%;background: rgba(0, 0, 0, 0.5);';
|
|
||||||
div.style.position = 'relative';
|
|
||||||
div.style.width = '100%';
|
|
||||||
div.style.height = '100%';
|
|
||||||
div.style.background = 'rgba(0, 0, 0, 0.5)';
|
|
||||||
document.body.appendChild(div);
|
|
||||||
//创建关闭按钮
|
|
||||||
let div2 = document.createElement('div');
|
|
||||||
div2.id = 'btnDiv';
|
|
||||||
div2.innerHTML = '<img id="closeImg" src="static/img/close_btn.jpg?v=1" height="50" width="50" />'
|
|
||||||
// div2.style = 'position: absolute;right:0px;top:0px;width:50px;height:50px';
|
|
||||||
div2.style.position = 'absolute';
|
|
||||||
div2.style.right = '0px';
|
|
||||||
div2.style.top = '0px';
|
|
||||||
div2.style.width = '50px';
|
|
||||||
div2.style.height = '50px';
|
|
||||||
div.appendChild(div2);
|
|
||||||
var closeImg = document.getElementById('closeImg');
|
|
||||||
closeImg.onclick = removeIfram;
|
|
||||||
// onloadFunction();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 防沉迷
|
|
||||||
function IdCardFunction() {
|
|
||||||
window.open(webUrl);
|
|
||||||
}
|
|
||||||
|
|
||||||
function addQQGrp() {
|
|
||||||
window.open(window['kfQQGroupUrl']);
|
|
||||||
}
|
|
||||||
|
|
||||||
//下载YY游戏大厅
|
|
||||||
function downYYGameHallFun() {
|
|
||||||
window.open(webUrl);
|
|
||||||
}
|
|
||||||
|
|
||||||
//开通会员
|
|
||||||
function openYYVip() {
|
|
||||||
window.open(webUrl);
|
|
||||||
}
|
|
||||||
|
|
||||||
//开超玩会员
|
|
||||||
function openChaoWanVip() {
|
|
||||||
window.open(webUrl);
|
|
||||||
}
|
|
||||||
|
|
||||||
function removeIfram() {
|
|
||||||
var div = document.getElementById('iframDiv');
|
|
||||||
if (div) {
|
|
||||||
document.body.removeChild(div);
|
|
||||||
}
|
|
||||||
div = document.getElementById('btnDiv');
|
|
||||||
if (div) {
|
|
||||||
document.body.removeChild(div);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function bannerNight() {}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 屏蔽右键
|
|
||||||
*/
|
|
||||||
function stop() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
document.oncontextmenu = stop;
|
|
||||||
|
|
||||||
//监听屏幕 方向--暂时不用
|
|
||||||
window.onorientationchange = function(e) {
|
|
||||||
// var d = document.getElementById('screenHint');
|
|
||||||
// if (window.orientation == 180 || window.orientation == 0) {
|
|
||||||
// //竖屏状态
|
|
||||||
// d.style.display = 'none';
|
|
||||||
// }
|
|
||||||
// if (window.orientation == 90 || window.orientation == -90) {
|
|
||||||
// //横屏状态
|
|
||||||
// d.style.display = 'block';
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
//断开游戏链接
|
|
||||||
function closeSocket() {
|
|
||||||
Main.closesocket();
|
|
||||||
}
|
|
||||||
|
|
||||||
//加载项目工程
|
|
||||||
var loadScript = function(list, callback) {
|
|
||||||
var loaded = 0;
|
|
||||||
var loadNext = function() {
|
|
||||||
loadSingleScript(list[loaded], function() {
|
|
||||||
loaded++;
|
|
||||||
if (loaded >= list.length) {
|
|
||||||
callback();
|
|
||||||
} else {
|
|
||||||
loadNext();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
loadNext();
|
|
||||||
};
|
|
||||||
|
|
||||||
var loadTimes = 0;
|
|
||||||
var jsScr = '';
|
|
||||||
|
|
||||||
window['loadScript'] = loadScript;
|
|
||||||
|
|
||||||
var loadSingleScript = function(src, callback) {
|
|
||||||
if (jsScr != src) {
|
|
||||||
loadTimes = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(src.indexOf('lib') > -1 || src.indexOf('main') > -1) {
|
|
||||||
var mainSuffix = getQueryString('mainSuffix');
|
|
||||||
if(mainSuffix) {
|
|
||||||
src = src.replace('.js', mainSuffix + '.js');
|
|
||||||
}
|
|
||||||
src += '?v=' + (isJsDebug ? Math.random() : window['mainVersion']);
|
|
||||||
}
|
|
||||||
|
|
||||||
jsScr = src;
|
|
||||||
|
|
||||||
var s = document.createElement('script');
|
|
||||||
s.type = 'text/javascript';
|
|
||||||
s.async = false;
|
|
||||||
s.src = src;
|
|
||||||
|
|
||||||
s.addEventListener('load', function() {
|
|
||||||
s.parentNode.removeChild(s);
|
|
||||||
s.removeEventListener('load', arguments.callee, false);
|
|
||||||
callback();
|
|
||||||
}, false);
|
|
||||||
|
|
||||||
s.addEventListener('error', function() {
|
|
||||||
s.parentNode.removeChild(s);
|
|
||||||
s.removeEventListener('load', arguments.callee, false);
|
|
||||||
loadTimes++;
|
|
||||||
if (loadTimes > 5) {
|
|
||||||
alert("主程序文件加载失败,请检测网络刷新游戏!\n " + src);
|
|
||||||
} else {
|
|
||||||
setTimeout(function() {
|
|
||||||
loadSingleScript(src, callback);
|
|
||||||
}, 2000);
|
|
||||||
}
|
|
||||||
}, false);
|
|
||||||
document.body.appendChild(s);
|
|
||||||
};
|
|
||||||
|
|
||||||
//开始启动游戏
|
|
||||||
function start() {
|
|
||||||
//alert('维护中');
|
|
||||||
//return;
|
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest();
|
|
||||||
xhr.open('GET', './manifest.json?v=1.1.1.2', true); // '?v=' + Math.random()
|
|
||||||
|
|
||||||
xhr.addEventListener('load', function() {
|
|
||||||
var manifest = JSON.parse(xhr.response);
|
|
||||||
var list = manifest.initial.concat(manifest.game);
|
|
||||||
window['gameAppJS'] = manifest['gameAppJS'];
|
|
||||||
loadScript(list, function() {
|
|
||||||
egret.runEgret({
|
|
||||||
renderMode: 'webgl',
|
|
||||||
audioType: 0,
|
|
||||||
calculateCanvasScaleFactor: function(context) {
|
|
||||||
var backingStore = context.backingStorePixelRatio ||
|
|
||||||
context.webkitBackingStorePixelRatio ||
|
|
||||||
context.mozBackingStorePixelRatio ||
|
|
||||||
context.msBackingStorePixelRatio ||
|
|
||||||
context.oBackingStorePixelRatio ||
|
|
||||||
context.backingStorePixelRatio || 1;
|
|
||||||
return (window.devicePixelRatio || 1) / backingStore;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
xhr.send(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
//上报
|
|
||||||
reporting(10000, 1);
|
|
||||||
|
|
||||||
loginFunction();
|
|
||||||
18
package.json
Normal file
18
package.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"name": "chuanqi-web",
|
||||||
|
"private": true,
|
||||||
|
"version": "0.0.0",
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "vite",
|
||||||
|
"build": "vite build",
|
||||||
|
"preview": "vite preview"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"vue": "^3.5.21"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@vitejs/plugin-vue": "^6.0.1",
|
||||||
|
"vite": "^7.1.7"
|
||||||
|
}
|
||||||
|
}
|
||||||
75
pay/api.php
75
pay/api.php
@@ -1,75 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
天天支付 www.ttfk.cc
|
|
||||||
亲手写的代码。请保留信息!
|
|
||||||
对得起自己的职业操守!
|
|
||||||
**/
|
|
||||||
|
|
||||||
require_once("config.php");
|
|
||||||
require_once("lib/sub.php");
|
|
||||||
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<title>支付中心</title>
|
|
||||||
</head>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
/**************************请求参数**************************/
|
|
||||||
$notify_url = "http://".$_SERVER['HTTP_HOST']."/pay/notify_url.php";
|
|
||||||
//需http://格式的完整路径,不能加?id=123这类自定义参数
|
|
||||||
|
|
||||||
//页面跳转同步通知页面路径
|
|
||||||
$return_url = "https://www.youtube.com";
|
|
||||||
//需http://格式的完整路径,不能加?id=123这类自定义参数,不能写成http://localhost/
|
|
||||||
|
|
||||||
//商户订单号
|
|
||||||
$out_trade_no = 'zs_'.$_POST['WIDout_trade_no'];
|
|
||||||
//商户网站订单系统中唯一订单号,必填
|
|
||||||
|
|
||||||
|
|
||||||
//支付方式
|
|
||||||
$type = $_POST['type'];
|
|
||||||
//商品名称
|
|
||||||
$name = $_POST['game_name'];
|
|
||||||
//付款金额
|
|
||||||
$money = $_POST['money'];
|
|
||||||
//站点名称
|
|
||||||
$sitename = $yxm;
|
|
||||||
//必填
|
|
||||||
|
|
||||||
//订单描述
|
|
||||||
|
|
||||||
|
|
||||||
/************************************************************/
|
|
||||||
|
|
||||||
//构造要请求的参数数组,无需改动
|
|
||||||
$parameter = array(
|
|
||||||
"pid" => trim($alipay_config['partner']),
|
|
||||||
"type" => $type,
|
|
||||||
"notify_url" => $notify_url,
|
|
||||||
"return_url" => $return_url,
|
|
||||||
"out_trade_no" => $out_trade_no,
|
|
||||||
"name" => $name,
|
|
||||||
"money" => $money,
|
|
||||||
"sitename" => $sitename
|
|
||||||
);
|
|
||||||
|
|
||||||
//建立请求
|
|
||||||
$alipaySubmit = new AlipaySubmit($alipay_config);
|
|
||||||
$html_text = $alipaySubmit->buildRequestForm($parameter);
|
|
||||||
echo $html_text;
|
|
||||||
preg_match('@^(?:https://)?([^/]+)@i',
|
|
||||||
$alipay_config['apiurl'], $matches);
|
|
||||||
$host = $matches[1];
|
|
||||||
|
|
||||||
preg_match('/[^.]+\.[^.]+$/', $host, $matches);
|
|
||||||
if ($matches[0] !=$copy)
|
|
||||||
{
|
|
||||||
exit("当前api未授权!请使用www.ttfk.cc");
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
require '../config.php';
|
|
||||||
|
|
||||||
$id = '10328'; //商户id www.ttfk.cc 获取
|
|
||||||
$apikey = 'wjxrfmjxgm8ngmtn4w0th9luk21rpki9'; //商户密钥 www.ttfk.cc 获取
|
|
||||||
|
|
||||||
$yxm = $_CONFIG['game_name'];
|
|
||||||
$bili = '1'; // 写2 就是双倍领取
|
|
||||||
$pfid = $_CONFIG['pf_id'];
|
|
||||||
|
|
||||||
$wupin = array(
|
|
||||||
//'1' => 'com.game191.icelegend10', // test
|
|
||||||
'10' => 'com.game191.icelegend10',
|
|
||||||
'30' => 'com.game191.icelegend30',
|
|
||||||
'50' => 'com.game191.icelegend50',
|
|
||||||
'100' => 'com.game191.icelegend100',
|
|
||||||
'300' => 'com.game191.icelegend300',
|
|
||||||
'500' => 'com.game191.icelegend500',
|
|
||||||
'1000' => 'com.game191.icelegend1000',
|
|
||||||
'3000' => 'com.game191.icelegend3000',
|
|
||||||
);
|
|
||||||
|
|
||||||
$alipay_config['partner'] = $id;
|
|
||||||
$alipay_config['key'] = $apikey;
|
|
||||||
//签名方式 不需修改
|
|
||||||
$alipay_config['sign_type'] = strtoupper('MD5');
|
|
||||||
|
|
||||||
//字符编码格式 目前支持 gbk 或 utf-8
|
|
||||||
$alipay_config['input_charset'] = strtolower('utf-8');
|
|
||||||
|
|
||||||
//访问模式,根据自己的服务器是否支持ssl访问,若支持请选择https;若不支持请选择http
|
|
||||||
$alipay_config['transport'] = 'http';
|
|
||||||
$alipay_config['apiurl'] = 'https://www.ttfk.cc/';
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,legend,button,form,fieldset,input,textarea,p,blockquote,th,td{padding:0;margin:0;}
|
|
||||||
q:before,q:after{content:'';}
|
|
||||||
fieldset,img,abbr,acronym{border:0 none;}
|
|
||||||
abbr,acronym{font-variant:normal;}
|
|
||||||
legend{color:#000;}
|
|
||||||
address,caption,cite,code,dfn,em,strong,th,var{font-weight:normal;font-style:normal;}
|
|
||||||
sup{vertical-align:text-top;}
|
|
||||||
sub{vertical-align:text-bottom;}
|
|
||||||
table{border-collapse:collapse;border-spacing:0;}
|
|
||||||
caption,th{text-align:left;}
|
|
||||||
input,img,select{vertical-align:middle;}
|
|
||||||
ol,ul{list-style:none;}
|
|
||||||
input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;}
|
|
||||||
h1,h2,h3,h4,h5,h6{font-weight:normal;font-size:100%;}
|
|
||||||
del,ins,a{text-decoration:none;}
|
|
||||||
a:link{}
|
|
||||||
a:visited{}
|
|
||||||
input[type="submit"]{cursor:pointer;}
|
|
||||||
.content{width: 100%;float: left;}
|
|
||||||
button{cursor:pointer;}
|
|
||||||
input::-moz-focus-inner{border:0;padding:0;}
|
|
||||||
.clear{clear:both;}
|
|
||||||
.aaa,.aaaa{ border-radius: 5px; display: block;width: 30%;float: left;margin: 1% 0.5%;text-align: center;height: 2.5rem;line-height: 2.5rem;border: 1px solid #3369ff;color: #3369ff;}
|
|
||||||
.aaamoney{border-radius: 5px;border: none;width:100%;text-align: center;line-height: 2.5rem;}
|
|
||||||
.text-center{width: 80%;margin: 0 auto;}
|
|
||||||
p{color: #6262ff;font-weight: 800;}
|
|
||||||
.game_name{border-radius: 5px;height: 2.5rem;text-indent: 0.5rem;width: 100%;border: solid #627bff 1px;background: #fff;margin: 10px 0px;line-height: 2.5rem;}
|
|
||||||
.serverlist{border-radius: 5px;text-indent: 0.5rem;height: 2.5rem;width: 100%;border: solid #627bff 1px;background: #fff;margin: 10px 0px;color:#f46262;font-weight: 800;line-height: 2.5rem;}
|
|
||||||
.top_center{font-size: 2rem;margin: 1rem 1rem;color: #ff6767;font-weight: 800;}
|
|
||||||
.bottom{float: left;width: 100%;}
|
|
||||||
.bottom p{height:3rem;height: 3rem;width: 45%;float: left;background: #f8f8f8;margin: 10px 0px 10px 13px;line-height: 3rem;border-radius: 5px;}
|
|
||||||
.wxpay{background: url(/pay/img/wx.png) 50% 50% no-repeat;}
|
|
||||||
.alipay{ background: url(/pay/img/zfb.png) 40% 50% no-repeat;}
|
|
||||||
.bottom button{height: 3rem;width: 100%;border: solid 1px #3369ff;border-radius: 5px;}
|
|
||||||
input:-webkit-autofill {-webkit-box-shadow: 0 0 0px 1000px white inset !important;}
|
|
||||||
#autoBox{display:none; border: solid #627bff 1px;border-radius: 5px;}
|
|
||||||
#autoBox li{ border-bottom: dashed #627bff 1px; margin: 2% 5%; font-size: 1.1rem;height: 1.5rem;font-weight: 800;line-height: 1.5rem;}
|
|
||||||
#autoBox li span{float: right;color:#ff4141;}
|
|
||||||
form {width: 100%;height: 100%;float: left;}
|
|
||||||
.footer{float: left;margin: 0 auto;height: 3rem;width: 100%;
|
|
||||||
}
|
|
||||||
.footer p{text-align:center;margin-top:5%;}
|
|
||||||
.footer a{color: #f97474;}
|
|
||||||
BIN
pay/img/wx.png
BIN
pay/img/wx.png
Binary file not shown.
|
Before Width: | Height: | Size: 7.8 KiB |
BIN
pay/img/zfb.png
BIN
pay/img/zfb.png
Binary file not shown.
|
Before Width: | Height: | Size: 5.8 KiB |
@@ -1,69 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
天天支付 www.ttfk.cc
|
|
||||||
亲手写的代码。请保留信息!
|
|
||||||
对得起自己的职业操守!
|
|
||||||
**/
|
|
||||||
require 'config.php';
|
|
||||||
|
|
||||||
$serverid = htmlspecialchars(trim($_GET['serverId']));
|
|
||||||
$actorid = htmlspecialchars(trim($_GET['actorid']));
|
|
||||||
$money = htmlspecialchars(trim($_GET['amount']));
|
|
||||||
|
|
||||||
if(0 >= $money) exit('金额错误!');
|
|
||||||
if(!isset($serverid) || !isset($actorid)) exit('参数错误!');
|
|
||||||
|
|
||||||
$sid = intval(str_replace('s', '', $serverid));
|
|
||||||
$db_name = 'mir_actor_s'.$sid;
|
|
||||||
if(0 >= $sid) exit('区服ID错误!');
|
|
||||||
|
|
||||||
$conn = new mysqli($_CONFIG_DB['db_host'], $_CONFIG_DB['db_user'], $_CONFIG_DB['db_password'], $db_name, $_CONFIG_DB['db_port']);
|
|
||||||
// 检测连接
|
|
||||||
if ($conn->connect_error) {
|
|
||||||
die("连接失败: " . $conn->connect_error);
|
|
||||||
}
|
|
||||||
$stmt = $conn->prepare('SELECT actorname FROM `actors` WHERE actorid = ? limit 1');
|
|
||||||
$stmt->bind_param('s', $actorid);
|
|
||||||
$stmt->execute();
|
|
||||||
$result = $stmt->get_result();
|
|
||||||
$row = mysqli_fetch_assoc($result);
|
|
||||||
if(empty($row)) exit('找不到角色!');
|
|
||||||
|
|
||||||
$username = isset($row) ? $row['actorname'] : '';
|
|
||||||
$out_trade_no = date("YmdHis").mt_rand(100,999);
|
|
||||||
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
|
|
||||||
<link type="text/css" rel="stylesheet" href="./img/css/style.css" />
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
<title>赞助中心-<?=$_CONFIG['game_name']?></title>
|
|
||||||
</head>
|
|
||||||
<body >
|
|
||||||
<!-- <center class="top_center" ><?php echo $yxm?></center>
|
|
||||||
<form method="post" action="api.php" role="form">
|
|
||||||
<div class="text-center">
|
|
||||||
<p class="serverlist">区服 : <?php echo $serverid?></p>
|
|
||||||
<p class="serverlist">昵称 : <?php echo $username?></p>
|
|
||||||
<p class="serverlist">金额 : <?php echo $money?></p>
|
|
||||||
</div>
|
|
||||||
<div class="content">
|
|
||||||
<input type="hidden" class="game_name" id="game_name" value="<?php echo $serverid."_".$actorid."_".$username?>" autocomplete="off" name="game_name"/>
|
|
||||||
<input type="hidden" name="pid" value="<?php echo $id?>" />
|
|
||||||
<input class="form-control" placeholder="商户订单号" type="hidden" value="h5<?php echo $out_trade_no ?>" name="WIDout_trade_no" type="text" readonly="readonly">
|
|
||||||
<input type="hidden" class="aaa" autocomplete="off" value="<?php echo $money;?>" name="money"/>
|
|
||||||
</div>
|
|
||||||
<div class="bottom">
|
|
||||||
<p><button type="radio" value="wxpay" name="type" class="btn wxpay btn-success my-3"></button></p>
|
|
||||||
<p><button type="radio" value="alipay" name="type" class="btn alipay btn-success my-3"></button></p>
|
|
||||||
</div>
|
|
||||||
</form>-->
|
|
||||||
<div class="footer">
|
|
||||||
<p>想充值!没门儿~ 看游戏公告,免费后台充值哈~</p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
||||||
176
pay/lib/core.php
176
pay/lib/core.php
@@ -1,176 +0,0 @@
|
|||||||
<?php
|
|
||||||
/* *
|
|
||||||
* 支付宝接口公用函数
|
|
||||||
* 详细:该类是请求、通知返回两个文件所调用的公用函数核心处理文件
|
|
||||||
* 版本:3.3
|
|
||||||
* 日期:2019-07-19
|
|
||||||
* 说明:
|
|
||||||
* 以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写,并非一定要使用该代码。
|
|
||||||
* 该代码仅供学习和研究支付宝接口使用,只是提供一个参考。
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串
|
|
||||||
* @param $para 需要拼接的数组
|
|
||||||
* return 拼接完成以后的字符串
|
|
||||||
*/
|
|
||||||
function createLinkstring($para) {
|
|
||||||
$arg = "";
|
|
||||||
foreach ($para as $key => $val) {
|
|
||||||
$arg.=$key."=".$val."&";
|
|
||||||
}
|
|
||||||
//去掉最后一个&字符
|
|
||||||
$arg = substr($arg,0,count((array)$arg)-2);
|
|
||||||
|
|
||||||
//如果存在转义字符,那么去掉转义
|
|
||||||
if(function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()){$arg = stripslashes($arg);}
|
|
||||||
|
|
||||||
return $arg;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串,并对字符串做urlencode编码
|
|
||||||
* @param $para 需要拼接的数组
|
|
||||||
* return 拼接完成以后的字符串
|
|
||||||
*/
|
|
||||||
function createLinkstringUrlencode($para) {
|
|
||||||
$arg = "";
|
|
||||||
foreach ($para as $key => $val) {
|
|
||||||
$arg.=$key."=".urlencode($val)."&";
|
|
||||||
}
|
|
||||||
//去掉最后一个&字符
|
|
||||||
$arg = substr($arg,0,count($arg)-2);
|
|
||||||
|
|
||||||
//如果存在转义字符,那么去掉转义
|
|
||||||
if(function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()){$arg = stripslashes($arg);}
|
|
||||||
|
|
||||||
return $arg;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 除去数组中的空值和签名参数
|
|
||||||
* @param $para 签名参数组
|
|
||||||
* return 去掉空值与签名参数后的新签名参数组
|
|
||||||
*/
|
|
||||||
function paraFilter($para) {
|
|
||||||
$para_filter = array();
|
|
||||||
foreach ($para as $key => $val) {
|
|
||||||
if($key == "sign" || $key == "sign_type" || $val == "")continue;
|
|
||||||
else $para_filter[$key] = $para[$key];
|
|
||||||
}
|
|
||||||
return $para_filter;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 对数组排序
|
|
||||||
* @param $para 排序前的数组
|
|
||||||
* return 排序后的数组
|
|
||||||
*/
|
|
||||||
function argSort($para) {
|
|
||||||
ksort($para);
|
|
||||||
reset($para);
|
|
||||||
return $para;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 写日志,方便测试(看网站需求,也可以改成把记录存入数据库)
|
|
||||||
* 注意:服务器需要开通fopen配置
|
|
||||||
* @param $word 要写入日志里的文本内容 默认值:空值
|
|
||||||
*/
|
|
||||||
function logResult($word='') {
|
|
||||||
$fp = fopen("log.txt","a");
|
|
||||||
flock($fp, LOCK_EX) ;
|
|
||||||
fwrite($fp,"执行日期:".strftime("%Y%m%d%H%M%S",time())."\n".$word."\n");
|
|
||||||
flock($fp, LOCK_UN);
|
|
||||||
fclose($fp);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 远程获取数据,POST模式
|
|
||||||
* 注意:
|
|
||||||
* 1.使用Crul需要修改服务器中php.ini文件的设置,找到php_curl.dll去掉前面的";"就行了
|
|
||||||
* 2.文件夹中cacert.pem是SSL证书请保证其路径有效,目前默认路径是:getcwd().'\\cacert.pem'
|
|
||||||
* @param $url 指定URL完整路径地址
|
|
||||||
* @param $cacert_url 指定当前工作目录绝对路径
|
|
||||||
* @param $para 请求的数据
|
|
||||||
* @param $input_charset 编码格式。默认值:空值
|
|
||||||
* return 远程输出的数据
|
|
||||||
*/
|
|
||||||
function getHttpResponsePOST($url, $cacert_url, $para, $input_charset = '') {
|
|
||||||
|
|
||||||
if (trim($input_charset) != '') {
|
|
||||||
$url = $url."_input_charset=".$input_charset;
|
|
||||||
}
|
|
||||||
$curl = curl_init($url);
|
|
||||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);//SSL证书认证
|
|
||||||
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);//严格认证
|
|
||||||
curl_setopt($curl, CURLOPT_CAINFO,$cacert_url);//证书地址
|
|
||||||
curl_setopt($curl, CURLOPT_HEADER, 0 ); // 过滤HTTP头
|
|
||||||
curl_setopt($curl,CURLOPT_RETURNTRANSFER, 1);// 显示输出结果
|
|
||||||
curl_setopt($curl,CURLOPT_POST,true); // post传输数据
|
|
||||||
curl_setopt($curl,CURLOPT_POSTFIELDS,$para);// post传输数据
|
|
||||||
$responseText = curl_exec($curl);
|
|
||||||
//var_dump( curl_error($curl) );//如果执行curl过程中出现异常,可打开此开关,以便查看异常内容
|
|
||||||
curl_close($curl);
|
|
||||||
|
|
||||||
return $responseText;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 远程获取数据,GET模式
|
|
||||||
* 注意:
|
|
||||||
* 1.使用Crul需要修改服务器中php.ini文件的设置,找到php_curl.dll去掉前面的";"就行了
|
|
||||||
* 2.文件夹中cacert.pem是SSL证书请保证其路径有效,目前默认路径是:getcwd().'\\cacert.pem'
|
|
||||||
* @param $url 指定URL完整路径地址
|
|
||||||
* @param $cacert_url 指定当前工作目录绝对路径
|
|
||||||
* return 远程输出的数据
|
|
||||||
*/
|
|
||||||
function getHttpResponseGET($url,$cacert_url) {
|
|
||||||
$curl = curl_init($url);
|
|
||||||
curl_setopt($curl, CURLOPT_HEADER, 0 ); // 过滤HTTP头
|
|
||||||
curl_setopt($curl,CURLOPT_RETURNTRANSFER, 1);// 显示输出结果
|
|
||||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);//SSL证书认证
|
|
||||||
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);//严格认证
|
|
||||||
curl_setopt($curl, CURLOPT_CAINFO,$cacert_url);//证书地址
|
|
||||||
$responseText = curl_exec($curl);
|
|
||||||
//var_dump( curl_error($curl) );//如果执行curl过程中出现异常,可打开此开关,以便查看异常内容
|
|
||||||
curl_close($curl);
|
|
||||||
|
|
||||||
return $responseText;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 实现多种字符编码方式
|
|
||||||
* @param $input 需要编码的字符串
|
|
||||||
* @param $_output_charset 输出的编码格式
|
|
||||||
* @param $_input_charset 输入的编码格式
|
|
||||||
* return 编码后的字符串
|
|
||||||
*/
|
|
||||||
function charsetEncode($input,$_output_charset ,$_input_charset) {
|
|
||||||
$output = "";
|
|
||||||
if(!isset($_output_charset) )$_output_charset = $_input_charset;
|
|
||||||
if($_input_charset == $_output_charset || $input ==null ) {
|
|
||||||
$output = $input;
|
|
||||||
} elseif (function_exists("mb_convert_encoding")) {
|
|
||||||
$output = mb_convert_encoding($input,$_output_charset,$_input_charset);
|
|
||||||
} elseif(function_exists("iconv")) {
|
|
||||||
$output = iconv($_input_charset,$_output_charset,$input);
|
|
||||||
} else die("sorry, you have no libs support for charset change.");
|
|
||||||
return $output;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 实现多种字符解码方式
|
|
||||||
* @param $input 需要解码的字符串
|
|
||||||
* @param $_output_charset 输出的解码格式
|
|
||||||
* @param $_input_charset 输入的解码格式
|
|
||||||
* return 解码后的字符串
|
|
||||||
*/
|
|
||||||
function charsetDecode($input,$_input_charset ,$_output_charset) {
|
|
||||||
$output = "";
|
|
||||||
if(!isset($_input_charset) )$_input_charset = $_input_charset ;
|
|
||||||
if($_input_charset == $_output_charset || $input ==null ) {
|
|
||||||
$output = $input;
|
|
||||||
} elseif (function_exists("mb_convert_encoding")) {
|
|
||||||
$output = mb_convert_encoding($input,$_output_charset,$_input_charset);
|
|
||||||
} elseif(function_exists("iconv")) {
|
|
||||||
$output = iconv($_input_charset,$_output_charset,$input);
|
|
||||||
} else die("sorry, you have no libs support for charset changes.");
|
|
||||||
return $output;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
<?php
|
|
||||||
/* *
|
|
||||||
* MD5
|
|
||||||
* 详细:MD5加密
|
|
||||||
* 版本:3.3
|
|
||||||
* 日期:2019-07-19
|
|
||||||
* 说明:
|
|
||||||
* 以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写,并非一定要使用该代码。
|
|
||||||
* 该代码仅供学习和研究支付宝接口使用,只是提供一个参考。
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 签名字符串
|
|
||||||
* @param $prestr 需要签名的字符串
|
|
||||||
* @param $key 私钥
|
|
||||||
* return 签名结果
|
|
||||||
*/
|
|
||||||
function md5Sign($prestr, $key) {
|
|
||||||
$prestr = $prestr . $key;
|
|
||||||
return md5($prestr);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 验证签名
|
|
||||||
* @param $prestr 需要签名的字符串
|
|
||||||
* @param $sign 签名结果
|
|
||||||
* @param $key 私钥
|
|
||||||
* return 签名结果
|
|
||||||
*/
|
|
||||||
function md5Verify($prestr, $sign, $key) {
|
|
||||||
$prestr = $prestr . $key;
|
|
||||||
$mysgin = md5($prestr);
|
|
||||||
|
|
||||||
if($mysgin == $sign) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
@@ -1,120 +0,0 @@
|
|||||||
<?php
|
|
||||||
/* *
|
|
||||||
* 功能:天天支付通知处理类
|
|
||||||
* 详细:处理易支付接口通知返回
|
|
||||||
*/
|
|
||||||
|
|
||||||
require_once("core.php");
|
|
||||||
require_once("md5.php");
|
|
||||||
|
|
||||||
class AlipayNotify {
|
|
||||||
|
|
||||||
var $alipay_config;
|
|
||||||
|
|
||||||
function __construct($alipay_config){
|
|
||||||
$this->alipay_config = $alipay_config;
|
|
||||||
$this->http_verify_url = $this->alipay_config['apiurl'].'api.php?';
|
|
||||||
}
|
|
||||||
function AlipayNotify($alipay_config) {
|
|
||||||
$this->__construct($alipay_config);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 针对notify_url验证消息是否是支付宝发出的合法消息
|
|
||||||
* @return 验证结果
|
|
||||||
*/
|
|
||||||
function verifyNotify(){
|
|
||||||
if(empty($_POST)) {//判断POST来的数组是否为空
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
//生成签名结果
|
|
||||||
$isSign = $this->getSignVeryfy($_POST, $_POST["sign"]);
|
|
||||||
//获取支付宝远程服务器ATN结果(验证是否是支付宝发来的消息)
|
|
||||||
$responseTxt = 'true';
|
|
||||||
//if (! empty($_POST["notify_id"])) {$responseTxt = $this->getResponse($_POST["notify_id"]);}
|
|
||||||
|
|
||||||
//验证
|
|
||||||
//$responsetTxt的结果不是true,与服务器设置问题、合作身份者ID、notify_id一分钟失效有关
|
|
||||||
//isSign的结果不是true,与安全校验码、请求时的参数格式(如:带自定义参数等)、编码格式有关
|
|
||||||
if (preg_match("/true$/i",$responseTxt) && $isSign) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 针对return_url验证消息是否是支付宝发出的合法消息
|
|
||||||
* @return 验证结果
|
|
||||||
*/
|
|
||||||
function verifyReturn(){
|
|
||||||
if(empty($_POST)) {//判断POST来的数组是否为空
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
//生成签名结果
|
|
||||||
$isSign = $this->getSignVeryfy($_POST, $_POST["sign"]);
|
|
||||||
//获取支付宝远程服务器ATN结果(验证是否是支付宝发来的消息)
|
|
||||||
$responseTxt = 'true';
|
|
||||||
//if (! empty($_POST["notify_id"])) {$responseTxt = $this->getResponse($_POST["notify_id"]);}
|
|
||||||
|
|
||||||
//验证
|
|
||||||
//$responsetTxt的结果不是true,与服务器设置问题、合作身份者ID、notify_id一分钟失效有关
|
|
||||||
//isSign的结果不是true,与安全校验码、请求时的参数格式(如:带自定义参数等)、编码格式有关
|
|
||||||
if (preg_match("/true$/i",$responseTxt) && $isSign) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取返回时的签名验证结果
|
|
||||||
* @param $para_temp 通知返回来的参数数组
|
|
||||||
* @param $sign 返回的签名结果
|
|
||||||
* @return 签名验证结果
|
|
||||||
*/
|
|
||||||
function getSignVeryfy($para_temp, $sign) {
|
|
||||||
//除去待签名参数数组中的空值和签名参数
|
|
||||||
$para_filter = paraFilter($para_temp);
|
|
||||||
|
|
||||||
//对待签名参数数组排序
|
|
||||||
$para_sort = argSort($para_filter);
|
|
||||||
|
|
||||||
//把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串
|
|
||||||
$prestr = createLinkstring($para_sort);
|
|
||||||
|
|
||||||
$isSgin = false;
|
|
||||||
$isSgin = md5Verify($prestr, $sign, $this->alipay_config['key']);
|
|
||||||
|
|
||||||
return $isSgin;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取远程服务器ATN结果,验证返回URL
|
|
||||||
* @param $notify_id 通知校验ID
|
|
||||||
* @return 服务器ATN结果
|
|
||||||
* 验证结果集:
|
|
||||||
* invalid命令参数不对 出现这个错误,请检测返回处理中partner和key是否为空
|
|
||||||
* true 返回正确信息
|
|
||||||
* false 请检查防火墙或者是服务器阻止端口问题以及验证时间是否超过一分钟
|
|
||||||
*/
|
|
||||||
function getResponse($notify_id) {
|
|
||||||
$transport = strtolower(trim($this->alipay_config['transport']));
|
|
||||||
$partner = trim($this->alipay_config['partner']);
|
|
||||||
$veryfy_url = '';
|
|
||||||
if($transport == 'https') {
|
|
||||||
$veryfy_url = $this->https_verify_url;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$veryfy_url = $this->http_verify_url;
|
|
||||||
}
|
|
||||||
$veryfy_url = $veryfy_url."partner=" . $partner . "¬ify_id=" . $notify_id;
|
|
||||||
$responseTxt = getHttpResponseGET($veryfy_url, $this->alipay_config['cacert']);
|
|
||||||
|
|
||||||
return $responseTxt;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
103
pay/lib/sub.php
103
pay/lib/sub.php
@@ -1,103 +0,0 @@
|
|||||||
<?php
|
|
||||||
$copy = "ttfk.cc";
|
|
||||||
preg_match('@^(?:https://)?([^/]+)@i',
|
|
||||||
$alipay_config['apiurl'], $matches);
|
|
||||||
$host = $matches[1];
|
|
||||||
|
|
||||||
preg_match('/[^.]+\.[^.]+$/', $host, $matches);
|
|
||||||
if ($matches[0] !=$copy)
|
|
||||||
{
|
|
||||||
exit("当前api未授权!请使用www.ttfk.cc");
|
|
||||||
}
|
|
||||||
|
|
||||||
require_once("core.php");
|
|
||||||
require_once("md5.php");
|
|
||||||
|
|
||||||
class AlipaySubmit {
|
|
||||||
|
|
||||||
var $alipay_config;
|
|
||||||
|
|
||||||
function __construct($alipay_config){
|
|
||||||
$this->alipay_config = $alipay_config;
|
|
||||||
$this->alipay_gateway_new = $this->alipay_config['apiurl'].'submit.php?';
|
|
||||||
}
|
|
||||||
function AlipaySubmit($alipay_config) {
|
|
||||||
$this->__construct($alipay_config);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生成签名结果
|
|
||||||
* @param $para_sort 已排序要签名的数组
|
|
||||||
* return 签名结果字符串
|
|
||||||
*/
|
|
||||||
function buildRequestMysign($para_sort) {
|
|
||||||
//把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串
|
|
||||||
$prestr = createLinkstring($para_sort);
|
|
||||||
|
|
||||||
$mysign = md5Sign($prestr, $this->alipay_config['key']);
|
|
||||||
|
|
||||||
return $mysign;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生成要请求给支付宝的参数数组
|
|
||||||
* @param $para_temp 请求前的参数数组
|
|
||||||
* @return 要请求的参数数组
|
|
||||||
*/
|
|
||||||
function buildRequestPara($para_temp) {
|
|
||||||
//除去待签名参数数组中的空值和签名参数
|
|
||||||
$para_filter = paraFilter($para_temp);
|
|
||||||
|
|
||||||
//对待签名参数数组排序
|
|
||||||
$para_sort = argSort($para_filter);
|
|
||||||
|
|
||||||
//生成签名结果
|
|
||||||
$mysign = $this->buildRequestMysign($para_sort);
|
|
||||||
|
|
||||||
//签名结果与签名方式加入请求提交参数组中
|
|
||||||
$para_sort['sign'] = $mysign;
|
|
||||||
$para_sort['sign_type'] = strtoupper(trim($this->alipay_config['sign_type']));
|
|
||||||
|
|
||||||
return $para_sort;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生成要请求给支付宝的参数数组
|
|
||||||
* @param $para_temp 请求前的参数数组
|
|
||||||
* @return 要请求的参数数组字符串
|
|
||||||
*/
|
|
||||||
function buildRequestParaToString($para_temp) {
|
|
||||||
//待请求参数数组
|
|
||||||
$para = $this->buildRequestPara($para_temp);
|
|
||||||
|
|
||||||
//把参数组中所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串,并对字符串做urlencode编码
|
|
||||||
$request_data = createLinkstringUrlencode($para);
|
|
||||||
|
|
||||||
return $request_data;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 建立请求,以表单HTML形式构造(默认)
|
|
||||||
* @param $para_temp 请求参数数组
|
|
||||||
* @param $method 提交方式。两个值可选:post、get
|
|
||||||
* @param $button_name 确认按钮显示文字
|
|
||||||
* @return 提交表单HTML文本
|
|
||||||
*/
|
|
||||||
function buildRequestForm($para_temp, $method='POST', $button_name='正在跳转') {
|
|
||||||
//待请求参数数组
|
|
||||||
$para = $this->buildRequestPara($para_temp);
|
|
||||||
|
|
||||||
$sHtml = "<form id='alipaysubmit' name='alipaysubmit' action='".$this->alipay_gateway_new."_input_charset=".trim(strtolower($this->alipay_config['input_charset']))."' method='".$method."'>";
|
|
||||||
foreach ($para as $key => $val) {
|
|
||||||
$sHtml.= "<input type='hidden' name='".$key."' value='".$val."'/>";
|
|
||||||
}
|
|
||||||
|
|
||||||
//submit按钮控件请不要含有name属性
|
|
||||||
$sHtml = $sHtml."<input type='submit' value='".$button_name."'></form>";
|
|
||||||
|
|
||||||
$sHtml = $sHtml."<script>document.forms['alipaysubmit'].submit();</script>";
|
|
||||||
|
|
||||||
return $sHtml;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
@@ -1,137 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/* 支付回调 */
|
|
||||||
|
|
||||||
require_once 'config.php';
|
|
||||||
require_once 'lib/notify.php';
|
|
||||||
|
|
||||||
error_reporting(E_ALL & ~E_NOTICE);
|
|
||||||
|
|
||||||
function payLog($exit = false, $msg = '') {
|
|
||||||
global $_POST;
|
|
||||||
|
|
||||||
$date = date('Y-m-d');
|
|
||||||
|
|
||||||
// 创建日志目录
|
|
||||||
$path = '../log/';
|
|
||||||
if(!is_dir($path)) {
|
|
||||||
@mkdir($path, 0777, true);
|
|
||||||
}
|
|
||||||
$file = 'pay_'.$date.'_'.md5($date.BASE_KEY).'.log';
|
|
||||||
$logFile = $path.$file;
|
|
||||||
|
|
||||||
file_put_contents($logFile, '['.date('Y-m-d H:i:s').'] '.$msg.PHP_EOL.(isset($_POST) && !empty($_POST) ? print_r($_POST, true).PHP_EOL : ''), FILE_APPEND);
|
|
||||||
if($exit) exit($msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
$time = time();
|
|
||||||
|
|
||||||
if(get_extension_funcs('mysqli') == false) payLog(true, 'mysqli扩展未启用!');
|
|
||||||
|
|
||||||
// 检查参数
|
|
||||||
if(!isset($_POST['sign'])) {
|
|
||||||
$_POST = $_GET;
|
|
||||||
}
|
|
||||||
if(!isset($_POST) || empty($_POST)) payLog(true, 'POST参数错误!');
|
|
||||||
|
|
||||||
$money = floatval($_POST['money']);
|
|
||||||
if(0 >= $money) payLog(true, '金额错误!');
|
|
||||||
|
|
||||||
$arr = explode('_', $_POST['name']);
|
|
||||||
$serverId = $arr['0'];
|
|
||||||
$roleId = $arr['1'];
|
|
||||||
$username = $arr['2'];
|
|
||||||
if(!isset($serverId) || !isset($roleId) || !isset($username)) payLog(true, 'serverId/roleId/username参数错误!');
|
|
||||||
|
|
||||||
$sid = intval(str_replace('s', '', $serverId));
|
|
||||||
$db_name = 'mir_actor_s'.$sid;
|
|
||||||
if(0 >= $sid) payLog(true, '区服ID错误!');
|
|
||||||
|
|
||||||
// 计算得出通知验证结果
|
|
||||||
$alipayNotify = new AlipayNotify($alipay_config);
|
|
||||||
$verify_result = $alipayNotify->verifyNotify();
|
|
||||||
if(!$verify_result) {
|
|
||||||
payLog(true, '签名验证失败');
|
|
||||||
}
|
|
||||||
|
|
||||||
// 连接区服数据库
|
|
||||||
$actorDB = new mysqli($_CONFIG_DB['db_host'], $_CONFIG_DB['db_user'], $_CONFIG_DB['db_password'], $db_name, $_CONFIG_DB['db_port']);
|
|
||||||
if ($actorDB->connect_error) payLog(true, '区服数据库连接失败: '.$actorDB->connect_error);
|
|
||||||
|
|
||||||
$feeSQL = "INSERT INTO `feecallback` (`pfid`, `serverid`, `actorid`, `account`, `prodid`, `num`, `oldserverid`) VALUES ('$pfid', '$sid', '$roleId', '$username', '{$wupin["$money"]}', '$bili', '1')";
|
|
||||||
|
|
||||||
// FEE插入成功
|
|
||||||
if (TRUE === $actorDB->query($feeSQL)) {
|
|
||||||
payLog(false, 'fee insert success'.PHP_EOL.$feeSQL);
|
|
||||||
|
|
||||||
// 连接订单数据库
|
|
||||||
$orderDB = new mysqli($_CONFIG_DB['db_host'], $_CONFIG_DB['db_user'], $_CONFIG_DB['db_password'], $_CONFIG_DB['db_name'], $_CONFIG_DB['db_port']);
|
|
||||||
if ($orderDB->connect_error) {
|
|
||||||
$actorDB->close();
|
|
||||||
payLog(true, '订单数据库连接失败: '.$orderDB->connect_error);
|
|
||||||
}
|
|
||||||
|
|
||||||
// test
|
|
||||||
//payLog(false, 'fee insert success 1');
|
|
||||||
|
|
||||||
// 根据角色ID获取帐号ID
|
|
||||||
$actorRes = $actorDB->query("SELECT accountid, actorname FROM `actors` WHERE actorid = $roleId LIMIT 1");
|
|
||||||
$actor = $actorRes->fetch_array(MYSQLI_ASSOC);
|
|
||||||
$actorRes->free();
|
|
||||||
if(empty($actor)) {
|
|
||||||
$orderDB->close();
|
|
||||||
$actorDB->close();
|
|
||||||
payLog(true, '获取accountid失败');
|
|
||||||
}
|
|
||||||
$accountId = $actor['accountid'];
|
|
||||||
$roleName = $actor['actorname'];
|
|
||||||
|
|
||||||
// test
|
|
||||||
//payLog(false, 'fee insert success 2');
|
|
||||||
|
|
||||||
// 连接帐号数据库
|
|
||||||
$accountDB = new mysqli($_CONFIG_DB['db_host'], $_CONFIG_DB['db_user'], $_CONFIG_DB['db_password'], 'mir_account', $_CONFIG_DB['db_port']);
|
|
||||||
if ($accountDB->connect_error) {
|
|
||||||
$orderDB->close();
|
|
||||||
$actorDB->close();
|
|
||||||
payLog(true, '帐号数据库连接失败: '.$accountDB->connect_error);
|
|
||||||
}
|
|
||||||
|
|
||||||
// test
|
|
||||||
//payLog(false, 'fee insert success 3');
|
|
||||||
|
|
||||||
// 根据帐号ID获取帐号
|
|
||||||
$accountRes = $accountDB->query("SELECT account FROM `globaluser` WHERE userid = $accountId LIMIT 1");
|
|
||||||
$accountData = $accountRes->fetch_array(MYSQLI_ASSOC);
|
|
||||||
$accountRes->free();
|
|
||||||
if(empty($accountData)) {
|
|
||||||
$orderDB->close();
|
|
||||||
$actorDB->close();
|
|
||||||
$accountDB->close();
|
|
||||||
payLog(true, '获取account失败');
|
|
||||||
}
|
|
||||||
$account = $accountData['account'];
|
|
||||||
|
|
||||||
// test
|
|
||||||
//payLog(false, 'fee insert success 4');
|
|
||||||
|
|
||||||
// 创建订单记录
|
|
||||||
$orderSQL = "INSERT INTO `order` (`account`, `server_id`, `role_id`, `role_name`, `product`, `money`, `time`) VALUES ('$account', '$sid', '$roleId', '$roleName', '{$wupin["$money"]}', '$money', '$time')";
|
|
||||||
if (FALSE === $orderDB->query($orderSQL)) {
|
|
||||||
payLog(false, 'order create fail'.PHP_EOL.$orderSQL.PHP_EOL.'sql error: '.$orderDB->error);
|
|
||||||
}
|
|
||||||
|
|
||||||
// test
|
|
||||||
//payLog(false, 'fee insert success 5');
|
|
||||||
|
|
||||||
$actorDB->close();
|
|
||||||
$orderDB->close();
|
|
||||||
$accountDB->close();
|
|
||||||
|
|
||||||
exit('success');
|
|
||||||
} else {
|
|
||||||
$actorDB->close();
|
|
||||||
payLog(false, 'fee insert fail'.PHP_EOL.$feeSQL.PHP_EOL.'sql error: '.$actorDB->error);
|
|
||||||
|
|
||||||
exit('Error: '.$feeSQL.'<br>'.$actorDB->error);
|
|
||||||
}
|
|
||||||
209
play.php
209
play.php
@@ -1,209 +0,0 @@
|
|||||||
<!--
|
|
||||||
* 冰雪传奇H5
|
|
||||||
* 2022 XX信息科技有限公司
|
|
||||||
*
|
|
||||||
* @author 123456
|
|
||||||
* @wx 123456
|
|
||||||
* @qq 123456
|
|
||||||
-->
|
|
||||||
<?php
|
|
||||||
|
|
||||||
include 'config.php';
|
|
||||||
include 'function.php';
|
|
||||||
|
|
||||||
$isMobile = isMobile();
|
|
||||||
|
|
||||||
?>
|
|
||||||
<!DOCTYPE HTML>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
|
|
||||||
<title><?=$_CONFIG['game_name']?> <?=$_CONFIG['game_description']?></title>
|
|
||||||
<meta name="description" content="<?=$_CONFIG['game_name']?> <?=$_CONFIG['game_description']?>">
|
|
||||||
<meta name="keywords" content="<?=$_CONFIG['game_name']?>,<?=$_CONFIG['game_description']?>">
|
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
||||||
<meta name="full-screen" content="true" />
|
|
||||||
<meta name="screen-orientation" content="portrait" />
|
|
||||||
<meta name="x5-fullscreen" content="true" />
|
|
||||||
<meta name="360-fullscreen" content="true" />
|
|
||||||
<style>
|
|
||||||
html, body {
|
|
||||||
-ms-touch-action: none;
|
|
||||||
background: #000000;
|
|
||||||
cursor: default;
|
|
||||||
padding: 0;
|
|
||||||
border: 0;
|
|
||||||
margin: 0;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
a { cursor: pointer; text-decoration: underline; }
|
|
||||||
.link_color { color: yellow; }
|
|
||||||
.font_small, .font_small a { font-size: 14px; }
|
|
||||||
#label { font-size: 18px; }
|
|
||||||
@media screen and (max-height: 480px) {
|
|
||||||
#label { font-size: 14px; }
|
|
||||||
}
|
|
||||||
@media screen and (max-width: 480px) {
|
|
||||||
#label { font-size: 14px; }
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script>
|
|
||||||
try {
|
|
||||||
window.external.OpenGameWindowNew(window.location.href, '', '', '', false);
|
|
||||||
} catch(e) {}
|
|
||||||
</script>
|
|
||||||
<script>
|
|
||||||
document.onkeydown = document.onkeyup = document.onkeypress = function(event) {
|
|
||||||
var e = event || window.event || arguments.callee.caller.arguments[0];
|
|
||||||
if (e && e.keyCode == 123) {
|
|
||||||
e.returnValue = false;
|
|
||||||
return (false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<script src="static/js/md5.js"></script>
|
|
||||||
<script src="static/js/common.js?v=1"></script>
|
|
||||||
</head>
|
|
||||||
<body oncontextmenu="return false" onselectstart="return false" ondragstart="return false">
|
|
||||||
<div id="mainDiv" style="margin: auto; width: 100%; height: 100%;" class="egret-player" data-entry-class="Main" <?=(!$isMobile ? 'data-orientation="auto" data-scale-mode="noScale" data-frame-rate="60" data-content-width="1920" data-content-height="1280"' : 'data-orientation="landscape" data-scale-mode="fixedHeight" data-frame-rate="30" data-content-width="1334" data-content-height="750"')?> data-multi-fingered="2" data-show-fps="false" data-show-log="false" data-show-fps-style="x:0,y:0,size:12,textColor:0xffffff,bgAlpha:0.9">
|
|
||||||
<div id="logDiv" style="position:absolute; width: 100%; height: 100%;">
|
|
||||||
<table align="center" id="loadBox" style="color: #b4792e; font-size: 20px; padding-top: 25px;">
|
|
||||||
<tr>
|
|
||||||
<td align="center">
|
|
||||||
<img id="logoImg" align="center" width="380" src="resource_Publish/assets/login/logoGameCat.png" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td id="label" style="padding: 25px 35px 10px; text-align: center;">
|
|
||||||
首次加载时间较长……请耐心等待,如长时间无响应 <span class="font_small"><a onClick="window.location.reload()" class="link_color">请点此刷新</a> / <a onClick="window.history.back()" class="link_color">点击返回</a></span>
|
|
||||||
<br/>
|
|
||||||
加载完成送:大量银两、超值礼包、白卡特权
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="center">
|
|
||||||
<div style="width: 200px; height: 6px; background-color: #ffffff;">
|
|
||||||
<div id="loadBar1" style="width: 30px; height: 6px; background-color: #8E44AD; float: left"></div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="center">
|
|
||||||
<div align="center" style="width: 200px; height: 6px; background-color: #ffffff;">
|
|
||||||
<div id="loadBar2" style="width: 70px; height: 6px; background-color: #ff7700; float: left"></div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script>
|
|
||||||
var isMobile = isMobile(),
|
|
||||||
loadBar1Width = 0,
|
|
||||||
loadBar2Width = 0,
|
|
||||||
setIntervalId = 0,
|
|
||||||
loadBar2MaxWidth = 200,
|
|
||||||
loadError = false;
|
|
||||||
|
|
||||||
var loadBox = document.getElementById('loadBox'),
|
|
||||||
logoImg = document.getElementById('logoImg'),
|
|
||||||
loadBar1 = document.getElementById('loadBar1'),
|
|
||||||
loadBar2 = document.getElementById('loadBar2');
|
|
||||||
|
|
||||||
function updateLoadBar() {
|
|
||||||
/* TODO:后续改用事件监听 */
|
|
||||||
var screenWidth = document.documentElement.scrollWidth || document.body.scrollWidth,
|
|
||||||
screenHeight = document.documentElement.scrollHeight || document.body.scrollHeight,
|
|
||||||
smallScreen = screenWidth <= 0,
|
|
||||||
isHorizontal = isMobile && screenHeight <= 590,
|
|
||||||
isPhone = isMobile && smallScreen;
|
|
||||||
|
|
||||||
if(loadBox) {
|
|
||||||
loadBox.style.paddingTop = (!isHorizontal ? (screenHeight / 4) : 50) + 'px';
|
|
||||||
}
|
|
||||||
if(logoImg) {
|
|
||||||
logoImg.width = isHorizontal || smallScreen ? 300 : 500;
|
|
||||||
}
|
|
||||||
//console.log('updateLoadBar, isHorizontal=' + isHorizontal + ', width=' + screenWidth + ', height=' + screenHeight + ', logoWidth=' + logoImg.width + ', boxPaddingTop=' + loadBox.style.paddingTop);
|
|
||||||
|
|
||||||
if(loadError) {
|
|
||||||
//console.log('loadError=' + loadError);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(loadBar1) {
|
|
||||||
loadBar1Width += 20;
|
|
||||||
if (loadBar1Width > 100) {
|
|
||||||
loadBar1Width = 0;
|
|
||||||
}
|
|
||||||
loadBar1.style.width = loadBar1Width + '%';
|
|
||||||
//console.log('play updateLoadBar loadBar1 width=' + loadBar1Width);
|
|
||||||
}
|
|
||||||
if(loadBar2) {
|
|
||||||
loadBar2Width += 3;
|
|
||||||
if ((loadBar2Width / loadBar2MaxWidth * 100) > 100) {
|
|
||||||
loadBarFull();
|
|
||||||
} else {
|
|
||||||
loadBar2.style.width = loadBar2Width + 'px';
|
|
||||||
}
|
|
||||||
//console.log('play updateLoadBar loadBar2 width=' + loadBar2Width);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function startLoadBar() {
|
|
||||||
//console.log('play startLoadBar');
|
|
||||||
setIntervalId = self.setInterval(updateLoadBar, 100);
|
|
||||||
}
|
|
||||||
|
|
||||||
function loadBarFull() {
|
|
||||||
loadBar2.style.width = loadBar2MaxWidth + 'px';
|
|
||||||
}
|
|
||||||
|
|
||||||
function loadBarClear() {
|
|
||||||
window.clearInterval(setIntervalId);
|
|
||||||
}
|
|
||||||
|
|
||||||
function removeLogDiv() {
|
|
||||||
//console.log('play removeLogDiv');
|
|
||||||
loadBarClear();
|
|
||||||
|
|
||||||
loadBarFull();
|
|
||||||
|
|
||||||
setTimeout(function() {
|
|
||||||
var mainDiv = document.getElementById('mainDiv'),
|
|
||||||
logDiv = document.getElementById('logDiv');
|
|
||||||
if (logDiv && mainDiv) {
|
|
||||||
//console.log('play removeLogDiv removeChild');
|
|
||||||
mainDiv.removeChild(logDiv);
|
|
||||||
}
|
|
||||||
}, 1e3);
|
|
||||||
}
|
|
||||||
|
|
||||||
window.onload = function () {
|
|
||||||
startLoadBar();
|
|
||||||
if ((typeof(Worker) !== 'undefined')) {
|
|
||||||
var s = document.createElement('script');
|
|
||||||
s.type = 'text/javascript';
|
|
||||||
s.async = false;
|
|
||||||
s.addEventListener('load', function () {
|
|
||||||
s.parentNode.removeChild(s);
|
|
||||||
s.removeEventListener('load', arguments.callee, false);
|
|
||||||
}, false);
|
|
||||||
s.src = 'js/index.js?v=' + Math.random();
|
|
||||||
document.body.appendChild(s);
|
|
||||||
} else {
|
|
||||||
loadError = true;
|
|
||||||
//console.log('loadError=' + loadError);
|
|
||||||
var errorMsg = '抱歉!您的浏览器不支持本游戏,请更换浏览器或前往<?=$_CONFIG['game_name']?>官网 <span class="font_small"><a href="' + getHttp() + location.host + '" target="_blank" class="link_color">下载' + (isMobile ? 'APP' : '微端') + '</a></span> 进行游戏!',
|
|
||||||
label = document.getElementById('label');
|
|
||||||
if(label) {
|
|
||||||
label.innerHTML = errorMsg;
|
|
||||||
} else {
|
|
||||||
alert(filterHTML(errorMsg));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
503
public/js/index.js
Normal file
503
public/js/index.js
Normal file
@@ -0,0 +1,503 @@
|
|||||||
|
/**
|
||||||
|
* 冰雪传奇H5
|
||||||
|
* 2022 XX信息科技有限公司
|
||||||
|
*
|
||||||
|
* @author 123456
|
||||||
|
* @wx 123456
|
||||||
|
* @qq 123456
|
||||||
|
*/
|
||||||
|
|
||||||
|
let host = window.location.hostname || '100.88.157.105';
|
||||||
|
let port = 80;
|
||||||
|
|
||||||
|
const webUrl = getHttp() + host + (port && 80 != port ? ':' + port : ''),
|
||||||
|
account = getQueryString('account'),
|
||||||
|
token = getQueryString('token'),
|
||||||
|
noLogin = !account || !token;
|
||||||
|
|
||||||
|
if (noLogin) {
|
||||||
|
setTimeout(function () {
|
||||||
|
loadBarClear();
|
||||||
|
loadBarFull();
|
||||||
|
setTimeout(function () {
|
||||||
|
window.location.href = webUrl + '/login';
|
||||||
|
}, randomRange(250, 500));
|
||||||
|
}, 1e3);
|
||||||
|
}
|
||||||
|
|
||||||
|
window['gameName'] = '夜风冰雪';
|
||||||
|
window['gameLogo'] = 'LOGO6';
|
||||||
|
|
||||||
|
// 请勿更改
|
||||||
|
window['game'] = 'YFBX';
|
||||||
|
window['pf'] = 'yfbx';
|
||||||
|
window['pfID'] = 10001;
|
||||||
|
|
||||||
|
window['userInfo'] = {
|
||||||
|
'account': account,
|
||||||
|
'token': token,
|
||||||
|
'openID': md5(account + window['game'] + window['pfID']).toUpperCase(),
|
||||||
|
'cm': 1,
|
||||||
|
'adult': 0
|
||||||
|
};
|
||||||
|
|
||||||
|
// 检测 Tampermonkey 插件
|
||||||
|
function checkTampermonkey() {
|
||||||
|
setTimeout(() => {
|
||||||
|
const TampermonkeyVars = ["unsafeWindow", "GM_info"]
|
||||||
|
if (!TampermonkeyVars.every(e => typeof window[e] == 'undefined')) {
|
||||||
|
// 如果检测到 Tampermonkey 插件,执行以下代码
|
||||||
|
alert('检测到您正在使用 Tampermonkey 插件,本网站禁止使用此类插件!');
|
||||||
|
// 可以选择阻止页面访问或其他操作
|
||||||
|
window.location.href = '/login'; // 将用户重定向到空白页
|
||||||
|
} else checkTampermonkey()
|
||||||
|
}, 5000)
|
||||||
|
}
|
||||||
|
|
||||||
|
checkTampermonkey()
|
||||||
|
|
||||||
|
// 游戏个性设置: 设备/版本/界面/NPC参数
|
||||||
|
window['device'] = 0; // 客户端设备(一般无需更改): 0=自适应, 1=PC端界面, 2=移动端界面
|
||||||
|
window['gameMode'] = 0; // 版本玩法: 0=三职业, 1=单职业(游戏内仅出现战士职业装备)
|
||||||
|
window['uiStyle'] = 1; // 血球特效: 0=默认, 1=龙头动态火焰特效
|
||||||
|
window['npcStyle'] = 1; // NPC特效: 0=默认, 1=微变版本NPC动态特效
|
||||||
|
window['specialId'] = 2; // 打金服ID
|
||||||
|
window['withdraw'] = {'sid': 1, 'type': 3, 'ratio': 10000}; // 提现
|
||||||
|
|
||||||
|
window['isShowGongGao'] = true;
|
||||||
|
window['isAutoShowGongGao'] = !getCookie('auto_show_notice') ? (setCookie('auto_show_notice', 1, 1), true) : false;
|
||||||
|
window['isMicro'] = window['pfID'];
|
||||||
|
window['selectServer'] = true;
|
||||||
|
window['fontFamily'] = 'Arial';
|
||||||
|
window['loginType'] = 1; // 登录类型 0:测试 1:正式
|
||||||
|
window['loginWay'] = 1;
|
||||||
|
|
||||||
|
window['isReport'] = 0; // 是否上报后台
|
||||||
|
window['isReportPF'] = 0; // 是否上报渠道
|
||||||
|
window['isDisablePay'] = 0; // 是否关闭充值
|
||||||
|
window['loginView'] = 'app.MainLoginView';
|
||||||
|
|
||||||
|
// 相关URL
|
||||||
|
window['webHost'] = host;
|
||||||
|
window['webUrl'] = webUrl;
|
||||||
|
window['serviceListdUrl'] = webUrl + '/server';
|
||||||
|
window['setServiceListdUrl'] = webUrl + '/server';
|
||||||
|
window['payUrl'] = webUrl + '/pay';
|
||||||
|
window['apiUrl'] = webUrl + '/api';
|
||||||
|
window['orderUrl'] = webUrl + '/api?act=order';
|
||||||
|
window['reportUrl'] = webUrl + '/api?act=report'; // 上报接口
|
||||||
|
window['errorReportUrl'] = webUrl + '/api?act=report&do=error';// 错误上报接口
|
||||||
|
window['checkUrl'] = webUrl + '/api?act=check'; // 验证URL
|
||||||
|
window['versionUrl'] = webUrl + '/api?act=version'; // 请求客户端版本
|
||||||
|
window['getActorInfoUrl'] = webUrl + '/api?act=actor';
|
||||||
|
window['roleInfoUrl'] = webUrl + '/api?act=role';
|
||||||
|
window['gongGaoUrl'] = webUrl + '/notice.txt';
|
||||||
|
|
||||||
|
// 客服信息
|
||||||
|
window['kfQQ'] = '123456';
|
||||||
|
window['kfWX'] = '123456';
|
||||||
|
window['kfQQUrl'] = 'https://127.0.0.1';
|
||||||
|
window['kfQQGroupUrl'] = 'https://127.0.0.1';
|
||||||
|
|
||||||
|
window['gameVerTxt1'] = '审批文号:新广出审[2022]007号 出版物号:ISBN 001-1-0001-0001-1 著作权人:XX信息科技有限公司';
|
||||||
|
window['gameVerTxt2'] = '出版单位:XX信息科技有限公司 运营单位:XX信息科技有限公司';
|
||||||
|
window['gameVerTxt3'] = '健康游戏忠告:抵制不良游戏,拒绝盗版游戏。注意自我保护,谨防受骗上当。适度游戏益脑,沉迷游戏伤身。合理安排时间,享受健康生活。';
|
||||||
|
|
||||||
|
window['publicRes'] = 'https://cdn-cq-res.kubbo.cn/';
|
||||||
|
const arr = ['loading_1_jpg', 'loading_1_jpg', 'mp_jzjm_png', 'mp_jzjm2_png'];
|
||||||
|
window['gameLoadImg'] = !getCookie('first_loading') ? (setCookie('first_loading', 1), arr[0]) : arr[randomRange(0, 4)];
|
||||||
|
window['version1'] = 'zjt1_png';
|
||||||
|
window['version2'] = 'zjt2_png';
|
||||||
|
window['version3'] = 'zjt3_png';
|
||||||
|
|
||||||
|
window['resVersion'] = '1';
|
||||||
|
window['thmVersion'] = '1';
|
||||||
|
window['tableVersion'] = '1.2.80';
|
||||||
|
window['mainVersion'] = '1.2.2';
|
||||||
|
|
||||||
|
window['isDebug'] = false;
|
||||||
|
const isJsDebug = false;
|
||||||
|
|
||||||
|
// 设置标题
|
||||||
|
//document.title = window['gameName'];
|
||||||
|
|
||||||
|
function reporting(type, result) {
|
||||||
|
if (noLogin) return;
|
||||||
|
|
||||||
|
if (window['isReport'] && window['reportUrl']) {
|
||||||
|
let loginType = window['loginWay'] ? 1 : 0;
|
||||||
|
let msgInfo = {
|
||||||
|
type: type,
|
||||||
|
counter: window['pfID'],
|
||||||
|
env: window['game'] + '|' + loginType,
|
||||||
|
time: Date.parse(new Date().toString()) / 1000,
|
||||||
|
result: result
|
||||||
|
};
|
||||||
|
|
||||||
|
msgInfo['data'] = {
|
||||||
|
uid: window['userInfo']['uid'],
|
||||||
|
serverAlias: window['userInfo']['server']
|
||||||
|
};
|
||||||
|
|
||||||
|
const str = JSON.stringify(msgInfo);
|
||||||
|
const xhr = new XMLHttpRequest();
|
||||||
|
xhr.onreadystatechange = function () { //服务器返回值的处理函数,此处使用匿名函数进行实现
|
||||||
|
if (xhr.readyState == 4 && xhr.status == 200) {
|
||||||
|
//
|
||||||
|
}
|
||||||
|
};
|
||||||
|
xhr.open('GET', window['reportUrl'] + '&msg=' + str, true); //提交get请求到服务器
|
||||||
|
xhr.send(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function onerrorFunction(error, uid) {
|
||||||
|
const xhr = new XMLHttpRequest();
|
||||||
|
xhr.open('POST', window['checkUrl'] + window.location.search, true);//提交get请求到服务器
|
||||||
|
xhr.setRequestHeader('Content-Type', 'application/json');
|
||||||
|
let params = 'pfID=' + window['pfID'] + '&uid=' + uid + '&error=' + error;
|
||||||
|
xhr.open('GET', window['errorReportUrl'] + '&' + params, true);//提交get请求到服务器
|
||||||
|
xhr.send(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
window.onerror = function (message, url, line) {
|
||||||
|
let str = "Message : " + message + "\nURL : " + url + "\nLine Number : " + line;
|
||||||
|
this.onerrorFunction(str, 0);
|
||||||
|
alert(str);
|
||||||
|
}
|
||||||
|
|
||||||
|
//1.平台参数格式化
|
||||||
|
if (!noLogin) {
|
||||||
|
if (window['loginType']) {
|
||||||
|
switch (window['pfID']) {
|
||||||
|
case 10001:
|
||||||
|
var urlData = window.location.search;
|
||||||
|
if (urlData.indexOf('?') != -1) {
|
||||||
|
urlData = urlData.substr(1);
|
||||||
|
var strs = urlData.split('&');
|
||||||
|
for (var i = 0; i < strs.length; i++) {
|
||||||
|
window['userInfo'][strs[i].split('=')[0]] = unescape(strs[i].split('=')[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// 测试
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
var urlData = window.location.search;
|
||||||
|
if (urlData.indexOf('?') != -1) {
|
||||||
|
urlData = urlData.substr(1);
|
||||||
|
var strs = urlData.split('&');
|
||||||
|
for (var i = 0; i < strs.length; i++) {
|
||||||
|
window['userInfo'][strs[i].split('=')[0]] = unescape(strs[i].split('=')[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//2.登录验证
|
||||||
|
function loginFunction() {
|
||||||
|
//alert('维护中');
|
||||||
|
//return;
|
||||||
|
|
||||||
|
if (noLogin) return;
|
||||||
|
|
||||||
|
// window['userInfo']['serverInfo'] = serverInfo;
|
||||||
|
//1.平台验证
|
||||||
|
if (window['loginType']) {
|
||||||
|
switch (window['pfID']) {
|
||||||
|
case 10001:
|
||||||
|
const xhr = new XMLHttpRequest();
|
||||||
|
xhr.onreadystatechange = function () { // 服务器返回值的处理函数,此处使用匿名函数进行实现
|
||||||
|
if (xhr.readyState == 4 && xhr.status == 200) {
|
||||||
|
//console.log(xhr.responseText);
|
||||||
|
const obj = JSON.parse(xhr.responseText);
|
||||||
|
//验证成功
|
||||||
|
if (0 == obj.code) {
|
||||||
|
reporting(10001, 1);
|
||||||
|
start();
|
||||||
|
} else {
|
||||||
|
loadError = true;
|
||||||
|
reporting(10001, 0);
|
||||||
|
const errorMsg = obj.msg ? obj.msg : '通行证验证失败!',
|
||||||
|
label = document.getElementById('label');
|
||||||
|
if (label) {
|
||||||
|
const linkHtml = '<span class="font_small"><a onClick="window.history.back()" class="link_color">点击返回</a> / <a onClick="window.location.reload()" class="link_color">尝试刷新</a></span>';
|
||||||
|
label.innerHTML = errorMsg + linkHtml;
|
||||||
|
} else {
|
||||||
|
alert(filterHTML(errorMsg));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
xhr.open('GET', window['checkUrl'] + '&do=verify&' + window.location.search.substr(1), true); //提交get请求到服务器
|
||||||
|
xhr.send(null);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
reporting(10001, 1);
|
||||||
|
start();
|
||||||
|
// window['checkFunction']();//检测上报
|
||||||
|
// window['checkSuccess']();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//3.支付
|
||||||
|
function payFunction(param) {
|
||||||
|
console.log(param);
|
||||||
|
window.open('./pay/?productId=' + param.productId + '&productName=' + param.productName + '&amount=' + param.amount + '&actorid=' + param.gameExtra + '&serverId=' + param.serverId, '_blank');
|
||||||
|
}
|
||||||
|
|
||||||
|
//4.工具类
|
||||||
|
function callJsFunction(msg) {
|
||||||
|
if (msg && msg['type']) {
|
||||||
|
switch (msg['type']) {
|
||||||
|
case 'showGame':
|
||||||
|
showGame();
|
||||||
|
break;
|
||||||
|
case 'showLoadProgress':
|
||||||
|
showLoadProgress(msg['progress'], msg['des']);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
//测试
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let jobAry = ['', '战士', '法师', '战士']
|
||||||
|
|
||||||
|
function ReportingFunction(msg) {
|
||||||
|
if (msg && msg) {
|
||||||
|
if (msg['type'] == 12 || msg['type'] == 1000) { //等级上报
|
||||||
|
//创建xhr对象
|
||||||
|
let reportingUrl = window['reportUrl'];
|
||||||
|
reportingUrl += '&do=' + encodeURIComponent('game_profile');
|
||||||
|
reportingUrl += '&udbid=' + encodeURIComponent(1024009155 + '');
|
||||||
|
reportingUrl += '&gam=' + encodeURIComponent(window['game'] + '');
|
||||||
|
reportingUrl += '&pas=';
|
||||||
|
reportingUrl += '&gse=' + encodeURIComponent('s1');
|
||||||
|
reportingUrl += '&pro=' + encodeURIComponent('logingame');
|
||||||
|
reportingUrl += '&ya_appid=' + encodeURIComponent('udblogin');
|
||||||
|
let json_data = {
|
||||||
|
game_event: msg['type'] == 12 ? 'new_role' : 'level_change',
|
||||||
|
role_name: msg.data['roleName'],
|
||||||
|
role_level: msg.data['level'] + '',
|
||||||
|
fight_cap: '',
|
||||||
|
sex: msg.data['sex'] > 0 ? 'f' : 'm',
|
||||||
|
job: jobAry[msg.data['job']],
|
||||||
|
partner: '',
|
||||||
|
equip: msg.data['guildName']
|
||||||
|
}
|
||||||
|
json_data = JSON.stringify(json_data);
|
||||||
|
reportingUrl += '&json_data=' + encodeURIComponent(json_data);
|
||||||
|
// json_data = { "role_level": "11", "role_name": "s1.虞鹏天", "game_event": "level_change", "fight_cap": "1371", "job": "1" }
|
||||||
|
const xhr = new XMLHttpRequest();
|
||||||
|
xhr.onreadystatechange = function () { //服务器返回值的处理函数,此处使用匿名函数进行实现
|
||||||
|
if (xhr.readyState == 4 && xhr.status == 200) { //
|
||||||
|
//var obj = JSON.parse(xhr.responseText);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
xhr.open('GET', reportingUrl, true); //提交get请求到服务器
|
||||||
|
xhr.send(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//6.屏蔽右键
|
||||||
|
document.onkeydown = function () {
|
||||||
|
// var e = window.event || arguments[0];
|
||||||
|
//F12
|
||||||
|
// if (e.keyCode == 123) {
|
||||||
|
// return false;
|
||||||
|
// //Ctrl+Shift+I
|
||||||
|
// } else if ((e.ctrlKey) && (e.shiftKey) && (e.keyCode == 73)) {
|
||||||
|
// return false;
|
||||||
|
// //Shift+F10
|
||||||
|
// } else if ((e.shiftKey) && (e.keyCode == 121)) {
|
||||||
|
// return false;
|
||||||
|
// //Ctrl+U
|
||||||
|
// } else if ((e.ctrlKey) && (e.keyCode == 85)) {
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 反馈
|
||||||
|
*/
|
||||||
|
function feedbackFunction(info) {
|
||||||
|
removeIfram();
|
||||||
|
let msgInfo = {
|
||||||
|
act: 'feedback',
|
||||||
|
game: window['game'],
|
||||||
|
platform: window['pf'],
|
||||||
|
server: window['userInfo']['server'],
|
||||||
|
uid: info['uid'],
|
||||||
|
rolename: info['rolename'],
|
||||||
|
ts: Date.parse(new Date().toString()) / 1000
|
||||||
|
};
|
||||||
|
msgInfo['sign'] = new md5().hex_md5((msgInfo.game + msgInfo.platform + msgInfo.server + msgInfo.uid + msgInfo.rolename + msgInfo.ts + 123456));
|
||||||
|
let param = '';
|
||||||
|
for (let key in msgInfo) {
|
||||||
|
param += key + '=' + msgInfo[key] + '&'
|
||||||
|
}
|
||||||
|
param = param.substring(0, param.length - 1)
|
||||||
|
let srcStr = webUrl + '/api?' + param;
|
||||||
|
const div = document.createElement('div');
|
||||||
|
div.id = 'iframDiv';
|
||||||
|
div.innerHTML = '<iframe id="main" scrolling="no" noresize="true" frameborder="0" style="width: 90%;height: 90%;padding-left:5%;padding-top:2%;" src=' + srcStr + '></iframe>';
|
||||||
|
// div.style = 'position: relative; width:100%; height:100%;background: rgba(0, 0, 0, 0.5);';
|
||||||
|
div.style.position = 'relative';
|
||||||
|
div.style.width = '100%';
|
||||||
|
div.style.height = '100%';
|
||||||
|
div.style.background = 'rgba(0, 0, 0, 0.5)';
|
||||||
|
document.body.appendChild(div);
|
||||||
|
//创建关闭按钮
|
||||||
|
let div2 = document.createElement('div');
|
||||||
|
div2.id = 'btnDiv';
|
||||||
|
div2.innerHTML = '<img id="closeImg" src="static/img/close_btn.jpg?v=1" height="50" width="50" />'
|
||||||
|
// div2.style = 'position: absolute;right:0px;top:0px;width:50px;height:50px';
|
||||||
|
div2.style.position = 'absolute';
|
||||||
|
div2.style.right = '0px';
|
||||||
|
div2.style.top = '0px';
|
||||||
|
div2.style.width = '50px';
|
||||||
|
div2.style.height = '50px';
|
||||||
|
div.appendChild(div2);
|
||||||
|
const closeImg = document.getElementById('closeImg');
|
||||||
|
closeImg.onclick = removeIfram;
|
||||||
|
// onloadFunction();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 防沉迷
|
||||||
|
function IdCardFunction() {
|
||||||
|
window.open(webUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
function addQQGrp() {
|
||||||
|
window.open(window['kfQQGroupUrl']);
|
||||||
|
}
|
||||||
|
|
||||||
|
//下载YY游戏大厅
|
||||||
|
function downYYGameHallFun() {
|
||||||
|
window.open(webUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
//开通会员
|
||||||
|
function openYYVip() {
|
||||||
|
window.open(webUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
//开超玩会员
|
||||||
|
function openChaoWanVip() {
|
||||||
|
window.open(webUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
function removeIfram() {
|
||||||
|
let div = document.getElementById('iframDiv');
|
||||||
|
if (div) {
|
||||||
|
document.body.removeChild(div);
|
||||||
|
}
|
||||||
|
div = document.getElementById('btnDiv');
|
||||||
|
if (div) {
|
||||||
|
document.body.removeChild(div);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
document.oncontextmenu = () => false;
|
||||||
|
|
||||||
|
//加载项目工程
|
||||||
|
const loadScript = function (list, callback) {
|
||||||
|
let loaded = 0;
|
||||||
|
const loadNext = function () {
|
||||||
|
loadSingleScript(list[loaded], function () {
|
||||||
|
loaded++;
|
||||||
|
if (loaded >= list.length) {
|
||||||
|
callback();
|
||||||
|
} else {
|
||||||
|
loadNext();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
loadNext();
|
||||||
|
};
|
||||||
|
|
||||||
|
let loadTimes = 0;
|
||||||
|
let jsScr = '';
|
||||||
|
|
||||||
|
window['loadScript'] = loadScript;
|
||||||
|
|
||||||
|
var loadSingleScript = function (src, callback) {
|
||||||
|
if (jsScr != src) {
|
||||||
|
loadTimes = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (src.indexOf('lib') > -1 || src.indexOf('main') > -1) {
|
||||||
|
const mainSuffix = getQueryString('mainSuffix');
|
||||||
|
if (mainSuffix) {
|
||||||
|
src = src.replace('.js', mainSuffix + '.js');
|
||||||
|
}
|
||||||
|
src += '?v=' + (isJsDebug ? Math.random() : window['mainVersion']);
|
||||||
|
}
|
||||||
|
|
||||||
|
jsScr = src;
|
||||||
|
|
||||||
|
const s = document.createElement('script');
|
||||||
|
s.type = 'text/javascript';
|
||||||
|
s.async = false;
|
||||||
|
s.src = src;
|
||||||
|
|
||||||
|
s.addEventListener('load', function () {
|
||||||
|
s.parentNode.removeChild(s);
|
||||||
|
s.removeEventListener('load', arguments.callee, false);
|
||||||
|
callback();
|
||||||
|
}, false);
|
||||||
|
|
||||||
|
s.addEventListener('error', function () {
|
||||||
|
s.parentNode.removeChild(s);
|
||||||
|
s.removeEventListener('load', arguments.callee, false);
|
||||||
|
loadTimes++;
|
||||||
|
if (loadTimes > 5) {
|
||||||
|
alert("主程序文件加载失败,请检测网络刷新游戏!\n " + src);
|
||||||
|
} else {
|
||||||
|
setTimeout(function () {
|
||||||
|
loadSingleScript(src, callback);
|
||||||
|
}, 2000);
|
||||||
|
}
|
||||||
|
}, false);
|
||||||
|
document.body.appendChild(s);
|
||||||
|
};
|
||||||
|
|
||||||
|
//开始启动游戏
|
||||||
|
function start() {
|
||||||
|
//alert('维护中');
|
||||||
|
//return;
|
||||||
|
|
||||||
|
const xhr = new XMLHttpRequest();
|
||||||
|
xhr.open('GET', './manifest.json?v=1.1.1.2', true); // '?v=' + Math.random()
|
||||||
|
|
||||||
|
xhr.addEventListener('load', function () {
|
||||||
|
const manifest = JSON.parse(xhr.response);
|
||||||
|
const list = manifest.initial.concat(manifest.game);
|
||||||
|
window['gameAppJS'] = manifest['gameAppJS'];
|
||||||
|
loadScript(list, function () {
|
||||||
|
egret.runEgret({
|
||||||
|
renderMode: 'webgl',
|
||||||
|
audioType: 0,
|
||||||
|
calculateCanvasScaleFactor: function (context) {
|
||||||
|
const backingStore = context.backingStorePixelRatio ||
|
||||||
|
context.webkitBackingStorePixelRatio ||
|
||||||
|
context.mozBackingStorePixelRatio ||
|
||||||
|
context.msBackingStorePixelRatio ||
|
||||||
|
context.oBackingStorePixelRatio ||
|
||||||
|
context.backingStorePixelRatio || 1;
|
||||||
|
return (window.devicePixelRatio || 1) / backingStore;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
xhr.send(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
//上报
|
||||||
|
reporting(10000, 1);
|
||||||
|
|
||||||
|
loginFunction();
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user