Commit 727f44fd authored by XieChuanJin's avatar XieChuanJin

提交

parent 38908551
http://www.abchina.com/luascript/shareOnClick/%7B%22return%22%3A%7B%22share_title%22%3A%22%E8%80%81%E8%A1%A8%EF%BC%8C%E8%BF%99%E6%AC%BE%E6%B8%B8%E6%88%8F%E8%B4%BC%E5%A5%BD%E7%8E%A9%E5%84%BF%EF%BC%81%22%2C%22share_text%22%3A%22%E6%AF%8F%E5%A4%A9%E4%B8%8A%E5%86%9C%E8%A1%8CAPP%E7%8E%A9%E6%89%93%E6%98%9F%E7%90%83%EF%BC%8C%E8%B6%85%E5%A4%9A%E4%B8%B0%E5%AF%8C%E5%A5%96%E5%93%81%E7%AD%89%E4%BD%A0%E6%9D%A5%E6%8B%BF%EF%BC%81%22%2C%22share_url%22%3A%22http%3A%2F%2Factivity-3.m.duiba.com.cn%2FcustomShare%2Fshare%3Fid%3D3693%22%2C%22share_img_url%22%3A%22http%3A%2F%2Fduiba.oss-cn-hangzhou.aliyuncs.com%2Fdb_games%2Factivity%2Fdxq_jxnh%2Fshare.png%22%7D%7D
\ No newline at end of file
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>江西农行打星球分享页</title>
<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>var __startTime__ = Date.now()</script>
</head>
<body>
<div style="margin: auto;width: 100%;height: 100%;" class="egret-player" data-entry-class="Main"
data-orientation="auto" data-scale-mode="showAll" data-frame-rate="60" data-content-width="750"
data-content-height="1624" data-multi-fingered="2" data-show-fps="true" data-show-log="false"
data-show-fps-style="x:11111,y:0,size:12,textColor:0xffffff,bgAlpha:0.9">
</div>
<style>
html,
body {
-ms-touch-action: none;
background-color: #000;
background-size: 100%;
background-position: bottom;
padding: 0;
border: 0;
margin: 0;
height: 100%;
}
</style>
<div id="annieEngine" style="line-height:0;font-size:0;"></div>
<script>
var mconfig = {
gotoUrl:"http://www.baidu.com"
}
//资源路径
var resPath = "https://yun.duiba.com.cn/db_games/activity/dxq_jxnh/1574841660/";
</script>
<script crossorigin="anonymous" src="//yun.duiba.com.cn/db_games/lib2_game.min.js"></script>
<script crossorigin="anonymous" src="//yun.duiba.com.cn/db_games/libs/matter_decomp.min.js"></script>
<script crossorigin="anonymous" src="//yun.duiba.com.cn/db_games/libs/zepto_security_downloadApp.min.js"></script>
<script crossorigin="anonymous" src="//yun.duiba.com.cn/db_games/libs/egret.all.js"></script>
<script crossorigin="anonymous"
src="//yun.duiba.com.cn/db_games/activity/dxq_jxnh/1574841660/output.js"></script>
<script crossorigin="anonymous"
src="//yun.duiba.com.cn/db_games/activity/dxq_jxnh/1574841660/resource/default.thm.js"></script>
<script>
egret.ImageLoader.crossOrigin = "anonymous";
/**
* {
* "renderMode":, //Engine rendering mode, "canvas" or "webgl"
* "audioType": 0 //Use the audio type, 0: default, 2: web audio, 3: audio
* "antialias": //Whether the anti-aliasing is enabled in WebGL mode, true: on, false: off, defaults to false
* "calculateCanvasScaleFactor": //a function return canvas scale factor
* }
**/
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;
}
});
</script>
</body>
</html>
\ No newline at end of file
活动说明:
1.玩家每天3次参与活动机会,分享好友每天可额外获得1次参与机会
2.倒计时间内操作炮筒击打原石得分,累计得分单人最高纪录计入排行榜,注意每轮结束后需点击提交分数哦
3.自然周每天参与签到可获得游戏道具卡,游戏中使用道具复活或加分,每局仅使用1种类型的道具
4.排行榜自然周计入得分,每周一10: 00开奖
奖品说明:
第1名:小米套装(小米电饭煲、小米吹风机、小爱同学智能音箱)
第2- 3名:小米电水壶
第4 - 5名:米家床头灯
第6 - 8名:30元话费
第9 - 20名:10元话费
第21 - 50名:5元话费
第51 - 200名:2元话费
\ No newline at end of file
<meta charset="utf-8">
<title>江西农行打星球</title>
<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>var __startTime__ = Date.now()</script>
<style>
html,
body {
-ms-touch-action: none;
background-repeat: no-repeat;
background-color: #a8e0c0;
background-size: 100%;
/* background-position: center; */
padding: 0;
border: 0;
margin: 0;
height: 100%;
width: 100%;
}
/* 易盾css*/
.captcha {
display: none;
position: fixed;
z-index: 10000;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: rgba(0, 0, 0, 0.6);
}
.captcha .neCaptcha-dialog {
background-color: #fff;
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.35);
-webkit-box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.35);
position: absolute;
left: 50%;
top: 45%;
-moz-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
-o-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
-webkit-transform: translate(-50%, -50%);
width: 270px;
height: 134px;
}
.captcha .neCaptcha-dialog::after {
position: absolute;
content: '单次游戏结束,请拖动滑块提交分数';
width: 100%;
height: 30px;
top: -40px;
left: 0;
text-align: center;
line-height: 30px;
font-size: 16px;
color: #ffff00;
}
.captcha .neCaptcha-dialog::before {
background-color: #fff;
content: '';
display: block;
width: 280px;
height: 144px;
position: absolute;
top: -5px;
left: -5px;
z-index: -1;
}
</style>
</head>
<body>
<div style="margin: auto;width: 100%;height: 100%;" class="egret-player" data-entry-class="Main"
data-orientation="auto" data-scale-mode="showAll" data-frame-rate="60" data-content-width="750"
data-content-height="1624" 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>
<img id="shareImg" />
<div id="sCloseBtn"></div>
<div id="copy-txt"></div>
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script>
// projectId 看链接
/*var oHead = document.querySelector('body');
var oScript = document.createElement('script');
oScript.type = 'text/javascript';
oScript.src = '//yun.duiba.com.cn/webapp/js/vconsole.min.js';
oHead.appendChild(oScript);
oScript.onload = function () {
var vConsole = new VConsole();
}*/
var activityId="3737417";
window['projectId'] = "p0c55c908";
window['erweima'] = ""
window['playwayId'] = "join_1";
window['prizePage'] = "http://activity.m.duibatest.com.cn/projectx/pf1f5d279/f57515b0a.html";
window['pageId'] = "f6754bda1";
window["appId"] = "65831";
var mconfig = {
share: {
title: "老表,这款游戏贼好玩儿!",
desc: "每天上农行APP玩打星球,超多丰富奖品等你来拿!",
imgUrl: "http://duiba.oss-cn-hangzhou.aliyuncs.com/db_games/activity/dxq_jxnh/share.png",
url: "https://65831.activity-1.m.duiba.com.cn/wechat/access?apk=2KBTNrtsxwdm2GkSpprgGrK25pwh&dbredirect=http%3A%2F%2F65831.activity-1.m.duiba.com.cn%2Fprojectx%2Fp0c55c908%2Findex.html%3FsignEnt%3D2"
},
//难度系数
//上线第一周的排行榜上期的开奖时间
lastRankListOpenDate: "20191027",
//兑换记录页Url
rewardRecordUrl: "http://activity.m.duibatest.com.cn/projectx/p39a6e486/f41b1b2d0.html",
//上线时间
onlineDate: "2019-10-09 14:50:49:123",
rewardList: [
{
rank: 1,
url: "https://yun.duiba.com.cn/db_games/fishlogo.png"
},
{
rank: 2,
url: "https://yun.duiba.com.cn/db_games/fishlogo.png"
},
{
rank: 3,
url: "https://yun.duiba.com.cn/db_games/fishlogo.png"
},
{
rank: 4,
url: "https://yun.duiba.com.cn/db_games/fishlogo.png"
},
{
rank: 5,
url: "https://yun.duiba.com.cn/db_games/fishlogo.png"
},
{
rank: 6,
url: "https://yun.duiba.com.cn/db_games/fishlogo.png"
}
],
lastRankListType: "20191021",
rule: "打星球赢壕礼! \n" +
"活动说明: \n" +
"1.玩家每天3次参与活动机会 \n" +
"2.倒计时间内操作炮筒击打原石得分,累计得分单人最高纪录计入排行榜 \n" +
"3.自然周每天参与签到可获得游戏道具卡,游戏中使用道具复活或加分,每局仅使用1中类型的道具 \n" +
"4.排行榜自然周计入得分,每周一10:00开奖 \n" +
"5.用户中奖后需复制领奖码至中国农业银行APP→生活→江西专区→夺宝活动页面浮标入口兑换领奖"
}
//资源路径
var resPath = "https://yun.duiba.com.cn/db_games/activity/dxq_jxnh/1574440748/";
//record
var recordUrl = "/crecord/record";
function resolve(a) {
var b = eval(a);
return b;
}
function openRecord() {
mqq.ui.openUrl({
url: window['recordUrl'],
target: 1
})
}
</script>
<script type="text/javascript" src="https://yun.duiba.com.cn/wawaji/app/meeting/zepto.min.js"></script>
<script crossorigin="anonymous" src="//yun.duiba.com.cn/db_games/lib2_game.min.js"></script>
<script crossorigin="anonymous"
src="//yun.duiba.com.cn/db_games/activity/laochangshajiyi/svga.egret.min.js"></script>
<script crossorigin="anonymous" src="//yun.duiba.com.cn/db_games/activity/dxq_jxnh/1574673481/output.js"></script>
<script crossorigin="anonymous"
src="//yun.duiba.com.cn/db_games/activity/dxq_jxnh/1574440748/resource/default.thm.js"></script>
<!-- 易盾js -->
<script type="text/javascript" src="//cstaticdun.126.net/load.min.js"></script>
<script>
egret.ImageLoader.crossOrigin = "anonymous";
/**
* {
* "renderMode":, //Engine rendering mode, "canvas" or "webgl"
* "audioType": 0 //Use the audio type, 0: default, 2: web audio, 3: audio
* "antialias": //Whether the anti-aliasing is enabled in WebGL mode, true: on, false: off, defaults to false
* "calculateCanvasScaleFactor": //a function return canvas scale factor
* }
**/
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;
}
});
</script>
\ No newline at end of file
......@@ -23,7 +23,7 @@
text-align: center;
}
/* .g-abc-nav .g-abc-nav__back {
.g-abc-nav .g-abc-nav__back {
position: absolute;
left: 0;
top: 0;
......@@ -35,7 +35,7 @@
.g-abc-nav .g-abc-nav__back:active {
opacity: 0.8;
} */
}
.g-abc-nav .g-abc-nav__title {
display: inline-block;
......@@ -132,28 +132,37 @@
</head>
<body>
<div class="g-abc-nav">
<div class="g-abc-nav__back"></div>
<div class="g-abc-nav__title"></div>
</div>
<script>
(function () {
var barDom = document.querySelector('.g-abc-nav');
// var backDom = document.querySelector('.g-abc-nav__back');
var backDom = document.querySelector('.g-abc-nav__back');
var titleDom = document.querySelector('.g-abc-nav__title');
setTimeout(function () {
titleDom.innerHTML = document.title
}, 200);
function commonGoBack() {
window.history.go(-1);
if (location.pathname === '/crecord/orderPayResult') {
location.href = 'https://enjoy.abchina.com/yx/beanorder'; return;
}
if (window.history.length === 2 && location.pathname !== '/crecord/recordDetailNew' || location.href.indexOf('/hdtool/index?id=3721210') > -1) {
window.location.href = 'https://enjoy.abchina.com/yx/beanhome';
} else {
window.history.go(-1);
}
}
// backDom.addEventListener('click', commonGoBack, false);
backDom.addEventListener('click', commonGoBack, false);
// 非ios
if (!window.navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)) {
return;
// 安卓回退特殊处理
function back() {
// window.history.go(-1);
commonGoBack();
}
function setAndroidBackKey(backKeyFunc) {
var onBackKey = backKeyFunc;
function connectWebViewJavascriptBridge(callback) {
......@@ -181,6 +190,7 @@
} else {
var topPx = screen.height == 812 && screen.width == 375 ? 40 : (document.body.clientWidth / 320 * 20);
document.body.style.paddingTop = topPx + 'px';
// barDom.style.top = topPx + 'px';
document.body.setAttribute('class', 'is-ios-body');
}
......@@ -195,14 +205,6 @@
<div id="sCloseBtn"></div>
<div id="copy-txt"></div>
<script>
var oHead = document.querySelector('body');
var oScript = document.createElement('script');
oScript.type = 'text/javascript';
oScript.src = '//yun.duiba.com.cn/webapp/js/vconsole.min.js';
oHead.appendChild(oScript);
oScript.onload = function () {
var vConsole = new VConsole();
}
window['projectId'] = 'pff09b4eb';
window['erweima'] = 'https://yun.duiba.com.cn/db_games/fishlogo.png';
window['appId'] = '';
......@@ -290,7 +292,7 @@
}
</script>
<script>
var projectId = "projectId";
var projectId = "pff09b4eb";
var svgaUrlPrefix = "resource/assets/svga/";
var maxRemainTime = 15;
var dress = {
......
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"game_over_panel","version":5,"files":["..\\assets\\game_over_panel\\game_over_bg.png","..\\assets\\game_over_panel\\game_over_btn_restart.png","..\\assets\\game_over_panel\\game_over_content_bg.png","..\\assets\\game_over_panel\\game_over_line.png","..\\assets\\game_over_panel\\game_over_use_props.png","..\\assets\\common\\btn_close.png","..\\assets\\game_over_panel\\game_over_btn_receive.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"game_over_panel","version":5,"files":["..\\assets\\game_over_panel\\game_over_bg.png","..\\assets\\game_over_panel\\game_over_btn_restart.png","..\\assets\\game_over_panel\\game_over_content_bg.png","..\\assets\\game_over_panel\\game_over_line.png","..\\assets\\game_over_panel\\game_over_use_props.png","..\\assets\\common\\btn_close.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"over_panel","version":5,"files":["..\\assets\\over_img.png","..\\assets\\start_scene\\prizeBtn.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"rank_list_panel","version":5,"files":["..\\assets\\rank_list_panel\\rank_toggle_off.png","..\\assets\\rank_list_panel\\rank_bg.png","..\\assets\\common\\btn_close.png","..\\assets\\rank_list_panel\\rank_content_bg_left.png","..\\assets\\rank_list_panel\\rank_content_bg_right.png","..\\assets\\rank_list_panel\\btn_view_reward.png","..\\assets\\rank_list_panel\\rank_placeholder.png","..\\assets\\rank_list_panel\\rank_top_rank_bg.png","..\\assets\\rank_list_panel\\rank_separator.png","..\\assets\\props\\revive_card_bg.png","..\\assets\\rank_list_panel\\rank_not_winning.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"rank_list_panel","version":5,"files":["..\\assets\\rank_list_panel\\rank_toggle_off.png","..\\assets\\rank_list_panel\\rank_bg.png","..\\assets\\common\\btn_close.png","..\\assets\\rank_list_panel\\rank_content_bg_left.png","..\\assets\\rank_list_panel\\rank_content_bg_right.png","..\\assets\\rank_list_panel\\btn_view_reward.png","..\\assets\\rank_list_panel\\rank_placeholder.png","..\\assets\\rank_list_panel\\rank_top_rank_bg.png","..\\assets\\rank_list_panel\\rank_separator.png","..\\assets\\props\\revive_card_bg.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"share_scene","version":5,"files":["..\\assets\\share_scene\\share_btn_goto.png","..\\assets\\share_scene\\share_img1.png","..\\assets\\share_scene\\share_img2.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"start_scene","version":5,"files":["..\\assets\\start_scene\\start_btn_rule.png","..\\assets\\start_scene\\start_btn_share.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"start_scene","version":5,"files":["..\\assets\\start_scene\\start_btn_start.png","..\\assets\\start_scene\\start_title.png","..\\assets\\start_scene\\start_btn_bg.png","..\\assets\\start_scene\\start_topbar_back.png","..\\assets\\start_scene\\start_topbar_bg.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"winnig_panel","version":5,"files":["..\\assets\\winning_panel\\winning_bg.png","..\\assets\\winning_panel\\winning_btn_receive.png","..\\assets\\common\\btn_close.png"]}
\ No newline at end of file
......@@ -25,7 +25,7 @@
"name":"game"
},
{
"keys":"startBG_jpg,start_btn_rule_png,start_btn_share_png",
"keys":"startBG_jpg",
"name":"start_scene"
},
{
......@@ -45,11 +45,11 @@
"name":"animation"
},
{
"keys":"rank_toggle_off_png,rank_bg_png,btn_close_png,rank_content_bg_left_png,rank_content_bg_right_png,btn_view_reward_png,rank_placeholder_png,rank_top_rank_bg_png,rank_separator_png,revive_card_bg_png,prize_0_jpg,prize_1_jpg,prize_2_jpg,prize_3_jpg,rank_not_winning_png",
"keys":"rank_toggle_off_png,rank_bg_png,btn_close_png,rank_content_bg_left_png,rank_content_bg_right_png,btn_view_reward_png,rank_placeholder_png,rank_top_rank_bg_png,rank_separator_png,revive_card_bg_png,prize_0_jpg,prize_1_jpg,prize_2_jpg,prize_3_jpg",
"name":"rank_list_panel"
},
{
"keys":"game_over_bg_png,game_over_btn_restart_png,game_over_content_bg_png,game_over_line_png,game_over_use_props_png,btn_close_png,game_over_btn_receive_png",
"keys":"game_over_bg_png,game_over_btn_restart_png,game_over_content_bg_png,game_over_line_png,game_over_use_props_png,btn_close_png",
"name":"game_over_panel"
},
{
......@@ -77,12 +77,8 @@
"name":"input_num_panel"
},
{
"keys":"winning_bg_png,winning_btn_receive_png,btn_close_png",
"name":"winnig_panel"
},
{
"keys":"over_img_png,prizeBtn_png",
"name":"over_panel"
"keys":"share_bg_jpg,share_btn_goto_png,share_img1_png,share_img2_png",
"name":"share_scene"
}
],
"resources":[
......@@ -602,39 +598,24 @@
"url":"assets/rank_list_panel/prize_3.jpg"
},
{
"name":"start_btn_rule_png",
"type":"image",
"url":"assets/start_scene/start_btn_rule.png"
},
{
"name":"start_btn_share_png",
"type":"image",
"url":"assets/start_scene/start_btn_share.png"
},
{
"name":"rank_not_winning_png",
"type":"image",
"url":"assets/rank_list_panel/rank_not_winning.png"
},
{
"name":"winning_bg_png",
"name":"share_bg_jpg",
"type":"image",
"url":"assets/winning_panel/winning_bg.png"
"url":"assets/share_scene/share_bg.jpg"
},
{
"name":"winning_btn_receive_png",
"name":"share_btn_goto_png",
"type":"image",
"url":"assets/winning_panel/winning_btn_receive.png"
"url":"assets/share_scene/share_btn_goto.png"
},
{
"name":"over_img_png",
"name":"share_img1_png",
"type":"image",
"url":"assets/over_img.png"
"url":"assets/share_scene/share_img1.png"
},
{
"name":"game_over_btn_receive_png",
"name":"share_img2_png",
"type":"image",
"url":"assets/game_over_panel/game_over_btn_receive.png"
"url":"assets/share_scene/share_img2.png"
}
]
}
\ No newline at end of file
......@@ -11,20 +11,19 @@
"resource/skins/InputNumPanelSkin.exml",
"resource/skins/LoadingSkin.exml",
"resource/skins/MainSceneSkin.exml",
"resource/skins/OverPanelSkin.exml",
"resource/skins/PostPanelSkin.exml",
"resource/skins/ProgressBar.exml",
"resource/skins/RankListItem.exml",
"resource/skins/RankListPanelRewardItem.exml",
"resource/skins/RankListPanelSkin.exml",
"resource/skins/RulePanelSkin.exml",
"resource/skins/ShareSceneSkin.exml",
"resource/skins/SignInItem.exml",
"resource/skins/SignInPanelSkin.exml",
"resource/skins/StartSceneSkin.exml",
"resource/skins/ToastPanelSkin.exml",
"resource/skins/UsePropsItem.exml",
"resource/skins/UsePropsPanelSkin.exml",
"resource/skins/WinnigPanelSkin.exml"
"resource/skins/UsePropsPanelSkin.exml"
],
"path": "resource/default.thm.json"
}
\ No newline at end of file
......@@ -17,7 +17,7 @@
<e:Label text="历史最佳" x="339" y="252" size="24" textColor="0x1db13e"/>
<e:Label id="labelScore" text="" y="289" size="48" horizontalCenter="-122" textColor="0x1db13e"/>
<e:Label id="labelTopScore" text="" y="289" size="48" horizontalCenter="120" textColor="0x1db13e"/>
<ns1:MButton id="btnRestart" label="" y="390" x="32">
<ns1:MButton id="btnRestart" label="" y="395" left="35">
<ns1:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="game_over_btn_restart_png"/>
......@@ -25,7 +25,7 @@
</e:Skin>
</ns1:skinName>
</ns1:MButton>
<ns1:MButton id="btnUseProps" label="" y="390" x="284">
<ns1:MButton id="btnUseProps" label="" y="395" right="30">
<ns1:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="game_over_use_props_png"/>
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="OverPanelSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:ns1="*">
<e:Image source="over_img_png" x="195" y="44" />
<ns1:MButton id="prizeBtn" label="" width="152" height="40" anchorOffsetX="76" anchorOffsetY="20" x="96" y="56">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="prizeBtn_png" source.down="prizeBtn_png"
source.disabled="prizeBtn_png" />
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0" />
</e:Skin>
</e:skinName>
</ns1:MButton>
</e:Skin>
\ No newline at end of file
......@@ -3,11 +3,12 @@
<e:Group width="466" height="53">
<e:Image id="myBG" width="499" height="53" x="0" y="0" scaleX="1" scaleY="1" source="kuang_png"/>
<e:Image source="rank_separator_png" bottom="0" left="0" />
<ns1:MLabel limit="3" id="labelOtherRank" text="" size="28" bold="true" y="11" scaleX="1" scaleY="1" horizontalCenter="-204" textColor="0x1db13e"/>
<e:Group id="groupTopRank" y="5">
<e:Image id="imgBg" source="rank_top_rank_bg_png" x="10.32" y="1.31" />
<e:Label id="labelTopRank" text="" y="6.65" size="28" bold="true" horizontalCenter="4" />
<e:Label id="labelTopRank" text="1" y="6.65" size="28" bold="true" horizontalCenter="4" />
</e:Group>
<ns1:MLabel limit="3" id="labelOtherRank" text="4" size="28" bold="true" y="11" scaleX="1"
scaleY="1" horizontalCenter="-221.5" textColor="0x1db13e"/>
<ns1:MLabel id="labelNickname" limit="12" text="ID:111" y="16" size="24" left="67" textColor="0x1db13e"/>
<e:Label text="分数" x="321" y="16" size="24" textColor="0x1db13e"/>
<ns1:MLabel id="labelScore" limit="7" text="111" y="16" size="24" left="381" textColor="0x1db13e"/>
......
......@@ -2,6 +2,6 @@
<e:Skin class="RankListPanelRewardItem" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Group width="107" height="143">
<e:Image id="img" width="108" height="108" source=""/>
<e:Label id="label" text="" y="116.65" size="22" horizontalCenter="0" textColor="0x1db13e"/>
<e:Label id="label" text="" y="116.65" size="25.47" horizontalCenter="0" textColor="0x1db13e"/>
</e:Group>
</e:Skin>
\ No newline at end of file
......@@ -30,32 +30,24 @@
<e:Group id="rankGroup" width="100%" height="100%" />
</e:Scroller>
<e:Scroller id="prizeList" height="144" x="121" y="811" anchorOffsetX="0" anchorOffsetY="0">
<e:DataGroup id="prizeGroup" width="492" height="100%" itemRendererSkinName="RankListPanelRewardItem"
anchorOffsetX="0">
<e:DataGroup id="prizeGroup" width="492" height="100%" itemRendererSkinName="RankListPanelRewardItem" anchorOffsetX="0">
<e:ArrayCollection>
<e:Array>
<e:Object t="null" />
<e:Object t="null" />
<e:Object t="null" />
<e:Object t="null" />
<e:Object t="null"/>
<e:Object t="null"/>
<e:Object t="null"/>
<e:Object t="null"/>
</e:Array>
</e:ArrayCollection>
<e:layout>
<e:HorizontalLayout gap="16" />
<e:HorizontalLayout gap="16"/>
</e:layout>
</e:DataGroup>
</e:Scroller>
<e:Label id="noprizelab" text="很遗憾,未中奖" x="91" y="1054" size="42" width="569" textAlign="center" visible="false" />
<e:Group id="getprize" width="569" height="200" y="1022" horizontalCenter="0" visible="false">
<e:Label id="prizecode" text="" x="0" y="0" width="569" textAlign="center" size="26" scaleX="1" scaleY="1"
visible="false" />
<e:Label text="恭喜你入榜,请前往中国农业银行APP—生活—本地优惠\n —夺宝页打星球领奖页输入领奖码领取奖品" x="0" y="128" width="569" size="20"
textAlign="center" lineSpacing="10" scaleX="1" scaleY="1" visible="false" />
</e:Group>
<ns1:MLabel id="nickname2" text="" x="157" y="359" textColor="0x0a703e" size="24" limit="12" />
<e:Group id="groupWinning" y="1033" horizontalCenter="0" touchEnabled="false" visible="false">
<e:Label text="恭喜你,中奖啦" y="-34" size="36" horizontalCenter="0" />
<ns1:MButton id="prizeBtn" label="" scaleX="1" scaleY="1">
<e:Group id="getprize" width="569" height="200" y="1022" horizontalCenter="0">
<e:Label id="prizecode" text="" x="0" y="0" width="569" textAlign="center" size="26" scaleX="1" scaleY="1" />
<e:Button id="prizeBtn" label="" x="146" y="25" scaleX="1" scaleY="1">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="btn_view_reward_png" source.down="btn_view_reward_png"
......@@ -63,7 +55,9 @@
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0" />
</e:Skin>
</e:skinName>
</ns1:MButton>
</e:Button>
<e:Label text="恭喜你入榜,请前往中国农业银行APP—生活—本地优惠\n —夺宝页打星球领奖页输入领奖码领取奖品" x="0" y="128" width="569" size="20"
textAlign="center" lineSpacing="10" scaleX="1" scaleY="1" />
</e:Group>
<e:Image id="imgNotWinning" source="rank_not_winning_png" y="1003" horizontalCenter="0.5" visible="false" />
<ns1:MLabel id="nickname2" text="" x="157" y="359" textColor="0x0a703e" size="24" limit="12" />
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="ShareSceneSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:ns1="*" xmlns:w="http://ns.egret.com/wing">
<e:Image source="share_bg_jpg"/>
<e:Image source="share_img2_png" y="270" horizontalCenter="0.5"/>
<e:Image source="share_img1_png" y="658" horizontalCenter="-4"/>
<ns1:MButton id="btnGoto" label="" x="197" y="1002">
<ns1:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="share_btn_goto_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</ns1:skinName>
</ns1:MButton>
</e:Skin>
\ No newline at end of file
......@@ -14,7 +14,7 @@
</e:Skin>
</e:skinName>
</e:ToggleButton>
<ns1:MButton id="prizeBtn" label="" width="152" height="40" anchorOffsetX="76" anchorOffsetY="20" x="96" y="56">
<ns1:MButton id="prizeBtn" label="" width="152" height="40" anchorOffsetX="76" anchorOffsetY="20" x="96" y="56" visible="false">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="prizeBtn_png" source.down="prizeBtn_png" source.disabled="prizeBtn_png" />
......@@ -61,7 +61,7 @@
</e:skinName>
</e:Button>
</e:Group>
<ns1:MButton id="btnStart" label="" x="374.5" y="572" anchorOffsetX="179.5" anchorOffsetY="49">
<ns1:MButton id="btnStart" label="" x="374.5" y="716" anchorOffsetX="179.5" anchorOffsetY="49">
<ns1:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="startBtn_png" source.down="startBtn_png" source.disabled="startBtn_png" />
......@@ -69,13 +69,5 @@
</e:Skin>
</ns1:skinName>
</ns1:MButton>
<ns1:MButton id="btnShare" label="" y="658" horizontalCenter="0.5">
<ns1:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="start_btn_share_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</ns1:skinName>
</ns1:MButton>
</e:Group>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="WinnigPanelSkin" width="750" height="1624" xmlns:e="http://ns.egret.com/eui" xmlns:ns1="*" xmlns:w="http://ns.egret.com/wing">
<e:Image source="winning_bg_png" y="254" horizontalCenter="0"/>
<e:Label id="labelReward" text="" y="452" textColor="0x1db13e" size="30" horizontalCenter="0"/>
<ns1:MButton id="btnReceive" label="" y="719" horizontalCenter="0.5">
<ns1:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="winning_btn_receive_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</ns1:skinName>
</ns1:MButton>
<e:Image id="imgReward" width="210" height="210" horizontalCenter="0" verticalCenter="-215"/>
<ns1:MButton id="btnClose" label="" x="624" y="194">
<ns1:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="btn_close_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</ns1:skinName>
</ns1:MButton>
</e:Skin>
\ No newline at end of file
......@@ -25,6 +25,7 @@ import SoundMgr from "./ShootPlanet/Mgr/SoundMgr";
import Panel from "./ShootPlanet/MViews/MPanel";
import GameMgr from "./ShootPlanet/Mgr/GameMgr";
import InputNumPanel from "./ShootPlanet/Panel/InputNumPanel";
import ShareScene from "./ShootPlanet/Scene/ShareScene";
@Decorator.OnUpdate
class Main extends eui.UILayer {
......@@ -39,7 +40,7 @@ class Main extends eui.UILayer {
MTimer.init();
MTweenMgr.instance.init();
PhycicsSystem.init();
Net.urlReplace();
// Net.urlReplace();
MConfigs.updateConfig();
//注入自定义的素材解析器
......@@ -59,17 +60,6 @@ class Main extends eui.UILayer {
//设置屏幕适配方式
this.stage.scaleMode = egret.StageScaleMode.FIXED_WIDTH;
document.addEventListener("visibilitychange", function () {
if (document.visibilityState == "visible") {
if (SoundMgr.instance.musicEnabled) {
SoundMgr.instance.playMusic();
}
}
if (document.visibilityState == "hidden") {
SoundMgr.instance.stopMusic();
}
});
this.runGame().catch(e => {
console.log(e);
});
......@@ -86,7 +76,6 @@ class Main extends eui.UILayer {
await this.loadTheme();
await RES.loadGroup("loading");
await RES.loadGroup("toast_panel");
await RES.loadGroup("props");
}
catch (e) {
console.error(e);
......@@ -113,7 +102,7 @@ class Main extends eui.UILayer {
protected async createGameScene() {
console.log("CFG", NetUtils.getCFG());
Buried.init();
SceneCtrl.instance.change(StartScene);
SceneCtrl.instance.change(ShareScene);
}
}
......
import ComponentBase from "../MComponents/MComponentBase";
import MTimer from "../MComponents/MTimer";
function setPropertyDecorator(target: ComponentBase, name: string, callback: (context: ComponentBase) => void) {
if (!target["decoratorCallback"]) {
......@@ -40,7 +39,7 @@ export namespace Decorator {
this["onUpdate"] = this["onUpdate"] || (() => { });
this["onLoad"] = this["onLoad"] || (() => { });
let onUpdateCallback = () => this["onUpdate"](MTimer.deltaTime);
let onUpdateCallback = () => this["onUpdate"](egret.Timer.deltaTime);
this["addEventListener"](egret.Event.ENTER_FRAME, onUpdateCallback, this);
this["addEventListener"](egret.Event.ADDED_TO_STAGE, this["onLoad"], this);
this["addEventListener"](egret.Event.REMOVED_FROM_STAGE, () => {
......@@ -79,7 +78,7 @@ export namespace Decorator {
constructor(...arg: any[]) {
super(...arg);
this["onUpdate"] = this["onUpdate"] || (() => { });
let onUpdateCallback = () => this["onUpdate"](MTimer.deltaTime);
let onUpdateCallback = () => this["onUpdate"](egret.Timer.deltaTime);
this["addEventListener"](egret.Event.ENTER_FRAME, onUpdateCallback, this);
this["addEventListener"](egret.Event.REMOVED_FROM_STAGE, () => {
......
......@@ -157,16 +157,16 @@ export default class Ball extends MoveObjcet implements PoolElement {
this.y = MConst.BallInitPosY;
this.physics.velocity.x = this.getRandomVelocityX(dir) + 1 * dir;
this.physics.onMoved = ((owner) => {
this.physics.onMoved.add((owner, remove) => {
if (dir == 1) {
if (this.x > this.width / 2) {
this.startGravityStage(dir);
this.physics.onMoved = null;
remove();
}
} else if (dir == -1) {
if (this.x < MConst.DesignResolution.x - this.width / 2) {
this.startGravityStage(dir);
this.physics.onMoved = null;
remove();
}
}
});
......
......@@ -167,10 +167,10 @@ export default class Car extends GameObject implements Decorator.IDefaultCallbac
if (GameMgr.instance.pause) return;
if (this.invincibleDuration > 0) {
this.invincibleDuration -= MTimer.deltaTime;
this.invincibleDuration -= egret.Timer.deltaTime;
}
this.fireTimer += 1 * MTimer.dtFactor;
this.fireTimer += 1;
if (this.fireTimer >= 60 / this.context.fireSpeed) {
this.fire();
......
......@@ -2,7 +2,6 @@ import Physics from "./Physics";
import Collider, { CircleCollider, RectCollider, ColliderType, ColliderGroup, PointCollider } from "./Collider";
import DebugMgr from "../Mgr/DebugMgr";
import { arrayRemove } from "../Global/GUtils";
import MTimer from "../MComponents/MTimer";
let hashCode1: number = null;
let hashCode2: number = null;
......@@ -21,42 +20,26 @@ export default class PhycicsSystem {
egret.MainContext.instance.stage.addEventListener(egret.Event.ENTER_FRAME, ins.onUpdate, ins);
}
private _enabled: boolean = false;
public set enabled(v: boolean) {
this._enabled = v;
if (this._enabled == true)
this.pause = false;
this.clear();
}
public get enabled() {
return this._enabled;
}
public pause: boolean = false;
private phycicsList: Physics[] = [];
private clear() {
constructor() {
for (let i = 0; i <= GroupMaxIndex; i++) {
this.colliderList[i] = [];
}
this.phycicsList = [];
}
private onUpdate() {
if (this.pause) return;
for (let i of PhycicsSystem.instance.phycicsList) {
if (this.enabled == false) return;
i.onFixedUpdate(MTimer.dtFactor);
i.onFixedUpdate();
}
this.detectCollision();
return false;
}
......@@ -85,9 +68,6 @@ export default class PhycicsSystem {
}
public addCollider(collider: Collider) {
if (typeof this.colliderList[collider.group] == "undefined") {
this.colliderList[collider.group] = [];
}
this.colliderList[collider.group].push(collider);
}
......@@ -104,6 +84,8 @@ export default class PhycicsSystem {
/**检测碰撞 */
public detectCollision() {
let a = 0;
//查找所有碰撞
let i = 0,
j = 0,
......@@ -115,12 +97,11 @@ export default class PhycicsSystem {
for (i = 0; i <= length - 1; i++) {
for (j = i + 1; j <= length - 1; j++) {
if (CollisionMap[i] & 1 << j) {
if (this.enabled == false) return;
group1 = this.colliderList[i];
group2 = this.colliderList[j];
for (m = 0; m <= group1.length - 1; m++) {
for (n = 0; n <= group2.length - 1; n++) {
// if (this.enabled == false) return;
a++;
this.detectTraverse(group1[m], group2[n]);
}
}
......@@ -270,11 +251,7 @@ function circleToPoint(circle: CircleCollider, point: PointCollider) {
function pointToRect(point: PointCollider, rect: RectCollider) {
rect.getWorldPosition(tempPoint1);
point.getWorldPosition(tempPoint2);
if (tempPoint2[1] < tempPoint1[1] + rect.rect.height
&& tempPoint2[1] > tempPoint1[1]
&& tempPoint2[0] > tempPoint1[0]
&& tempPoint2[0] < tempPoint1[0] + rect.rect.width
) {
if (tempPoint2[1] < tempPoint1[1] + rect.rect.height) {
return true;
} else {
return false;
......
......@@ -2,8 +2,11 @@ import GameComponent from "./GameComponent";
import GameObject from "./GameObject";
import PhycicsSystem from "./PhycicsSystem";
import Collider from "./Collider";
import DebugMgr from "../Mgr/DebugMgr";
import MEvent from "../MComponents/MEvent";
/**物理组件
* 更新游戏物体的移动旋转
*/
export default class Physics extends GameComponent {
/**旋转速度
* @单位 (弧度制)度/帧
......@@ -27,19 +30,22 @@ export default class Physics extends GameComponent {
}
public _collider: Collider = null;
public onFixedUpdate(dtFactor: number) {
this.velocity.x += this.acceleration.x * dtFactor;
this.velocity.y += this.acceleration.y * dtFactor;
/**物体位置变化的监听器 */
public onMoved = new MEvent<(owner: GameObject, remove: () => void) => void>();
/**物理更新
* 目前基于帧
*/
public onFixedUpdate() {
this.velocity.x += this.acceleration.x;
this.velocity.y += this.acceleration.y;
if (this.velocity.length > 0) {
this.moveTo(
this.owner.x += this.velocity.x * dtFactor,
this.owner.y += this.velocity.y * dtFactor
);
this.moveTo(this.owner.position.add(this.velocity));
}
//旋转
if (this.rotateVelocity != 0) {
this.owner.rotation += this.rotateVelocity * dtFactor;
this.owner.rotation += this.rotateVelocity;
}
}
......@@ -56,11 +62,9 @@ export default class Physics extends GameComponent {
this.owner.y = x.y;
}
this.onMoved && this.onMoved(this.owner);
this.onMoved.call(this.owner);
}
public onMoved: (owner: GameObject) => void;
protected onDisabled() {
PhycicsSystem.instance.remove(this);
}
......@@ -68,6 +72,7 @@ export default class Physics extends GameComponent {
PhycicsSystem.instance.add(this);
}
/**碰撞器尺寸变化时的回调 */
public onColliderResize(collider: Collider) {
let center = collider.getCenter();
this.owner.anchorOffsetX = center[0];
......
......@@ -8,7 +8,6 @@ import Loading from "../../loading/Loading";
import Net from "./Net";
import GameMgr from "../Mgr/GameMgr";
import CommonPanel from "../Panel/CommonPanel";
import { Share } from "../../../libs/tw/util/Share";
export const getResPath = () => window['resPath'] || '';
export const getSkinPath = (key: any) => `resource/skins/${key}Skin.exml`
......@@ -171,9 +170,9 @@ export function arrayRemove(array: any[], target: any): any[] {
return newArray;
}
export function showSharePanel(onClose?: () => void) {
export function showSharePanel() {
if (true) {
PanelCtrl.instance.show<SharePanel>(SharePanel).onClose = onClose;
PanelCtrl.instance.show(SharePanel);
} else {
PanelCtrl.instance.show<CommonPanel>(class extends CommonPanel {
onSkinComplete() {
......
......@@ -185,24 +185,7 @@ export namespace MConfigs {
url: "http://activity-2.m.duiba.com.cn/customShare/share?id=3651"
}
export const rankPrizes = [
{
text: "第1名",
url: `prize_0_jpg`
},
{
text: "第2-4名",
url: `prize_1_jpg`
},
{
text: "第5-7名",
url: `prize_2_jpg`
},
{
text: "第8-10名",
url: `prize_3_jpg`
}
];
export const gotoUrl="http://www.baidu.com"
}
......
......@@ -99,7 +99,7 @@ export default class Net {
}
public static urlReplace() {
for (let i of Object.keys(Net.Url)) {
for (let i of Object.keys(Net.uri)) {
for (let j of Object.keys(Net.urlReplaceConfig)) {
Net.Url[i] = Net.Url[i].replace(new RegExp(j, "g"), Net.urlReplaceConfig[j]);
}
......@@ -125,8 +125,7 @@ export default class Net {
taskData: "/projectx/{projectId}/join_2/data.do",
taskComplete: "/projectx/{projectId}/join_2/join.do",
rankListOld: "/hdtool/rank/recentRankListNew",
share: "/projectx/{projectId}/join_2/join.do",
queryPrize: `/projectx/{projectId}/prize.query`
share: "/projectx/{projectId}/join_2/join.do"
}
public static readonly uri = {
......@@ -147,7 +146,6 @@ export default class Net {
share: `/projectx/${window['projectId']}/join_3/join.do`,
getNumStatus: "/customActivity/jiangxiAbc/catchDoll/getPhoneStatus",
verifyNum: "/customActivity/jiangxiAbc/catchDoll/submitPhone"
}
......
import MSVGAClip from "./MSVGAClip";
import MTimer from "./MTimer";
let lastTime = 0;
let curTime = 0;
function updateDeltaTime() {
lastTime = curTime;
curTime = egret.getTimer();
MTimer.deltaTime = curTime - lastTime;
}
// let deltaTimeBeforPause: number;
export function customClassPrototype() {
......@@ -37,22 +28,22 @@ export function customClassPrototype() {
return target;
}
/* egret.Timer["_deltaTime"] = 0;
egret.Timer["_deltaTime"] = 0;
egret.Timer["_lastTime"] = 0;
egret.Timer["_curTime"] = 0;
egret.Timer["_updateDeltaTime"] = function () {
egret.Timer["_lastTime"] = egret.Timer["_curTime"];
egret.Timer["_curTime"] = egret.getTimer();
egret.Timer["_deltaTime"] = egret.Timer["_curTime"] - egret.Timer["_lastTime"];
} */
/* Object.defineProperty(egret.Timer, "deltaTime", {
}
Object.defineProperty(egret.Timer, "deltaTime", {
get: function () {
return deltaTime;
return 16.6666;
return this["_deltaTime"];
}
}); */
egret.MainContext.instance.stage.addEventListener(egret.Event.ENTER_FRAME, updateDeltaTime, null);
});
egret.MainContext.instance.stage.addEventListener(egret.Event.ENTER_FRAME, function () {
egret.Timer["_updateDeltaTime"]();
}, null);
egret.lifecycle.onPause = () => {
// deltaTimeBeforPause = egret.getTimer() - egret.Timer["_curTime"];
......@@ -61,7 +52,7 @@ export function customClassPrototype() {
egret.Timer["_curTime"] = egret.getTimer(); /* - deltaTimeBeforPause || 0; */
}
/* Array.prototype.remove = function (element: any) {
return this.filter((e: any) => e != element);
} */
Array.prototype.remove = function (element: any) {
return this.filter((e: any) => e != element);
}
}
\ No newline at end of file
const DefaultDtFactor = 60 / 1000;
/**自定义计时器 */
export default class MTimer {
private static onFrameList: ((dt: number, self: Function) => void)[] = [];
private static timerList: ((self: Function) => void)[] = [];
public static deltaTime: number = 0;
public static get dtFactor() {
return MTimer.deltaTime * DefaultDtFactor;
}
public static init() {
egret.MainContext.instance.stage.addEventListener(egret.Event.ENTER_FRAME, () => {
for (let i = 0; i < MTimer.onFrameList.length; i++) {
MTimer.onFrameList[i](MTimer.deltaTime, MTimer.onFrameList[i]);
MTimer.onFrameList[i](egret.Timer.deltaTime, MTimer.onFrameList[i]);
}
for (let i = 0; i < MTimer.timerList.length; i++) {
......@@ -28,7 +22,7 @@ export default class MTimer {
public static set(frame: number, onTimeOut: () => void) {
let count = 0;
MTimer.timerList.push((self: Function) => {
count += MTimer.dtFactor;
count++;
if (count >= frame) {
onTimeOut();
MTimer.timerList = MTimer.timerList.filter(e => e != self);
......@@ -41,7 +35,7 @@ export default class MTimer {
let count = 0;
MTimer.onFrameList.push((deltaTime: number, self: Function) => {
callback(deltaTime);
count += MTimer.dtFactor;
count++;
if (count >= frameCount) {
MTimer.removeOnFrame(self);
}
......
import { MUtils } from "../Global/MUtils";
import MTimer from "./MTimer";
/**自定义缓动类
* 基于帧
*/
class MTween {
public static readonly frameRate = 60;
private tweenList: MTweenBase[] = [];
......@@ -41,7 +43,7 @@ class MTween {
public update() {
if (!this.currentTween) return;
this.currentTween.apply(MTimer.dtFactor);
this.currentTween.apply();
if (this.currentTween.frameCount <= 0) {
if (this.tweenList.length > 0) {
this.currentTween = this.tweenList.shift();
......@@ -62,7 +64,7 @@ abstract class MTweenBase {
}
protected start() { }
public apply(dtFactor?: number) {
public apply() {
if (this.started == false) {
this.start();
this.started = true;
......@@ -103,10 +105,10 @@ class LinearTween extends MTweenBase {
}
}
public apply(dtFactor: number) {
super.apply(dtFactor);
public apply() {
super.apply();
Object.keys(this.once).forEach(key => {
this.tweenObjet.target[key] += this.once[key] * dtFactor;
this.tweenObjet.target[key] += this.once[key];
});
}
}
......@@ -154,7 +156,6 @@ export default class MTweenMgr {
private isTraversing = false;
public init() {
// egret.startTick(this.update, this);
egret.MainContext.instance.stage.addEventListener(egret.Event.ENTER_FRAME, this.update, this);
}
......
......@@ -66,5 +66,4 @@ export default class GameMgr {
// public userEnabled = false;
public inited: boolean = false;
public activityEnd: boolean = false;
}
\ No newline at end of file
......@@ -12,11 +12,11 @@ export default class ParticleMgr extends PoolMgr<Bullet> {
createElement([context]: [MainScene]) {
let b = new Bullet(context);
b.physics.onMoved = () => {
b.physics.onMoved.add(() => {
if (!this.containRect.contains(b.x, b.y)) {
this.destroy(b);
}
};
});
this.layer.addChild(b);
return b;
}
......
......@@ -5,7 +5,6 @@ interface DataType {
title: string,
content: string,
btnText: string,
onClose?: () => void;
};
export default class CommonPanel extends Panel {
......@@ -23,10 +22,7 @@ export default class CommonPanel extends Panel {
onSkinComplete() {
super.onSkinComplete();
this.btnClose.onTap(this, () => {
this.hidePanel();
this.data.onClose && this.data.onClose();
});
this.btnClose.onTap(this, () => this.hidePanel());
this.labelTitle.text = this.data.title;
this.labelContent.text = this.data.content;
this.btn.label = this.data.btnText;
......
......@@ -60,9 +60,10 @@ export default class GameOverPanel extends Panel implements Decorator.IDefaultCa
(id) => {
if (typeof id == "string") { //使用的是加分卡
this.context.finalSubmit(id, () => {
// ToastPanel.show("加分成功");
PanelCtrl.instance.closeAll();
this.onTurnStart();
ToastPanel.show("加分成功", true, () => {
PanelCtrl.instance.closeAll();
this.onTurnStart();
});
});
} else { //使用的是复活卡
this.hidePanel();
......@@ -80,14 +81,11 @@ export default class GameOverPanel extends Panel implements Decorator.IDefaultCa
}
private onTurnStart() {
SceneCtrl.instance.change(StartScene);
/* if (GameMgr.instance.gameCount <= 0) {
showSharePanel(() => {
SceneCtrl.instance.change(StartScene);
});
if (GameMgr.instance.gameCount <= 0) {
showSharePanel();
} else {
SceneCtrl.instance.change(StartScene);
} */
}
}
......
......@@ -14,11 +14,12 @@ export default class InputNumPanel extends Panel {
super.onSkinComplete();
this.btnOk.addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
let value = this.editor.text;
if (new RegExp(/^[1][3,4,5,7,8][0-9]{9}$/).test(value)) {
if (/^[1][3,4,5,7,8][0-9]{9}$/.test(value)) {
Net.sendPost(Net.uri.verifyNum, { //上传手机号
activityId: window["activityId"],
phone: value
}, (res) => {
this.hidePanel();
switch (res.data) {
case "0":
ToastPanel.show("号码未上传");
......@@ -32,7 +33,6 @@ export default class InputNumPanel extends Panel {
break;
}
});
this.hidePanel();
} else {
ToastPanel.show('请输入正确的手机号');
}
......
......@@ -6,9 +6,6 @@ import MLabel from "../MUI/MLabel";
import { MConfigs } from "../Global/MConfigs";
import ToastPanel from "../MComponents/MToastPanel";
import Panel from "../MViews/MPanel";
import { NetManager } from "../../../libs/tw/manager/NetManager";
import PanelCtrl from "../MCtrls/MPanelCtrl";
import WinnigPanel from "./WinnigPanel";
interface Record {
userId: number,
......@@ -38,13 +35,11 @@ export default class RankListPanel extends Panel {
public prizeGroup: eui.DataGroup;
public noprizelab: eui.Label;
public prizecode: eui.Label;
public prizeBtn: MButton
public prizeBtn: eui.Button;
public getprize: eui.Group;
public nickname2: MLabel;
public labelNow: eui.Label;
public labelLast: eui.Label;
public groupWinning: eui.Group;
public imgNotWinning: eui.Image;
private mydata: any = "";
private nowdata = "";
......@@ -81,10 +76,6 @@ export default class RankListPanel extends Panel {
this.closeBtn.onTap(this, () => {
this.hidePanel()
});
this.prizeBtn.onTap(this, () => {
// PanelCtrl.instance.show<WinnigPanel>(WinnigPanel).data = this.winningPanelData;
window.location.href = this.winningPanelData.receiveUrl;
});
this.prizecode.onTap(this, () => { this.copyTXT(); ToastPanel.show("已复制") })
this.getData();
......@@ -103,7 +94,24 @@ export default class RankListPanel extends Panel {
this.label.text = this.data.text;
}
}
this.prizeGroup.dataProvider = new eui.ArrayCollection(MConfigs.rankPrizes);
this.prizeGroup.dataProvider = new eui.ArrayCollection([
{
text: "第1名",
url: `prize_0_jpg`
},
{
text: "第2-4名",
url: `prize_1_jpg`
},
{
text: "第5-7名",
url: `prize_2_jpg`
},
{
text: "第8-10名",
url: `prize_3_jpg`
}
]);
}
initEvents() {
......@@ -112,7 +120,6 @@ export default class RankListPanel extends Panel {
this.closeBtn.onTap(this, () => {
this.hidePanel()
});
this.prizecode.onTap(this, () => { this.copyTXT(); ToastPanel.show("已复制") })
}
......@@ -216,9 +223,6 @@ export default class RankListPanel extends Panel {
}
showmyData(data, type) {
this.imgNotWinning.visible = false;
this.groupWinning.visible = false;
if (type == 1) {
if (data.currentPeriod && data.currentPeriod.myUserId) {
......@@ -233,7 +237,7 @@ export default class RankListPanel extends Panel {
} else {
this.myrank.text = "未上榜";
}
this.prizedate.text = "排行榜奖励" + data.currentPeriod.openDate.substring(4, 6) + "月" + data.currentPeriod.openDate.substring(6) + "日10:00开奖";
this.prizedate.text = "排行榜奖励" + data.currentPeriod.openDate.substring(4, 6) + "月" + data.currentPeriod.openDate.substring(6) + "日15:00开奖";
} else {
this.nickname.text = "我";
this.maxscore.text = "暂无数据";
......@@ -242,14 +246,6 @@ export default class RankListPanel extends Panel {
}
if (data.currentPeriod) {
if (data.currentPeriod.openFlag) {
if (data.currentPeriod.userRecordId) {
this.groupWinning.visible = true;
this.setWinningPanelData(data.currentPeriod);
} else {
this.imgNotWinning.visible = true;
}
}
/* if (data.currentPeriod.openFlag) {
if (data.currentPeriod.userRecordId) {
//获取领奖码 点击跳转
......@@ -273,7 +269,7 @@ export default class RankListPanel extends Panel {
} else {
this.getprize.visible = false;
this.noprizelab.visible = false;
} */
}
}
} else {
......@@ -310,14 +306,6 @@ export default class RankListPanel extends Panel {
}
if (data.prevPeriod) {
if (data.prevPeriod.openFlag) {
if (data.prevPeriod.userRecordId) {
this.groupWinning.visible = true;
this.setWinningPanelData(data.prevPeriod);
} else {
this.imgNotWinning.visible = true;
}
}
/* if (data.prevPeriod.openFlag) {
if (data.prevPeriod.userRecordId) {
//获取领奖码 点击跳转
......@@ -341,33 +329,12 @@ export default class RankListPanel extends Panel {
} else {
this.getprize.visible = false;
this.noprizelab.visible = false;
} */
}
}
}
}
private winningPanelData: {
// imgUrl: string,
// name: string,
receiveUrl: string
} = null;
private setWinningPanelData(resData: any) {
this.winningPanelData = {
// imgUrl: resData.prizeIcon,
// name: res.data[0].name,
receiveUrl: "http://activity.m.duiba.com.cn/aaw/projectx/takePrize?projectOrderNo=" + resData.userRecordId
}
/* Net.sendGet(Net.Url.queryPrize, {
ids: resData.userRecordId
}, (res) => {
}) */
}
getData() {
Net.sendGet(Net.uri.myrankList, undefined, (ret) => {
......
import Panel from "../MViews/MPanel";
import { Decorator } from "../Decorator/Decorator";
import MButton from "../MUI/MButton";
interface DataType {
imgUrl: string,
name: string,
receiveUrl: string,
onClose?: () => void
}
export default class WinnigPanel extends Panel {
get skinKey() { return "WinnigPanel" }
public labelReward: eui.Label;
public btnReceive: MButton;
public imgReward: eui.Image;
public btnClose: MButton;
data: DataType;
onSkinComplete() {
super.onSkinComplete();
this.labelReward.text = `获得${this.data.name}奖励`;
this.imgReward.source = this.data.imgUrl;
this.btnReceive.onTap(this, () => {
this.hidePanel();
this.data.onClose && this.data.onClose();
window.location.href = this.data.receiveUrl;
});
this.btnClose.onTap(this, () => {
this.hidePanel();
this.data.onClose && this.data.onClose();
});
}
}
\ No newline at end of file
......@@ -26,11 +26,8 @@ import GameOverPanel from "../Panel/GameOverPanel";
import { initNECaptcha } from "../MComponents/initNECaptcha";
import ToastPanel from "../MComponents/MToastPanel";
import { arrayRemove } from "../Global/GUtils";
import WinnigPanel from "../Panel/WinnigPanel";
import PhycicsSystem from "../Game/PhycicsSystem";
@Decorator.OnUpdate
@Decorator.OnDestroy
export default class MainScene extends Scene implements Decorator.IDefaultCallback {
get skinKey() { return "MainScene" }
public groupTop: eui.Group;
......@@ -215,13 +212,9 @@ export default class MainScene extends Scene implements Decorator.IDefaultCallba
super(data);
this.startId = data.startId;
this.maxScore = data.maxScore;
PhycicsSystem.instance.enabled = true;
}
onDestroy() {
PhycicsSystem.instance.enabled = false;
}
onSkinComplete() {
super.onSkinComplete();
......@@ -490,7 +483,7 @@ export default class MainScene extends Scene implements Decorator.IDefaultCallba
//滑块验证
let validate = await new Promise<string>(resolve => {
if (typeof GameMgr.instance.minEnableCaptchaScore == "number" && this.score >= GameMgr.instance.minEnableCaptchaScore) {
if (typeof GameMgr.instance.minEnableCaptchaScore == "number" && this.score > GameMgr.instance.minEnableCaptchaScore) {
initNECaptcha({
captchaId: MConst.captchaId,
callback: (ret: { validate: string }) => {
......@@ -511,19 +504,7 @@ export default class MainScene extends Scene implements Decorator.IDefaultCallba
validate: validate
}, (res) => {
Loading.instace.hide();
let prize = res.data.prize;
if (prize) {
PanelCtrl.instance.show<WinnigPanel>(WinnigPanel).data = {
imgUrl: prize.icon,
receiveUrl: prize.url,
name: prize.name,
onClose: () => {
onSubmited && onSubmited();
}
};
} else {
onSubmited && onSubmited();
}
onSubmited && onSubmited();
}, true);
}
......
import Panel from "../MViews/MPanel";
import Scene from "../MViews/MScene";
import { Decorator } from "../Decorator/Decorator";
import MButton from "../MUI/MButton";
import { MConfigs } from "../Global/MConfigs";
@Decorator.ClassName("OverPanel")
export default class OverPanel extends Panel {
public prizeBtn: MButton;
@Decorator.ClassName("ShareScene")
export default class ShareScene extends Scene {
public btnGoto: MButton;
onSkinComplete() {
super.onSkinComplete();
this.prizeBtn.onTap(this, () => {
window.location.href = MConfigs.rewardRecordUrl;
})
this.btnGoto.onTap(this, () => {
window.location.href = MConfigs.gotoUrl;
});
}
}
\ No newline at end of file
......@@ -22,7 +22,6 @@ import { NetManager } from "../../../libs/tw/manager/NetManager";
import PostPanel from "../Panel/PostPanel";
import { showSharePanel, isWeiXin, wxConfig, invokeWX } from "../Global/GUtils";
import InputNumPanel, { ForbidPanel } from "../Panel/InputNumPanel";
import OverPanel from "../Panel/OverPanel";
@Decorator.ClassName("StartScene")
export default class StartScene extends Scene {
......@@ -38,7 +37,6 @@ export default class StartScene extends Scene {
// public btnBack: eui.Button;
// private leftTimes: number = null;
public musicBtn: eui.ToggleButton;
public btnShare: MButton;
private startExposure: any;
......@@ -48,24 +46,12 @@ export default class StartScene extends Scene {
async onSkinComplete() {
super.onSkinComplete();
if (!GameMgr.instance.inited) {
if (isWeiXin()) {
wxConfig();
}
GameMgr.instance.activityEnd = await new Promise<boolean>((resolve, reject) => {
Net.sendGet(Net.uri.visit, undefined, (res) => {
resolve(res.data.activityEnd);
});
});
this.loadMusic();
this.verify();
} else {
this.init();
}
......@@ -108,7 +94,7 @@ export default class StartScene extends Scene {
private init() {
GameMgr.instance.inited = true;
/* if (isWeiXin()) {
if (isWeiXin()) {
invokeWX(() => {
let timestamp = NetUtils.getTimestamp();
Net.sendPost(Net.uri.share, {
......@@ -118,7 +104,7 @@ export default class StartScene extends Scene {
SceneCtrl.instance.currentScene.dispatchEvent(new egret.Event("shareSuccess"));
}, () => true);
});
} */
}
this.initBuried()
this.labelFreeTime.text = "";
......@@ -139,45 +125,18 @@ export default class StartScene extends Scene {
SoundMgr.instance.enabled = (evt.target as eui.ToggleButton).selected;
}, this);
// this.prizeBtn.visible = false;
this.prizeBtn.onTap(this, () => {
window.location.href = MConfigs.rewardRecordUrl;
})
this.btnShare.onTap(this, () => {
if (GameMgr.instance.activityEnd) {
ToastPanel.show("活动已结束");
return;
}
setTimeout(() => {
let timestamp = NetUtils.getTimestamp();
Net.sendPost(Net.uri.share, {
timestamp: timestamp,
token: NetUtils.md5(timestamp + "duiba4jxabc")
}, () => {
SceneCtrl.instance.currentScene.dispatchEvent(new egret.Event("shareSuccess"));
}, () => true);
}, 4000);
window.location.href = "http://www.abchina.com/luascript/shareOnClick/%7B%22return%22%3A%7B%22share_title%22%3A%22%E8%80%81%E8%A1%A8%EF%BC%8C%E8%BF%99%E6%AC%BE%E6%B8%B8%E6%88%8F%E8%B4%BC%E5%A5%BD%E7%8E%A9%E5%84%BF%EF%BC%81%22%2C%22share_text%22%3A%22%E6%AF%8F%E5%A4%A9%E4%B8%8A%E5%86%9C%E8%A1%8CAPP%E7%8E%A9%E6%89%93%E6%98%9F%E7%90%83%EF%BC%8C%E8%B6%85%E5%A4%9A%E4%B8%B0%E5%AF%8C%E5%A5%96%E5%93%81%E7%AD%89%E4%BD%A0%E6%9D%A5%E6%8B%BF%EF%BC%81%22%2C%22share_url%22%3A%22http%3A%2F%2Factivity-3.m.duiba.com.cn%2FcustomShare%2Fshare%3Fid%3D3693%22%2C%22share_img_url%22%3A%22http%3A%2F%2Fduiba.oss-cn-hangzhou.aliyuncs.com%2Fdb_games%2Factivity%2Fdxq_jxnh%2Fshare.png%22%7D%7D";
});
this.prizeBtn.visible = false;
this.btnStart.onOnceTap(this, (resume) => {
if (GameMgr.instance.activityEnd) {
ToastPanel.show("活动已结束");
resume();
return;
}
NetManager.ins.clickLog(this.startExposure);
// this.btnStart.touchEnabled = false;
// this.btnStart.touchChildren = false;
Loading.instace.show();
let leftTimes = GameMgr.instance.gameCount;
if (typeof leftTimes == "number") {
if (leftTimes > 0) { //有剩余次数
if (true) { //有剩余次数
Net.sendPost(Net.uri.start, undefined, (res) => {
SceneCtrl.instance.change(MainScene, {
startId: res.data.startId,
maxScore: res.data.maxScore
......@@ -189,6 +148,10 @@ export default class StartScene extends Scene {
this.btnStart.touchEnabled = true;
this.btnStart.touchChildren = true;
showSharePanel();
// let panel = PanelCtrl.instance.show<SharePanel>(SharePanel);
// panel;
// panel.context = this;
resume();
}
}
......@@ -231,11 +194,6 @@ export default class StartScene extends Scene {
}
onTap_signBtn() {
if (GameMgr.instance.activityEnd) {
ToastPanel.show("活动已结束");
return;
}
NetManager.ins.clickLog(this.signExposure);
Net.sendGet(Net.uri.signData, undefined, (res) => {
PanelCtrl.instance.show(SignInPanel, { response: res });
......@@ -248,17 +206,12 @@ export class SharePanel extends CommonPanel {
private shareExposure: any;
context: StartScene = null;
onClose: () => void;
constructor() {
super();
this.init({
title: "次数已用完",
content: "赶快号召小伙伴一起来参与吧~",
btnText: "分享好友",
onClose: () => {
this.onClose && this.onClose();
}
btnText: "分享好友"
});
}
......@@ -267,20 +220,10 @@ export class SharePanel extends CommonPanel {
this.initBuried();
this.btn.onOnceTap(this, (resume) => {
NetManager.ins.clickLog(this.shareExposure);
setTimeout(() => {
let timestamp = NetUtils.getTimestamp();
Net.sendPost(Net.uri.share, {
timestamp: timestamp,
token: NetUtils.md5(timestamp + "duiba4jxabc")
}, () => {
SceneCtrl.instance.currentScene.dispatchEvent(new egret.Event("shareSuccess"));
}, () => true);
}, 4000);
window.location.href = "http://www.abchina.com/luascript/shareOnClick/%7B%22return%22%3A%7B%22share_title%22%3A%22%E8%80%81%E8%A1%A8%EF%BC%8C%E8%BF%99%E6%AC%BE%E6%B8%B8%E6%88%8F%E8%B4%BC%E5%A5%BD%E7%8E%A9%E5%84%BF%EF%BC%81%22%2C%22share_text%22%3A%22%E6%AF%8F%E5%A4%A9%E4%B8%8A%E5%86%9C%E8%A1%8CAPP%E7%8E%A9%E6%89%93%E6%98%9F%E7%90%83%EF%BC%8C%E8%B6%85%E5%A4%9A%E4%B8%B0%E5%AF%8C%E5%A5%96%E5%93%81%E7%AD%89%E4%BD%A0%E6%9D%A5%E6%8B%BF%EF%BC%81%22%2C%22share_url%22%3A%22http%3A%2F%2Factivity-3.m.duiba.com.cn%2FcustomShare%2Fshare%3Fid%3D3693%22%2C%22share_img_url%22%3A%22http%3A%2F%2Fduiba.oss-cn-hangzhou.aliyuncs.com%2Fdb_games%2Factivity%2Fdxq_jxnh%2Fshare.png%22%7D%7D";
this.hidePanel();
this.onClose && this.onClose();
PanelCtrl.instance.show<PostPanel>(PostPanel).onClose = () => {
SceneCtrl.instance.change(StartScene);
}
this.hidePanel()
});
}
initBuried() {
......@@ -292,6 +235,3 @@ export class SharePanel extends CommonPanel {
}
}
......@@ -25,7 +25,7 @@ const config = {
data: './json/getCoupon.json'
},
"/projectx/pff09b4eb/join_2/data.do": {
data: './json/rankList.json'
data: './json/taskData.json'
},
"/projectx/pff09b4eb/getRanking.query": {
data: './json/queryRankListData.json'
......@@ -63,9 +63,6 @@ const config = {
},
"/customActivity/jiangxiAbc/catchDoll/submitPhone": {
data: './json/verifyNum.json'
},
"/projectx/projectId/prize.query": {
data: './json/queryPrize.json'
}
}
......
{
"success": true,
"message": "",
"code": "",
"data": {
"finalScore": 3000,
"maxScore": 5000,
"prize": {
"prizeId": "1234",
"name": "50金币",
"icon": "",
"url": "http://www.baidu.com"
}
"success":true,
"message":"",
"code":"",
"data":{
"finalScore":3000,
"maxScore":5000
}
}
\ No newline at end of file
......@@ -3,5 +3,5 @@
"code":"000000",
"desc":"成功",
"timestamp":1552548376799,
"data":"2"
"data":"0"
}
\ No newline at end of file
{
"data":[
{
"icon":"//yun.dui88.com/images/201907/xsit2cvmyl.jpeg",
"id":"g42b074e4",
"name":"实物111",
"refId":"49356",
"refType":"object",
"stock":100,
"type":2
}
],
"success":true
}
\ No newline at end of file
{
"success": true,
"message": "",
"code": "",
"data": {
"currentPeriod": {
"type": "20191028",
"myUserId": 9527,
"myScore": 5555,
"myIndex": 12,
"openDate": "20191104",
"openFlag": true,
"userRecordId": null,
"prizeIcon": null
"success":true,
"message":"",
"code":"",
"data":{
"currentPeriod":{
"type":"20191028",
"myUserId":9527,
"myScore":5555,
"myIndex":12,
"openDate":"20191104",
"openFlag":false,
"userRecordId":null
},
"prevPeriod": {
"type": "20191021",
"myUserId": 9527,
"myScore": 666,
"myIndex": 21,
"openDate": "20191028",
"openFlag": true,
"userRecordId": "1",
"prizeIcon": ""
"prevPeriod":{
"type":"20191021",
"myUserId":9527,
"myScore":666,
"myIndex":21,
"openDate":"20191028",
"openFlag":true,
"userRecordId":null
}
}
}
\ No newline at end of file
......@@ -3,9 +3,8 @@
"message": "",
"code": "",
"data": {
"leftTimes": 10,
"leftTimes": 0,
"leftShareTimes": 1,
"minEnableCaptchaScore": 5000,
"activityEnd": true
"minEnableCaptchaScore": 5000
}
}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta content="telephone=no" name="format-detection" />
<title>我的奖品</title>
<style>
.g-abc-nav {
position: relative;
z-index: 98;
top: 0;
left: 0;
width: 100%;
height: 44px;
background: #FFF;
text-align: center;
}
.g-abc-nav .g-abc-nav__back {
position: absolute;
left: 0;
top: 0;
width: 45px;
height: 100%;
background: url(//yun.duiba.com.cn/upload/s1wkj29w6e.png) center center no-repeat;
background-size: 24px 24px;
}
.g-abc-nav .g-abc-nav__back:active {
opacity: 0.8;
}
.g-abc-nav .g-abc-nav__title {
display: inline-block;
line-height: 44px;
font-size: 18px;
max-width: 70%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
color: #000;
}
.is-ios-body .db-address-list {
padding-top: 30px;
}
.is-ios-body .dui-address .dui-address__container {
top: 50px;
}
.is-ios-body .applysale-popup {
padding-top: 30px;
}
.is-ios-body .prize-detail-modal {
padding-top: 30px;
}
</style>
<script>
!function (e, i) { var t = e.documentElement, n = navigator.userAgent.match(/iphone|ipod|ipad/gi), a = n ? Math.min(i.devicePixelRatio, 3) : 1, m = "orientationchange" in window ? "orientationchange" : "resize"; t.dataset.dpr = a; for (var d, l, c = !1, o = e.getElementsByTagName("meta"), r = 0; r < o.length; r++)l = o[r], "viewport" == l.name && (c = !0, d = l); if (c) d.content = "width=device-width,initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0,user-scalable=no"; else { var o = e.createElement("meta"); o.name = "viewport", o.content = "width=device-width,initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0,user-scalable=no", t.firstElementChild.appendChild(o) } var s = function () { var e = t.clientWidth; e / a > 640 && (e = 640 * a), window.remScale = e / 640, t.style.fontSize = 200 * (e / 640) + "px" }; s(), e.addEventListener && i.addEventListener(m, s, !1) }(document, window);
</script>
<script type="text/javascript">
if (localStorage && localStorage.iswebp) {
document.getElementsByTagName('html')[0].setAttribute('duiba-webp', 'true')
}
</script>
</head>
<body>
<div class="g-abc-nav">
<div class="g-abc-nav__back"></div>
<div class="g-abc-nav__title"></div>
</div>
<script>
(function () {
var barDom = document.querySelector('.g-abc-nav');
var backDom = document.querySelector('.g-abc-nav__back');
var titleDom = document.querySelector('.g-abc-nav__title');
console.error(backDom);
setTimeout(function () {
titleDom.innerHTML = document.title
}, 200);
function commonGoBack() {
/* if (location.pathname === '/crecord/orderPayResult') {
location.href = 'https://enjoy.abchina.com/yx/beanorder'; return;
}
if (window.history.length === 2 && location.pathname !== '/crecord/recordDetailNew' || location.href.indexOf('/hdtool/index?id=3721210') > -1) {
window.location.href = 'https://enjoy.abchina.com/yx/beanhome';
} else {
console.error(2);
window.history.go(-1);
} */
if (window.history.length >= 2) {
window.history.go(-1);
} else {
window.location.href = 'https://enjoy.abchina.com/yx/beanhome';
}
}
backDom.addEventListener('click', commonGoBack, false);
// 非ios
if (!window.navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)) {
// 安卓回退特殊处理
function back() {
// window.history.go(-1);
commonGoBack();
}
function setAndroidBackKey(backKeyFunc) {
var onBackKey = backKeyFunc;
function connectWebViewJavascriptBridge(callback) {
if (window.WebViewJavascriptBridge) {
callback(WebViewJavascriptBridge);
} else {
document.addEventListener('WebViewJavascriptBridgeReady', function () { callback(WebViewJavascriptBridge) }, false);
}
}
function onBackPressed() {
WebViewJavascriptBridge.callHandler('setPhysicalBackListener', {}, function (responseData) {
onBackPressed();
});
onBackKey()
}
connectWebViewJavascriptBridge(function (bridge) {
bridge.init(function (message, responseCallback) { });
bridge.callHandler('setPhysicalBackListener', {}, function (responseData) {
onBackPressed();
});
});
}
window.onload = function () { setAndroidBackKey(commonGoBack) };
} else {
var topPx = screen.height == 812 && screen.width == 375 ? 40 : (document.body.clientWidth / 320 * 20);
document.body.style.paddingTop = topPx + 'px';
// barDom.style.top = topPx + 'px';
document.body.setAttribute('class', 'is-ios-body');
}
})();
</script>
<link rel="stylesheet" type="text/css" href="https://yun.duiba.com.cn/h5/common/base_201710241714.css">
<link href="//yun.duiba.com.cn/h5/activity_custom/skins/nanjing-record-190807/index.6748f280.css" rel="stylesheet">
<div id="db-content" style="display: none;">
<!--<a href="javascript:history.go(-1)" class="back1" ></a>-->
<div class="recordBox">
<!-- 填充 -->
</div>
<div class="nomore">已经没有更多了!</div>
<div style="display: none" class="noData">暂无数据</div>
</div>
<script>
var CFG = CFG || {};
CFG.needCouponModal = false;
CFG.projectId = 'projectx/' + location.pathname.split('/')[2];
CFG.asyncFiles = [
'//yun.duiba.com.cn/h5/activity_custom/skins/nanjing-record-190807/components.5560b2c5.js',
'//yun.duiba.com.cn/h5/activity_custom/skins/nanjing-record-190807/components.0e433876.css'
]
</script>
<script type="text/javascript" crossorigin="anonymous"
src="https://yun.duiba.com.cn/h5/common/base_201812191516.js"></script>
<script type="text/javascript" crossOrigin="anonymous"
src="//yun.duiba.com.cn/h5/activity_custom/skins/nanjing-record-190807/index.5815e161.js"></script>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment