Commit 453ab8c6 authored by 韦燕's avatar 韦燕

feat:merge

parent b816bcfb
......@@ -29,6 +29,6 @@ if (location.href.indexOf("duibatest") > -1) {
CFG.loginMidId = "Did1NTk5OTk"; // 线上测试
}
// 免登中间页
CFG.loginMidUrl = "/customShare/share?id=" + CFG.loginMidId + "&source=duiba&projectId=" + CFG.projectId + "&redirectUrl=";</script><link href="//yun.duiba.com.cn/spark/v2/temp_base/1745223769982/styles/main.7d447b3d74e88c088d66.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>"use strict";
CFG.loginMidUrl = "/customShare/share?id=" + CFG.loginMidId + "&source=duiba&projectId=" + CFG.projectId + "&redirectUrl=";</script><link href="//yun.duiba.com.cn/spark/v2/temp_base/1745390268941/styles/main.0f9a2e7f96ddd4315bea.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>"use strict";
CFG.___G___ = 'weiyan%3Bdaily_20250418%3Borigin%09git%40gitlab2.dui88.com%3Asparkprojects%2FKWW-520NumberGuessingGame-20250409.git%20(fetch)%3Borigin%09git%40gitlab2.dui88.com%3Asparkprojects%2FKWW-520NumberGuessingGame-20250409.git%20(push)%3B';</script><script src="//yun.duiba.com.cn/spark/v2/temp_base/1745223769982/js/runtime-main.29d8cce0.js" crossorigin="anonymous"></script><script src="//yun.duiba.com.cn/spark/v2/temp_base/1745223769982/js/vendors.a83fc370.js" crossorigin="anonymous"></script><script src="//yun.duiba.com.cn/spark/v2/temp_base/1745223769982/js/main.b993e0f4.js" crossorigin="anonymous"></script></body></html>
\ No newline at end of file
CFG.___G___ = 'origin%09git%40gitlab2.dui88.com%3Asparkprojects%2FKWW-520NumberGuessingGame-20250409.git%20(fetch)%3Borigin%09git%40gitlab2.dui88.com%3Asparkprojects%2FKWW-520NumberGuessingGame-20250409.git%20(push)%3Bdaily_20250418%3Bweiyan%3B';</script><script src="//yun.duiba.com.cn/spark/v2/temp_base/1745390268941/js/runtime-main.76cc1cbc.js" crossorigin="anonymous"></script><script src="//yun.duiba.com.cn/spark/v2/temp_base/1745390268941/js/vendors.a83fc370.js" crossorigin="anonymous"></script><script src="//yun.duiba.com.cn/spark/v2/temp_base/1745390268941/js/main.c623e179.js" crossorigin="anonymous"></script></body></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.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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 n,a,l=r[0],i=r[1],p=r[2],c=0,s=[];c<l.length;c++)a=l[c],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&s.push(o[a][0]),o[a]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,p||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var i=t[l];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={1:0},u=[];function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,r){if(1&r&&(e=a(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)a.d(t,n,function(r){return e[r]}.bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="//yun.duiba.com.cn/spark/v2/temp_base/1745223769982/";var l=window.webpackJsonp=window.webpackJsonp||[],i=l.push.bind(l);l.push=r,l=l.slice();for(var p=0;p<l.length;p++)r(l[p]);var f=i;t()}([]);
//# sourceMappingURL=runtime-main.29d8cce0.js.map
\ No newline at end of file
!function(e){function r(r){for(var n,a,l=r[0],i=r[1],p=r[2],c=0,s=[];c<l.length;c++)a=l[c],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&s.push(o[a][0]),o[a]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,p||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var i=t[l];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={1:0},u=[];function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,r){if(1&r&&(e=a(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)a.d(t,n,function(r){return e[r]}.bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="//yun.duiba.com.cn/spark/v2/temp_base/1745390268941/";var l=window.webpackJsonp=window.webpackJsonp||[],i=l.push.bind(l);l.push=r,l=l.slice();for(var p=0;p<l.length;p++)r(l[p]);var f=i;t()}([]);
//# sourceMappingURL=runtime-main.76cc1cbc.js.map
\ No newline at end of file
{"numOfComponents":5048,"numOfProject":2361}
\ No newline at end of file
{"numOfComponents":5048,"numOfProject":2410}
\ No newline at end of file
......@@ -9,6 +9,6 @@ module.exports ={
"IMAGE_Q1": 0.6,
"IMAGE_Q2": 0.8,
"RES_PATH": "/src/assets/",
"RES_PATH_PROD": "//yun.duiba.com.cn/spark/v2/temp_base/1745223757350",
"JS_PATH_PROD": "https://yun.duiba.com.cn/spark/v2/temp_base/1745223769982/js"
"RES_PATH_PROD": "//yun.duiba.com.cn/spark/v2/temp_base/1745390250290",
"JS_PATH_PROD": "https://yun.duiba.com.cn/spark/v2/temp_base/1745390268941/js"
}
\ No newline at end of file
{"preLoadImg":[],"asyncLoadImg":["LoadingPage/loadingBg.jpg","LoadingPage/loadingFill.png","LoadingPage/loadingIp.png","detailPage/back.png","detailPage/bg.png","detailPage/border.png","detailPage/headline.png","detailPage/line.png","failPop/bg.png","failPop/close.png","failPop/endbtn.png","failPop/goonbtn.png","gamePage/bg.jpg","gamePage/countBg.png","gamePage/guide.jpg","gamePage/minus.png","gamePage/minus2.png","gamePage/numberBg.png","gamePage/plus.png","gamePage/plus2.png","gamePage/selectBg.png","homePahe/bardown.png","homePahe/baron.png","homePahe/bg.png","homePahe/box1.png","homePahe/box2.png","homePahe/box3.png","homePahe/box4.png","homePahe/close1.png","homePahe/close2.png","homePahe/close3.png","homePahe/close4.png","homePahe/detail.png","homePahe/gameBarbg.png","homePahe/infobg.png","homePahe/open1.png","homePahe/open2.png","homePahe/open3.png","homePahe/open4.png","homePahe/prizebg.png","homePahe/rank.png","homePahe/rule.png","homePahe/show.png","homePahe/startBtn.png","homePahe/title.png","loading/bardown.png","loading/baron.png","loading/bg.png","loading/ip.png","loading/title.png","rankPage/back.png","rankPage/bg.png","rankPage/border.png","rankPage/headnline.png","rankPage/line.png","rankPage/ownbg.png","rulePop/bg.png","rulePop/close.png","successPop/bar.png","successPop/barbg.png","successPop/bg.png","successPop/btn.png","successPop/close.png","svga/1输出首页按钮.svga","svga/2输出礼盒光圈.svga","svga/32输出首页氛围.svga","svga/3输出首页氛围.svga","svga/4输出引导.svga","svga/5倒计时.svga","svga/6输出选中动效.svga","svga/7输出选错.svga","svga/corrent.mp3","svga/wrong.mp3"]}
\ No newline at end of file
{"preLoadImg":[],"asyncLoadImg":["LoadingPage/loadingBg.jpg","LoadingPage/loadingFill.png","LoadingPage/loadingIp.png","detailPage/back.png","detailPage/bg.png","detailPage/border.png","detailPage/headline.png","detailPage/line.png","failPop/bg.png","failPop/close.png","failPop/endbtn.png","failPop/goonbtn.png","gamePage/bg.jpg","gamePage/countBg.png","gamePage/empty.png","gamePage/full.png","gamePage/guide.jpg","gamePage/guide2.jpg","gamePage/guide3.jpg","gamePage/heartBg.png","gamePage/minus.png","gamePage/minus2.png","gamePage/numberBg.png","gamePage/plus.png","gamePage/plus2.png","gamePage/selectBg.png","homePahe/bardown.png","homePahe/baron.png","homePahe/bg.png","homePahe/box1.png","homePahe/box2.png","homePahe/box3.png","homePahe/box4.png","homePahe/close1.png","homePahe/close2.png","homePahe/close3.png","homePahe/close4.png","homePahe/detail.png","homePahe/gameBarbg.png","homePahe/infobg.png","homePahe/open1.png","homePahe/open2.png","homePahe/open3.png","homePahe/open4.png","homePahe/prizebg.png","homePahe/rank.png","homePahe/rule.png","homePahe/show.png","homePahe/startBtn.png","homePahe/title.png","loading/bardown.png","loading/baron.png","loading/bg.png","loading/ip.png","loading/title.png","rankPage/back.png","rankPage/bg.png","rankPage/border.png","rankPage/headnline.png","rankPage/line.png","rankPage/ownbg.png","rulePop/bg.png","rulePop/close.png","successPop/bar.png","successPop/barbg.png","successPop/bg.png","successPop/btn.png","successPop/close.png","svga/1输出首页按钮.svga","svga/2输出礼盒光圈.svga","svga/32输出首页氛围.svga","svga/3输出首页氛围.svga","svga/4输出引导.svga","svga/5倒计时.svga","svga/6输出选中动效.svga","svga/7输出选错.svga","svga/corrent.mp3","svga/wrong.mp3"]}
\ No newline at end of file
src/assets/gamePage/bg.jpg

504 KB | W: | H:

src/assets/gamePage/bg.jpg

506 KB | W: | H:

src/assets/gamePage/bg.jpg
src/assets/gamePage/bg.jpg
src/assets/gamePage/bg.jpg
src/assets/gamePage/bg.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -7,17 +7,45 @@ import { RES_PATH } from '../../../sparkrc';
class GuideModal extends Component {
state = {
guideStep: 1
}
closeModal = _throttle(() => {
const {handleStartSvga} = this.props.popData;
handleStartSvga && handleStartSvga(true);
modalStore.closePop("GuideModal")
})
guideStep = _throttle(() => {
const {guideStep} = this.state;
let newGuide = guideStep;
if(newGuide >= 3) {
this.closeModal();
return
}
newGuide++;
this.setState({
guideStep: newGuide
})
}, 500)
render() {
const {guideStep} = this.state;
return (
<div className='guideModal' onClick={this.closeModal}>
<div className='guideModal' onClick={this.guideStep}>
{guideStep == 1 && <>
<div className="bg"></div>
<SvgaPlayer className='hand' src={RES_PATH + "svga/4输出引导.svga"}/>
</>}
{guideStep > 1 && <img src={RES_PATH + `gamePage/guide${guideStep}.jpg`} className="guideImg" /> }
</div>
);
}
......
......@@ -19,4 +19,10 @@
left: 0px;
top: 570px;
}
.guideImg {
width: 100%;
height: 1624px;
position: absolute;
}
}
\ No newline at end of file
......@@ -17,6 +17,7 @@ class GamePage extends Component {
firstInFlag = true;
state = {
addition: 'plus',
symbolInfo1: {
......@@ -40,6 +41,7 @@ class GamePage extends Component {
}],
seconds: '00:00',
showCountSvga: false,
bloodNum: 5
// fen1: 1,
// fen2: 1,
// fen3: 1,
......@@ -71,12 +73,13 @@ class GamePage extends Component {
countdownSeconds = (store.startInfo?.countdownSeconds || 60) * 1000;
gameTimer = null;
gameOver = false;
doCount = () => {
const timeObj = second2Date(this.countdownSeconds);
// 倒计时结束提交
setTimeout(() => {
this.gameTimer = setTimeout(() => {
if (this.countdownSeconds <= 0) {
store.submitScore(this.currentNumber);
......@@ -84,6 +87,8 @@ class GamePage extends Component {
this.setState({
seconds: '00:00'
})
clearTimeout(this.gameTimer);
this.gameTimer = null;
return;
}
this.countdownSeconds -= 1000;
......@@ -588,7 +593,9 @@ class GamePage extends Component {
if (!this.canChoose) return
this.canChoose = false
const { currentNum, addition, symbolInfo1, symbolInfo2 } = this.state;
const { currentNum, addition, symbolInfo1, symbolInfo2, bloodNum } = this.state;
let newBlood = bloodNum
let newNumber = this.currentNumber;
......@@ -616,10 +623,21 @@ class GamePage extends Component {
}
if (correctIndex != index && newNumber1 != newNumber2) {
// console.error("选择错误", correctIndex, index)
newBlood = newBlood - 1;
store.playWrongSound();
this.setState({
selectIndex: index,
correctIndex
correctIndex,
bloodNum: newBlood
}, () => {
console.error("bloodNum", newBlood)
if(newBlood == 0) {
this.gameOver = true;
clearTimeout(this.gameTimer)
this.gameTimer = null
store.submitScore(this.currentNumber);
}
})
setTimeout(() => {
......@@ -661,12 +679,22 @@ class GamePage extends Component {
store.playRightSound();
} else {
store.playWrongSound();
newBlood--;
}
// console.warn("newNumber", this.currentNumber)
this.setState({
selectIndex: index,
currentNum: this.currentNumber,
correctIndex
correctIndex,
bloodNum: newBlood
}, () => {
console.error("newBlood", newBlood)
if(newBlood == 0) {
this.gameOver = true;
clearTimeout(this.gameTimer)
this.gameTimer = null
store.submitScore(this.currentNumber);
}
})
......@@ -789,7 +817,7 @@ class GamePage extends Component {
render() {
const { addition, symbolInfo1, symbolInfo2, selectIndex, currentNum, numElements, seconds, correctIndex, showCountSvga } = this.state;
const { addition, symbolInfo1, symbolInfo2, selectIndex, currentNum, numElements, seconds, correctIndex, showCountSvga, bloodNum } = this.state;
// console.error(symbolInfo1, symbolInfo2);
......@@ -800,6 +828,11 @@ class GamePage extends Component {
<div className="countBg">
<div className="count">{seconds}</div>
</div>
<div className="bloodCon">
{Array(5).fill('').map((bloodItem, bloodIndex) => {
return <div key={bloodIndex} className={`blood ${bloodIndex < bloodNum ? 'full' : 'empty'}`}></div>
})}
</div>
{/* <div className="numPaper">
<div className="number">${currentNum}</div>
</div> */}
......
......@@ -26,6 +26,31 @@
}
}
.bloodCon {
display: flex;
align-items: center;
justify-content: space-around;
width: 274px;
height: 42px;
position: absolute;
left: 229px;
top: 222px;
.sparkBg("gamePage/heartBg.png");
.full {
width: 29px;
height: 24px;
.sparkBg("gamePage/full.png");
}
.empty {
width: 31px;
height: 25px;
.sparkBg("gamePage/empty.png");
}
}
.countBg {
width: 148px;
......
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