Commit 22f3444d authored by huangwenjie's avatar huangwenjie

只能中一次福袋

parent a3fe4202
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><title>React App</title><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 > 750 && (e = 750 * a),
(window.remScale = e / 750),
(t.style.fontSize = 100 * (e / 750) + 'px');
};
s(), e.addEventListener && i.addEventListener(m, s, !1);
})(document, window);</script><script>function getApp(){
return {
cloud:{},
cloudName:"clientTemplate2C",
requestType:"mock"
}
}
var CFG = CFG || {};
CFG.projectId = location.pathname.split('/')[2] || '1';</script><link href="//yun.duiba.com.cn/spark/v2/niuqichongtian/1609826466989/styles/main.282b11115c544a8cbc76.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><script>// document.body.addEventListener('touchstart', function(){});</script><div id="root"></div><script src="//yun.duiba.com.cn/spark/v2/niuqichongtian/1609826466989/js/runtime-main.3e8a9183.js"></script><script src="//yun.duiba.com.cn/spark/v2/niuqichongtian/1609826466989/js/vendors.0b926fe5.js"></script><script src="//yun.duiba.com.cn/spark/v2/niuqichongtian/1609826466989/js/main.fba86fb7.js"></script></body><script src="//yun.duiba.com.cn/db_games/activity/md5/zepto_security_downloadApp.min.js"></script></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){function r(r){for(var t,i,a=r[0],l=r[1],c=r[2],p=0,s=[];p<a.length;p++)i=a[p],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(t in l)Object.prototype.hasOwnProperty.call(l,t)&&(e[t]=l[t]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,c||[]),n()}function n(){for(var e,r=0;r<u.length;r++){for(var n=u[r],t=!0,a=1;a<n.length;a++){var l=n[a];0!==o[l]&&(t=!1)}t&&(u.splice(r--,1),e=i(i.s=n[0]))}return e}var t={},o={1:0},u=[];function i(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=t,i.d=function(e,r,n){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var t in e)i.d(n,t,function(r){return e[r]}.bind(null,t));return n},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="//yun.duiba.com.cn/spark/v2/niuqichongtian/1609826466989/";var a=window.webpackJsonp=window.webpackJsonp||[],l=a.push.bind(a);a.push=r,a=a.slice();for(var c=0;c<a.length;c++)r(a[c]);var f=l;n()}([]);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -18,7 +18,7 @@ class App extends Component {
this.state = this.state || { mainPage: <PageIndex /> };
}
componentDidMount() {
document.body.addEventListener('touchstart', function (e){console.log(e.target)});
document.body.addEventListener('touchstart', function (e) { console.log(e.target) });
requestAnimationFrame(animate);
function animate(time) {
requestAnimationFrame(animate);
......@@ -29,7 +29,7 @@ class App extends Component {
window.CFG = {
actId: '3743121',
oaId: '3743121',
unitName: '积分',
unitName: '金币',
btnUnitName: '积分',
doJoin: '/hdtool/doJoin?dpm=1.3.1.0&activityId=3743121',
quireOrder: '/hdtool/getOrderStatus',
......@@ -81,21 +81,21 @@ class App extends Component {
switch (pageIndex) {
case Enum.Page.PageCanvas:
let node = document.getElementById("root");
if(node){
if (node) {
node.id = "root1"
}
this.setState({
mainPage:<PageCanvas></PageCanvas>
mainPage: <PageCanvas></PageCanvas>
})
break;
default:
let node1 = document.getElementById("root1");
if(node1){
if (node1) {
node1.id = "root"
}
this.setState({
mainPage:<PageIndex></PageIndex>
mainPage: <PageIndex></PageIndex>
})
break;
}
......
......@@ -2110,6 +2110,7 @@ var StartScene = (function (_super) {
_this._preTimerNum = 3;
_this._timerNum = 30;
_this.rains = [];
_this.hasRedBag = false;
_this.pause = false;
_this.playMusic = true;
_this.resConfig = {
......@@ -2372,6 +2373,7 @@ var StartScene = (function (_super) {
};
StartScene.prototype.gameStart = function () {
var _this = this;
this.hasRedBag = false;
clearInterval(this.gameTimer);
this.gameTimer = setInterval(function () {
if (_this.pause) {
......@@ -2456,6 +2458,7 @@ var StartScene = (function (_super) {
addScoreTxt_1.y = this_1.cowBox.y;
switch (rain.spType) {
case "luckyBag":
this_1.hasRedBag = true;
this_1.score += 20;
addScoreTxt_1.text = "+20";
this_1.addChild(addScoreTxt_1);
......@@ -2512,6 +2515,9 @@ var StartScene = (function (_super) {
rain.x = Math.max(10 * Math.random(), 680 * Math.random());
rain['speed'] = Math.max(this.SPEED * Math.random(), 6);
var type = GameConst_1.arr.getRandomOne(this.rainConfig);
if (this.hasRedBag) {
type = "redPacket";
}
switch (type) {
case "luckyBag":
rain.texture = this.res("luckyBag");
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -2111,6 +2111,7 @@ var StartScene = (function (_super) {
_this._preTimerNum = 3;
_this._timerNum = 30;
_this.rains = [];
_this.hasRedBag = false;
_this.pause = false;
_this.playMusic = true;
_this.resConfig = {
......@@ -2373,6 +2374,7 @@ var StartScene = (function (_super) {
};
StartScene.prototype.gameStart = function () {
var _this = this;
this.hasRedBag = false;
clearInterval(this.gameTimer);
this.gameTimer = setInterval(function () {
if (_this.pause) {
......@@ -2457,6 +2459,7 @@ var StartScene = (function (_super) {
addScoreTxt_1.y = this_1.cowBox.y;
switch (rain.spType) {
case "luckyBag":
this_1.hasRedBag = true;
this_1.score += 20;
addScoreTxt_1.text = "+20";
this_1.addChild(addScoreTxt_1);
......@@ -2513,6 +2516,9 @@ var StartScene = (function (_super) {
rain.x = Math.max(10 * Math.random(), 680 * Math.random());
rain['speed'] = Math.max(this.SPEED * Math.random(), 6);
var type = GameConst_1.arr.getRandomOne(this.rainConfig);
if (this.hasRedBag) {
type = "redPacket";
}
switch (type) {
case "luckyBag":
rain.texture = this.res("luckyBag");
......
......@@ -38,6 +38,7 @@ export class StartScene extends Scene {
_timerNum = 30
skipGuideBtn
rains = []
hasRedBag = false
pause = false
playMusic = true
resConfig = {
......@@ -335,6 +336,7 @@ export class StartScene extends Scene {
gameTimer
gameStart() {
this.hasRedBag = false
clearInterval(this.gameTimer)
this.gameTimer = setInterval(() => {
if (this.pause) {
......@@ -433,6 +435,7 @@ export class StartScene extends Scene {
addScoreTxt.y = this.cowBox.y
switch (rain.spType) {
case "luckyBag":
this.hasRedBag = true
this.score += 20
addScoreTxt.text = "+20"
this.addChild(addScoreTxt)
......@@ -493,6 +496,9 @@ export class StartScene extends Scene {
rain.x = Math.max(10 * Math.random(), 680 * Math.random())
rain['speed'] = Math.max(this.SPEED * Math.random(), 6)
let type = arr.getRandomOne(this.rainConfig)
if (this.hasRedBag) {
type = "redPacket"
}
switch (type) {
case "luckyBag":
rain.texture = this.res("luckyBag")
......
......@@ -2111,6 +2111,7 @@ var StartScene = (function (_super) {
_this._preTimerNum = 3;
_this._timerNum = 30;
_this.rains = [];
_this.hasRedBag = false;
_this.pause = false;
_this.playMusic = true;
_this.resConfig = {
......@@ -2373,6 +2374,7 @@ var StartScene = (function (_super) {
};
StartScene.prototype.gameStart = function () {
var _this = this;
this.hasRedBag = false;
clearInterval(this.gameTimer);
this.gameTimer = setInterval(function () {
if (_this.pause) {
......@@ -2457,6 +2459,7 @@ var StartScene = (function (_super) {
addScoreTxt_1.y = this_1.cowBox.y;
switch (rain.spType) {
case "luckyBag":
this_1.hasRedBag = true;
this_1.score += 20;
addScoreTxt_1.text = "+20";
this_1.addChild(addScoreTxt_1);
......@@ -2513,6 +2516,9 @@ var StartScene = (function (_super) {
rain.x = Math.max(10 * Math.random(), 680 * Math.random());
rain['speed'] = Math.max(this.SPEED * Math.random(), 6);
var type = GameConst_1.arr.getRandomOne(this.rainConfig);
if (this.hasRedBag) {
type = "redPacket";
}
switch (type) {
case "luckyBag":
rain.texture = this.res("luckyBag");
......
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