Commit 8cb20562 authored by 韦燕's avatar 韦燕

feat:youxi

parent ad5f727b
...@@ -74,5 +74,6 @@ ...@@ -74,5 +74,6 @@
"webpack-cli": "^4.3.1", "webpack-cli": "^4.3.1",
"webpack-dev-server": "^3.11.0", "webpack-dev-server": "^3.11.0",
"webpack-merge": "^4.2.2" "webpack-merge": "^4.2.2"
} },
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
} }
...@@ -15,6 +15,7 @@ MD(); ...@@ -15,6 +15,7 @@ MD();
import LoadingDemo from "@src/pages/LoadingDemo/LoadingDemo"; import LoadingDemo from "@src/pages/LoadingDemo/LoadingDemo";
import HomeDemo from "@src/pages/HomeDemo/HomeDemo"; import HomeDemo from "@src/pages/HomeDemo/HomeDemo";
import { PAGE_MAP } from "./utils/constants"; import { PAGE_MAP } from "./utils/constants";
import GamePage from "./pages/gamePage/gamePage";
/** /**
* 所有页面场景 * 所有页面场景
...@@ -22,6 +23,7 @@ import { PAGE_MAP } from "./utils/constants"; ...@@ -22,6 +23,7 @@ import { PAGE_MAP } from "./utils/constants";
const pageMap = { const pageMap = {
[PAGE_MAP.LOADING_PAGE]: <LoadingDemo />, [PAGE_MAP.LOADING_PAGE]: <LoadingDemo />,
[PAGE_MAP.HOME_PAGE]: <HomeDemo />, [PAGE_MAP.HOME_PAGE]: <HomeDemo />,
[PAGE_MAP.GAME_PAGE]: <GamePage />,
}; };
@observer @observer
......
{"preLoadImg":[],"asyncLoadImg":["LoadingPage/loadingBg.jpg","LoadingPage/loadingFill.png","LoadingPage/loadingIp.png"]} {"preLoadImg":[],"asyncLoadImg":["LoadingPage/loadingBg.jpg","LoadingPage/loadingFill.png","LoadingPage/loadingIp.png","gamePage/bg.jpg","gamePage/numberBg.png","gamePage/selectBg.png"]}
\ No newline at end of file \ No newline at end of file
import React, { Component } from 'react';
import './guideModal.less';
import modalStore from '@src/store/modal';
import { _throttle } from '@src/utils/utils';
class GuideModal extends Component {
closeModal = _throttle(() => {
const {doCount} = this.props.popData;
doCount && doCount();
modalStore.closePop("GuideModal")
})
render() {
return (
<div className='guideModal'>
<div className="bg"></div>
</div>
);
}
}
export default GuideModal;
@import '../../res.less';
.guideModal {
width: 100%;
height: 100%;
position: absolute;
.bg {
width: 100%;
height: 1624px;
position: absolute;
.sparkBg("gamePage/guide.jpg");
}
}
\ No newline at end of file
...@@ -3,10 +3,15 @@ import './modal.less'; ...@@ -3,10 +3,15 @@ import './modal.less';
import { observer } from 'mobx-react'; import { observer } from 'mobx-react';
import modalStore from '../store/modal'; import modalStore from '../store/modal';
import { toJS } from 'mobx'; import { toJS } from 'mobx';
import GuideModal from "@src/components/guideModal/guideModal";
/** /**
* 弹窗配置 * 弹窗配置
*/ */
export const cfg = {}; export const cfg = {
// 新手引导
GuideModal,
};
@observer @observer
class Modal extends Component { class Modal extends Component {
......
export const plusProbability = [
{
name: 'plus',
radio: 0.2,
symbolText: '+$'
},
{
name: 'multiplyZheng',
radio: 0.2,
symbolText: 'x'
},
{
name: 'multiplyFen',
radio: 0.2,
symbolText: 'x'
},
{
name:'percent',
radio: 0.2,
symbolText: '+'
},
{
name:'doublePlus',
radio: 0.2,
symbolText: '+$'
},
]
export const minusProbability = [
{
name: 'minus',
radio: 0.2,
symbolText: '-$'
},
{
name: 'division',
radio: 0.2,
symbolText: '÷'
},
{
name: 'multiplyFen',
radio: 0.2,
symbolText: 'x'
},
{
name:'percent',
radio: 0.2,
symbolText: '-'
},
{
name: 'minusDouble',
radio: 0.2,
symbolText: '-$'
},
]
export const additionProbability = [
{
name:'plusAddition',
radio: 0.5,
},
{
name:'minusAddition',
radio: 0.5,
},
]
\ No newline at end of file
This diff is collapsed.
@import "../../res.less";
.gamePage {
width: 100%;
height: 100%;
position: absolute;
overflow: hidden;
.bg {
width: 100%;
height: 1624px;
position: absolute;
.sparkBg("gamePage/bg.jpg");
}
.countBg {
width: 148px;
height: 61px;
line-height: 67px;
position: absolute;
left: 575px;
top: 61px;
color: #ffffff;
font-size: 30px;
.sparkBg("gamePage/countBg.png");
box-sizing: border-box;
.count {
width: 116px;
height: 54px;
position: absolute;
left: 70px;
}
}
.numPaper {
width: 357px;
height: 219px;
position: absolute;
left: 204px;
top: 371px;
.sparkBg("gamePage/numberBg.png");
.number {
width: 290px;
height: 150px;
position: absolute;
left: 18px;
top: 46px;
font-size: 60px;
color: #10631c;
font-weight: bold;
line-height: 150px;
text-align: center;
// background-color: #ffffff;
}
}
.minusBg {
color: #792818!important;
.sparkBg("gamePage/minus2.png")!important;
}
.leftNum {
width: 332px;
height: 266px;
position: absolute;
left: 45px;
top: 778px;
.selected {
width: 332px;
height: 266px;
position: absolute;
.sparkBg("gamePage/selectBg.png");
}
.number1 {
width: 280px;
height: 180px;
position: absolute;
left: 35px;
top: 25px;
.sparkBg("gamePage/plus.png");
.text1 {
width: 212px;
height: 112px;
line-height: 112px;
text-align: center;
position: absolute;
left: 20px;
top: 44px;
font-size: 44px;
font-weight: bold;
color: #10631c;
// background-color: #ffffff;
}
.text2 {
display: flex;
align-items: center;
justify-content: center;
width: 212px;
height: 112px;
position: absolute;
line-height: 112px;
text-align: center;
left: 20px;
top: 44px;
font-size: 44px;
font-weight: bold;
color: #10631c;
.fenBox {
display: flex;
flex-direction: column;
align-items: center;
.fen1 {
padding-bottom: 6px;
width: 60px;
height: 30px;
line-height: 30px;
border-bottom: 3px solid #10631c;
}
.fen2 {
padding-top: 10px;
width: 60px;
height: 30px;
line-height: 30px;
}
}
}
}
.minusNumber1 {
width: 280px;
height: 180px;
position: absolute;
left: 35px;
top: 25px;
.sparkBg("gamePage/minus.png");
.text1 {
width: 212px;
height: 112px;
position: absolute;
line-height: 112px;
text-align: center;
left: 20px;
top: 44px;
font-size: 44px;
font-weight: bold;
color: #792818;
// background-color: #ffffff;
}
.text2 {
display: flex;
align-items: center;
justify-content: center;
width: 212px;
height: 112px;
position: absolute;
line-height: 112px;
text-align: center;
left: 20px;
top: 44px;
font-size: 44px;
font-weight: bold;
color: #792818;
.fenBox {
display: flex;
flex-direction: column;
align-items: center;
.fen1 {
padding-bottom: 6px;
width: 60px;
height: 30px;
line-height: 30px;
border-bottom: 3px solid #792818;
}
.fen2 {
padding-top: 10px;
width: 60px;
height: 30px;
line-height: 30px;
}
}
}
}
.twoNum {
.left1 {
width: 151px;
height: 80px;
position: absolute;
left: 80px;
top: 60px;
text-align: center;
line-height: 80px;
font-size: 32px;
color: #10631c;
font-weight: bold;
.sparkBg("gamePage/plus2.png");
}
.left2 {
width: 151px;
height: 80px;
position: absolute;
left: 110px;
top: 115px;
text-align: center;
line-height: 80px;
font-size: 32px;
color: #10631c;
font-weight: bold;
.sparkBg("gamePage/plus2.png");
}
}
}
.rightNum {
width: 332px;
height: 266px;
position: absolute;
left: 370px;
top: 778px;
.selected {
width: 332px;
height: 266px;
position: absolute;
.sparkBg("gamePage/selectBg.png");
}
.number2 {
width: 280px;
height: 180px;
position: absolute;
left: 35px;
top: 25px;
.sparkBg("gamePage/plus.png");
.text1 {
width: 212px;
height: 112px;
position: absolute;
left: 20px;
top: 44px;
font-size: 44px;
font-weight: bold;
line-height: 112px;
text-align: center;
color: #10631c;
// background-color: #ffffff;
}
.text2 {
display: flex;
align-items: center;
justify-content: center;
width: 212px;
height: 112px;
position: absolute;
line-height: 112px;
text-align: center;
left: 20px;
top: 44px;
font-size: 44px;
font-weight: bold;
color: #10631c;
.fenBox {
display: flex;
flex-direction: column;
align-items: center;
.fen1 {
padding-bottom: 6px;
width: 60px;
height: 30px;
line-height: 30px;
border-bottom: 3px solid #10631c;
}
.fen2 {
padding-top: 10px;
width: 60px;
height: 30px;
line-height: 30px;
}
}
}
}
.minusNumber2 {
width: 280px;
height: 180px;
position: absolute;
left: 35px;
top: 25px;
.sparkBg("gamePage/minus.png");
.text1 {
width: 212px;
height: 112px;
position: absolute;
left: 20px;
top: 44px;
font-size: 44px;
font-weight: bold;
line-height: 112px;
text-align: center;
color: #792818;
// background-color: #ffffff;
}
.text2 {
display: flex;
align-items: center;
justify-content: center;
width: 212px;
height: 112px;
position: absolute;
line-height: 112px;
text-align: center;
left: 20px;
top: 44px;
font-size: 44px;
font-weight: bold;
color: #792818;
.fenBox {
display: flex;
flex-direction: column;
align-items: center;
.fen1 {
padding-bottom: 6px;
width: 60px;
height: 30px;
line-height: 30px;
border-bottom: 3px solid #792818;
}
.fen2 {
padding-top: 10px;
width: 60px;
height: 30px;
line-height: 30px;
}
}
}
}
.twoNum {
.right1 {
width: 151px;
height: 80px;
position: absolute;
left: 80px;
top: 60px;
text-align: center;
line-height: 80px;
font-size: 32px;
color: #10631c;
font-weight: bold;
.sparkBg("gamePage/plus2.png");
}
.right2 {
width: 151px;
height: 80px;
position: absolute;
left: 110px;
top: 115px;
text-align: center;
line-height: 80px;
font-size: 32px;
color: #10631c;
font-weight: bold;
.sparkBg("gamePage/plus2.png");
}
}
}
}
\ No newline at end of file
...@@ -20,7 +20,7 @@ const store = makeAutoObservable({ ...@@ -20,7 +20,7 @@ const store = makeAutoObservable({
myPrize: "myPrize", // TODO 举例子 新宿台奖品页 myPrize: "myPrize", // TODO 举例子 新宿台奖品页
index: PAGE_MAP.LOADING_PAGE, index: PAGE_MAP.LOADING_PAGE,
}[skinId] || PAGE_MAP.LOADING_PAGE, }[skinId] || PAGE_MAP.HOME_PAGE,
pageData: {}, pageData: {},
......
...@@ -17,5 +17,6 @@ export const DEFAULT_NET_ERROR = '网络异常,请稍后再试'; ...@@ -17,5 +17,6 @@ export const DEFAULT_NET_ERROR = '网络异常,请稍后再试';
export const PAGE_MAP = { export const PAGE_MAP = {
HOME_PAGE: "homePage", HOME_PAGE: "homePage",
LOADING_PAGE: "loadingPage", LOADING_PAGE: "loadingPage",
GAME_PAGE: "gamePage",
}; };
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