Compare commits

5 Commits
main ... vue

Author SHA1 Message Date
57aff59b45 feat(server): 集成静态文件服务并优化开发环境配置
- 添加 koa-static 中间件以支持静态资源访问
- 更新 package.json 引入 nodemon 用于服务热重载- 调整项目结构,将前端代码移至 module/web 目录下
- 修改图片引用路径适配新目录结构
- 更新主入口文件引入路由模块的方式- 配置 Vite 构建工具替换原有构建方式- 移除 Turbo依赖并使用 concurrently 管理多进程开发任务- 更新根目录 package.json 的脚本命令指向新的开发启动逻辑
2025-10-19 22:40:56 +08:00
5f4858e991 feat(web): 初始化Web模块并重构登录页面
- 将模块名从 web-link 更改为 web
- 新增全局样式文件 index.scss 和 layout.scss,包含颜色、间距、布局等工具类
-重构登录页面,使用 Vue 组件语法替换原有 PHP 模板语法- 移除奶昔登录选项,保留 Linux.Do 登录方式- 更新静态资源路径,统一添加前导斜杠以确保正确加载
- 在 main.js 中调整应用挂载顺序,并增加配置信息打印
- 引入 axios 依赖用于后续 HTTP 请求处理- 修改 favicon 图标引用路径为 /favicon.ico- 调整背景图和表单元素样式,优化视觉效果与用户体验
2025-10-12 01:49:33 +08:00
6a412b3567 feat(project): 配置项目别名和turbo工作流- 添加 @ 别名指向 src 目录
- 配置 turbo 工作流支持
- 更新 package.json 脚本和依赖
- 调整路由和组件导入路径
- 格式化模板代码和样式
- 新增模块配置文件和工作区设置
2025-10-12 01:25:39 +08:00
kubbo
5d20a7def3 feat(web):重构前端路由和配置管理
- 移除旧版全局变量定义,采用Vue Router管理页面跳转
- 新增配置文件统一管理游戏名称和注册码设置
-优化加载条逻辑,使用onMounted确保DOM元素正确获取
- 添加服务端配置接口,动态加载游戏配置信息
- 升级依赖包,引入vue-router支持单页应用
- 调整项目结构,分离服务器端代码至独立目录
- 配置Vite代理转发API请求到本地开发服务器
- 更新package.json脚本命令,支持前后端联合调试
- 引入pnpm workspace管理模式,提升多包协作效率
2025-09-30 18:39:51 +08:00
kubbo
39f7598b02 refactor(web):改造成vue工程 2025-09-30 17:43:06 +08:00
1792 changed files with 1312 additions and 2238 deletions

13
.editorconfig Normal file
View 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
View 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
View File

@@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar"]
}

5
README.md Normal file
View 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
View File

@@ -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">
&nbsp;&gt;&nbsp;<a href="javascript:void(0);">攻城篇</a>
&nbsp;&gt;&nbsp;<a href="javascript:void(0);">熔炉</a>
&nbsp;&gt;&nbsp;<a href="javascript:void(0);">拍卖行</a><br>
&nbsp;&gt;&nbsp;<a href="javascript:void(0);">行会</a>
&nbsp;&gt;&nbsp;<a href="javascript:void(0);">封号系统</a>
&nbsp;&gt;&nbsp;<a href="javascript:void(0);">神盾系统</a><br>
&nbsp;&gt;&nbsp;<a href="javascript:void(0);">法阵系统</a>
&nbsp;&gt;&nbsp;<a href="javascript:void(0);" class="linkMore">MORE +</a><br>
</div>
</div>
<div class="clearfix xtjs">
<div class="link fl">
&nbsp;&gt;&nbsp;<a href="javascript:void(0);">封号系统</a>
&nbsp;&gt;&nbsp;<a href="javascript:void(0);">神盾系统</a>
&nbsp;&gt;&nbsp;<a href="javascript:void(0);">法阵系统</a><br>
&nbsp;&gt;&nbsp;<a href="javascript:void(0);">玉佩系统</a>
&nbsp;&gt;&nbsp;<a href="javascript:void(0);">生肖系统</a>
&nbsp;&gt;&nbsp;<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>

View File

@@ -1,162 +0,0 @@
<!--
* 冰雪传奇H5
* 2022 XX信息科技有限公司
*
* @author 123456
* @wx 123456
* @qq 123456
-->
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="telephone=no" name="format-detection">
<meta content="email=no" name="format-detection">
<meta name="screen-orientation" content="portrait">
<meta name="x5-orientation" content="portrait">
<meta name="full-screen" content="yes">
<meta name="x5-fullscreen" content="true">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<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 &copy; 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>

View File

@@ -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>

View File

@@ -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();

View File

@@ -0,0 +1,3 @@
export default {
}

29
module/server/index.js Normal file
View File

@@ -0,0 +1,29 @@
import Koa from 'koa';
import Router from 'koa-router';
import config from "./config/index.js"
import koaStatic from 'koa-static';
const app = new Koa();
const router = new Router();
// 简单的路由示例
router.get('/', (ctx) => {
ctx.body = {message: 'Hello from Koa server!'};
});
router.get('/api/test', (ctx) => {
ctx.body = {message: 'This is a test API endpoint'};
});
router.get('/api/config', (ctx) => {
ctx.body = {data: config}
})
app.use(router.routes());
app.use(router.allowedMethods());
app.use(koaStatic('/www'))
const PORT = process.env.PORT || 3001;
app.listen(PORT, () => {
console.log(`Koa server is running on port ${PORT}`);
});

View File

@@ -0,0 +1,16 @@
{
"name": "chuanqi-server",
"version": "1.0.0",
"description": "A simple Koa server for chuanqi web",
"main": "index.js",
"type": "module",
"scripts": {
"start": "node index.js",
"dev": "nodemon index.js"
},
"dependencies": {
"koa": "^2.15.0",
"koa-router": "^12.0.0",
"koa-static": "^5.0.0"
}
}

23
module/web/index.html Normal file
View File

@@ -0,0 +1,23 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<link rel="icon" type="image/svg+xml" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta charset="utf-8">
<meta name="viewport"
content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no"/>
<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"/>
<script src="/static/js/md5.js"></script>
<script src="/static/js/common.js?v=1"></script>
<title>神临苍月</title>
</head>
<body oncontextmenu="return false" ondragstart="return false">
<div id="app"></div>
<script type="module" src="/module/web/src/main.js"></script>
</body>
</html>

19
module/web/package.json Normal file
View File

@@ -0,0 +1,19 @@
{
"name": "chuanqi-web",
"private": true,
"version": "0.0.0",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"axios": "^1.12.2",
"vue": "^3.5.21",
"vue-router": "^4.5.1"
},
"devDependencies": {
"@vitejs/plugin-vue": "^6.0.1",
"vite": "^7.1.7"
}
}

108
module/web/src/App.vue Normal file
View File

@@ -0,0 +1,108 @@
<script setup>
import {RouterView} from 'vue-router'
import Loading from "./components/loading.vue";
import {onMounted, reactive} from "vue";
const mainDiv = reactive({
dataOrientation: "auto",
dataScaleMode: "noScale",
dataFrameRate: 60,
dataContentWidth: 1920,
dataContentHeight: 1280,
})
let loadBar1Width = 0, loadBar2Width = 0, setIntervalId = 0;
const loadBar2MaxWidth = 200;
let loadError = false;
onMounted(() => {
const loadBox = document.getElementById('loadBox'),
logoImg = document.getElementById('logoImg'),
loadBar1 = document.getElementById('loadBar1'),
loadBar2 = document.getElementById('loadBar2');
function updateLoadBar() {
if (loadError) {
return;
}
const screenWidth = document.documentElement.scrollWidth || document.body.scrollWidth,
screenHeight = document.documentElement.scrollHeight || document.body.scrollHeight,
smallScreen = screenWidth <= 0,
isHorizontal = isMobile() && screenHeight <= 590;
if (loadBox) loadBox.style.paddingTop = (!isHorizontal ? (screenHeight / 4) : 50) + 'px';
if (logoImg) logoImg.width = isHorizontal || smallScreen ? 300 : 500;
if (loadBar1) {
loadBar1Width += 20;
if (loadBar1Width > 100) loadBar1Width = 0;
loadBar1.style.width = loadBar1Width + '%';
}
if (loadBar2) {
loadBar2Width += 3;
if ((loadBar2Width / loadBar2MaxWidth * 100) > 100) {
loadBarFull();
} else {
loadBar2.style.width = loadBar2Width + 'px';
}
}
}
function startLoadBar() {
setIntervalId = self.setInterval(updateLoadBar, 100);
}
window.loadBarFull = function () {
if (loadBar2) loadBar2.style.width = loadBar2MaxWidth + 'px';
}
window.onload = function () {
startLoadBar();
if ((typeof (Worker) !== 'undefined')) {
const s = document.createElement('script');
s.type = 'text/javascript';
s.async = false;
s.addEventListener('load', function (e) {
s.parentNode.removeChild(s);
s.removeEventListener('load', e, false);
}, false);
s.src = 'js/index.js?v=' + Math.random();
document.body.appendChild(s);
} else {
loadError = true;
const errorMsg = `抱歉!您的浏览器不支持本游戏,请更换浏览器或前往官网 <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));
}
}
}
window.loadBarClear = function () {
window.clearInterval(setIntervalId);
}
if (isMobile()) {
mainDiv.dataOrientation = "landscape";
mainDiv.dataScaleMode = "fixedHeight";
mainDiv.dataFrameRate = 30;
mainDiv.dataContentWidth = 1334;
mainDiv.dataContentHeight = 750;
}
})
</script>
<template>
<div id="mainDiv" v-bind="mainDiv" 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">
<RouterView/>
<!-- <loading/> -->
</div>
</template>
<style scoped>
#mainDiv {
height: 100%;
#logDiv {
display: flex;
align-items: center;
justify-content: center;
}
}
</style>

View File

@@ -0,0 +1,96 @@
@use "layout";
// 1. 变量(可改)
$colors: (
"slate": #64748b,
"sky": #0ea5e9,
"emerald":#10b981,
"rose": #f43f5e
);
$border-color: #DCDFE6;
//$spacer: 0.25rem; // 1 单位 = 4px
$spacer: 1px; // 1 单位 = 1px
// 2. 工具函数
@function size($n) { @return $n * $spacer; }
// 3. 生成 margin / padding
@each $k, $v in $colors {
.bg-#{$k} { background-color: $v; }
.text-#{$k}{ color: $v; }
}
@for $i from 0 through 40 {
.m-#{$i} { margin: size($i); }
.mt-#{$i} { margin-top: size($i); }
.mr-#{$i} { margin-right: size($i); }
.mb-#{$i} { margin-bottom: size($i); }
.ml-#{$i} { margin-left: size($i); }
.mx-#{$i} { margin-left: size($i); margin-right: size($i); }
.my-#{$i} { margin-top: size($i); margin-bottom: size($i); }
.p-#{$i} { padding: size($i); }
.pt-#{$i} { padding-top: size($i); }
.pr-#{$i} { padding-right: size($i); }
.pb-#{$i} { padding-bottom: size($i); }
.pl-#{$i} { padding-left: size($i); }
.px-#{$i} { padding-left: size($i); padding-right: size($i); }
.py-#{$i} { padding-top: size($i); padding-bottom: size($i); }
.font-#{$i} { font-size: size($i); }
.round-#{$i} { border-radius: size($i); overflow: hidden}
.lh-#{$i} { line-height: size($i)!important; }
}
.rounded { border-radius: 0.25rem; }
.shadow { box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.shadow-l { box-shadow: -1px 0 3px rgba(0,0,0,0.2); }
.shadow-r { box-shadow: 1px 0 3px rgba(0,0,0,0.2); }
.shadow-b { box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.shadow-t { box-shadow: 0 -1px 3px rgba(0,0,0,0.2); }
.border { border: 1px solid #{$border-color}; }
$directions: (
"t": top,
"r": right,
"b": bottom,
"l": left
);
@each $d, $v in $directions {
.border-#{$d} { border-#{$v}: 1px solid #{$border-color}; }
}
@each $v in (60,80,100,120,140,160,180,200,220,240,260,280,300,320,340,360,380) {
.w-#{$v}{width: size($v)!important;}
.h-#{$v}{height: size($v)!important;}
}
.w100{width: 100%!important;}
.h100{height: 100%!important;}
.w50{width: 50%!important;}
.h50{height: 50%!important;}
.w100v{width: 100vw!important;}
.h100v{height: 100vh!important;}
.w50v{width: 50vw!important;}
.h50v{height: 50vh!important;}
/* Chrome, Edge, Safari, Opera */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
/* Firefox */
input[type="number"] {
-moz-appearance: textfield;
}
.el-form-item__label,.el-descriptions-item__label{
word-break: break-word;
}
.el-table__header-wrapper{
.cell{
word-break: break-word;
}
}

View File

@@ -0,0 +1,155 @@
.grid {
display: grid;
$cols: 2, 3, 4;
@each $size in $cols {
&.col-#{$size} {
grid-template-columns: repeat(#{$size}, 1fr);
}
}
}
.flex {
display: flex;
align-items: center;
&.center {
justify-content: center;
}
&.between {
justify-content: space-between;
}
&.around {
justify-content: space-around;
}
&.column {
flex-direction: column;
.fill {
.el-scrollbar__wrap {
overflow-x: hidden;
}
}
}
&.wrap {
flex-wrap: wrap;
}
&.baseline {
align-items: baseline;
}
&.start {
align-items: start;
}
.fill {
flex: 1;
min-width: 0;
min-height: 0;
}
$gaps: 4, 8, 12, 16, 20, 24, 28, 32, 36, 40;
@each $size in $gaps {
&.gap-#{$size} {
gap: #{$size}px;
}
}
&.el-form {
flex-wrap: wrap;
$cols: 2, 3, 4;
@each $size in $cols {
&.col-#{$size} {
.el-form-item {
width: calc(100% / #{$size});
}
}
}
.el-form-item {
&.row {
width: 100%;
}
.el-date-editor, .el-select,.el-input-number {
width: 100% !important;
}
}
}
}
.shrink {
flex-shrink: 0;
}
.cameraGrid {
&.one {
display: flex;
justify-content: center;
align-items: center;
.video {
width: 100%;
height: 100%;
}
}
&.four {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.video {
width: 49%;
height: 49%;
}
}
&.nine {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.video {
width: calc(100% / 3);
height: calc(100% / 3);
padding: 10px;
text-align: center;
}
}
&.thirteen {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-rows: repeat(4, calc(95% / 4));
grid-gap: 0.67708vw;
place-content: space-around;
.main {
grid-column-start: 2;
grid-column-end: 4;
grid-row-start: 2;
grid-row-end: 4;
position: relative;
}
}
&.eight {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-rows: repeat(4, calc(95% / 4));
grid-gap: 0.67708vw;
place-content: space-around;
.main {
grid-column-start: 1;
grid-column-end: 4;
grid-row-start: 1;
grid-row-end: 4;
}
}
}

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>

After

Width:  |  Height:  |  Size: 496 B

View File

@@ -0,0 +1,42 @@
<script setup>
import logoGameCat from "/resource_Publish/assets/login/logoGameCat.png"
</script>
<template>
<div id="logDiv" style="position:absolute; width: 100%; height: 100%;">
<table align="center" id="loadBox" style="color: #b4792e; font-size: 20px; padding-top: 25px;">
<tbody>
<tr>
<td align="center">
<img id="logoImg" align="center" width="380" :src="logoGameCat"/>
</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>
</tbody>
</table>
</div>
</template>
<style scoped>
</style>

5
module/web/src/config.js Normal file
View File

@@ -0,0 +1,5 @@
export default {
gameName: "神临苍月",
reg_code_open: true,
code_type: "email",
}

21
module/web/src/main.js Normal file
View File

@@ -0,0 +1,21 @@
import {createApp} from 'vue'
import './style.css'
import App from './App.vue'
import router from './router/index.js'
// window.external?.OpenGameWindowNew(window.location.href, '', '', '', false);
document.onkeydown = document.onkeyup = document.onkeypress = function (e) {
if (e && e.keyCode == 123) {
e.returnValue = false;
return false;
}
}
const app = createApp(App)
fetch("/api/config", {method: "GET"}).then(res => res.json()).then(res => {
console.log(res)
app.config.globalProperties.$gameName = res.data.gameName || "神临苍月";
app.config.globalProperties.$_CONFIG = res.data;
app.use(router)
app.mount('#app')
})

View File

@@ -0,0 +1,22 @@
import {createRouter, createWebHistory} from 'vue-router'
import Index from "../views/index.vue";
// 示例路由配置
const routes = [
{
path: '/',
name: 'Home',
component: Index
},
{
path: '/login', name: 'Login',
component: () => import('@/views/login.vue')
}
]
const router = createRouter({
history: createWebHistory(),
routes
})
export default router

99
module/web/src/style.css Normal file
View File

@@ -0,0 +1,99 @@
:root {
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;
color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
background-color: #242424;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
h1 {
font-size: 3.2em;
line-height: 1.1;
}
button {
border-radius: 8px;
border: 1px solid transparent;
padding: 0.6em 1.2em;
font-size: 1em;
font-weight: 500;
font-family: inherit;
background-color: #1a1a1a;
cursor: pointer;
transition: border-color 0.25s;
}
button:hover {
border-color: #646cff;
}
button:focus,
button:focus-visible {
outline: 4px auto -webkit-focus-ring-color;
}
.card {
padding: 2em;
}
@media (prefers-color-scheme: light) {
:root {
color: #213547;
background-color: #ffffff;
}
a:hover {
color: #747bff;
}
button {
background-color: #f9f9f9;
}
}
html, body, #app {
-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;
}
}

View File

@@ -0,0 +1,21 @@
/**
* 判断当前设备是否是手机
* @returns {boolean} 如果是手机返回true否则返回false
*/
export function isMobile() {
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
// 检查常见的移动设备标识
const mobileRegex = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i;
return mobileRegex.test(userAgent);
}
/**
* 判断当前设备是否是手机的另一种实现方式
* 通过屏幕宽度来判断
* @returns {boolean} 如果是手机返回true否则返回false
*/
export function isMobileByScreen() {
return window.innerWidth <= 768;
}

View File

@@ -0,0 +1,10 @@
<script setup>
import Loading from "../components/loading.vue";
</script>
<template>
<loading/>
</template>
<style scoped>
</style>

View File

@@ -0,0 +1,52 @@
<script setup>
import {defineOptions} from "vue";
defineOptions({name: 'Login'});
const servers = ref([])
const account = ref('')
const password = ref('')
function handleLogin() {
}
</script>
<template>
<div class="wrapper pagebg">
<div class="dialog account" id="account-login">
<h2 class="title">{{ $gameName }}</h2>
<input type="text" id="account" v-model="account" placeholder="请输入账号" @keyup="v=>account=v.replace(/[\W]/g, '')" autocomplete="off"/>
<input type="password" id="password" v-model="password" placeholder="请输入密码"/>
<select id="serverId" style="border: none; display: none; margin-bottom: 10px;">
<option value="0">请选择区服</option>
<option v-for="item in servers" :value="item.id">{{ item.name }}</option>
</select>
<div id="agree" class="agree">
<span><img data-v-427e1e01=""
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAVFBMVEWeICicICedISidISibIiadISeeISiOOTmdISeeISj///+aGSGcHiT68vOYFByhKjHRmZzqz9CzVlvx4OG4YWXJh4qpPUPkw8WkMjjdsrS/cXatR00P5JiiAAAACnRSTlPuTT//Gq+6A9iEOAr7KAAAAbBJREFUSMeVlte2gyAQRTHYcBBQiu3///OOMdZALvCUrHX2mYYAqao8Y2VN/l11ybK8qkiVv1hR04hVF+yVVwT1NaFRi9RIkIzVNHrVLCOsIPEAKRgpEwJgiJIk6ZEgUQlxAP5JKhLgnCYAHOg4ygQAwBnjEIsDAEDOSvUgooHRTHowkQCseqWbLh546wPA2e6r/4T6xp8SP/t9+M9vfQCQEtt9MnDqfSlxLpfe9OMVcLveB6x2StllG9D6n5/6dvqeg4BFaT3M46eQm76zywPgHAMMTaOVkQAf/6Hd9QpTvW8N4LJf+41ETwEbzJ296uVzewtwtnsLMDoVgi53PcADAGmmTdAO1gnxpb9H4HtCW0dmF/A/AOz4ocAyJqv8/geALbXdrm9a3Wm//xlh7Xl7EvvPp/+1hgWndCIB/+ukpTOXMgL+90nLxd6CePyvEfDjoc6orv3l//ge8Hjo7aB/+D8BgWnN2wD9/l+HAO65cU2rDfh7ANy1WHs3+P19x8y6sWdrzejz9wOCusWN1OcfOMg4B786CGC7QgRJv7KSL8Xkazf5Yk9+OiQ/TlKfP3/iYTk/HuYxLgAAAABJRU5ErkJggg=="></span>
我已阅读并同意 <a href="javascript:void(0);" id="agree_btn">用户协议及隐私协议</a>
</div>
<a id="submitButton" class="button fit" @click="handleLogin"> </a>
<div style="display:flex;justify-content:center;gap:8px;font-size:12px">
<div style="display:flex;align-items:center;flex-direction:column;gap:4px;cursor:pointer" id="linuxdoConnect">
<img src="/img/linuxdo_logo.png" style="width:60px;height:60px" alt="Linux.Do登录"/>
<div>Linux.do</div>
</div>
</div>
<div class="forget_password">
<a href="javascript:void(0);" id="forgetPassword" data-type="2">忘记密码?</a>
<a href="javascript:void(0);" class="pull-right" id="switchBtn" data-type="1">注册</a>
</div>
</div>
<div id="bg" class="gamebg"/>
</div>
</template>
<style scoped>
.gamebg {
background-image: url("/img/login_bg.jpg");
}
</style>

22
module/web/vite.config.js Normal file
View File

@@ -0,0 +1,22 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import * as path from "node:path";
// https://vite.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src')
}
},
server: {
proxy: {
'/api': {
target: 'http://localhost:3001',
changeOrigin: true,
// rewrite: (path) => path.replace(/^\/api/, '')
}
}
}
})

18
package.json Normal file
View File

@@ -0,0 +1,18 @@
{
"name": "chuanqi-qycq-web",
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"scripts": {
"dev": "node scripts/dev.js",
"build": "pnpm -r run build"
},
"keywords": [],
"author": "Kubbo",
"license": "ISC",
"packageManager": "pnpm@10.18.2",
"devDependencies": {
"concurrently": "^9.2.1"
}
}

View File

@@ -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("&#24403;&#21069;&#97;&#112;&#105;&#26410;&#25480;&#26435;&#65281;&#35831;&#20351;&#29992;&#119;&#119;&#119;&#46;&#116;&#116;&#102;&#107;&#46;&#99;&#99;");
}
?>
</body>
</html>

View File

@@ -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/';

View File

@@ -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;}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

View File

@@ -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>

View File

@@ -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;
}
?>

View File

@@ -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;
}
}
?>

View File

@@ -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 . "&notify_id=" . $notify_id;
$responseTxt = getHttpResponseGET($veryfy_url, $this->alipay_config['cacert']);
return $responseTxt;
}
}
?>

View File

@@ -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("&#24403;&#21069;&#97;&#112;&#105;&#26410;&#25480;&#26435;&#65281;&#35831;&#20351;&#29992;&#119;&#119;&#119;&#46;&#116;&#116;&#102;&#107;&#46;&#99;&#99;");
}
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;
}
}
?>

View File

@@ -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
View File

@@ -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>

2
pnpm-workspace.yaml Normal file
View File

@@ -0,0 +1,2 @@
packages:
- module/*

4
public/config.json Normal file
View File

@@ -0,0 +1,4 @@
{
"reg_code_open": true,
"code_type": ""
}

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

492
public/js/index.js Normal file
View File

@@ -0,0 +1,492 @@
let host = window.location.hostname || '100.88.157.105';
let port = 80;
const account = getQueryString('account'),
token = getQueryString('token'),
noLogin = !account || !token;
if (noLogin) {
setTimeout(function () {
loadBarClear();
loadBarFull();
setTimeout(function () {
window.location.href = '/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['serviceListdUrl'] = '/server';
window['setServiceListdUrl'] = '/server';
window['payUrl'] = '/pay';
window['apiUrl'] = '/api';
window['orderUrl'] = '/api?act=order';
window['reportUrl'] = '/api?act=report'; // 上报接口
window['errorReportUrl'] = '/api?act=report&do=error';// 错误上报接口
window['checkUrl'] = '/api?act=check'; // 验证URL
window['versionUrl'] = '/api?act=version'; // 请求客户端版本
window['getActorInfoUrl'] = '/api?act=actor';
window['roleInfoUrl'] = '/api?act=role';
window['gongGaoUrl'] = '/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 = '/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();
}
function addQQGrp() {
window.open(window['kfQQGroupUrl']);
}
//下载YY游戏大厅
function downYYGameHallFun() {
window.open();
}
//开通会员
function openYYVip() {
window.open();
}
//开超玩会员
function openChaoWanVip() {
window.open();
}
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