Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
湖
湖南口味王-520猜数游戏-20250409
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SparkProjects
湖南口味王-520猜数游戏-20250409
Commits
d8911132
Commit
d8911132
authored
Apr 10, 2025
by
wangzhujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bar
parent
28070c04
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
12 deletions
+28
-12
barItem.jsx
src/components/barItem/barItem.jsx
+2
-2
barItem.less
src/components/barItem/barItem.less
+3
-2
successpop.jsx
src/components/successpop/successpop.jsx
+5
-2
homepahe.jsx
src/pages/homepahe/homepahe.jsx
+8
-1
index.js
src/store/index.js
+10
-5
No files found.
src/components/barItem/barItem.jsx
View file @
d8911132
...
...
@@ -46,9 +46,9 @@ class BarItem extends React.Component {
}
render
()
{
const
{
barInfo
}
=
this
.
props
;
const
{
barInfo
,
left
,
top
,
scaleNum
}
=
this
.
props
;
return
(
<
div
className=
"gamebar"
>
<
div
className=
"gamebar"
style=
{
{
left
:
left
/
100
+
"rem"
,
top
:
top
/
100
+
"rem"
,
transform
:
`scale(${scaleNum})`
}
}
>
<
span
className=
"bardown"
></
span
>
<
div
className=
'barbox'
>
<
span
className=
"baron"
style=
{
{
...
...
src/components/barItem/barItem.less
View file @
d8911132
...
...
@@ -2,8 +2,8 @@
.gamebar {
width: 571px;
height: 140px;
left:
88
px;
top:
361
px;
left:
0
px;
top:
0
px;
position: absolute;
.bardown {
width: 522px;
...
...
@@ -19,6 +19,7 @@
left: 36px;
top: 69px;
position: absolute;
overflow: hidden;
}
.baron {
width: 486px;
...
...
src/components/successpop/successpop.jsx
View file @
d8911132
...
...
@@ -5,13 +5,15 @@ import { observer } from 'mobx-react';
import
'./successpop.less'
;
import
modalStore
from
'@src/store/modal'
;
import
{
Button
}
from
'../Button'
;
import
BarItem
from
'../barItem/barItem'
;
import
store
from
'@src/store'
;
@
observer
class
Successpop
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
}
closePop
(){
closePop
()
{
modalStore
.
closePop
(
"Successpop"
)
}
render
()
{
...
...
@@ -21,7 +23,8 @@ class Successpop extends React.Component {
<
span
className=
"bg"
></
span
>
<
div
className=
"barbox"
>
<
span
className=
"barbg"
></
span
>
<
span
className=
"bar"
></
span
>
{
/* <span className="bar"></span> */
}
<
BarItem
left=
{
-
10
}
top=
{
20
}
scaleNum=
{
0.95
}
barInfo=
{
store
.
homeInfo
?.
boxInfo
}
nowScore=
{
this
.
props
.
popData
.
score
}
></
BarItem
>
</
div
>
<
Button
className=
"btn"
onClick=
{
this
.
closePop
}
></
Button
>
<
span
className=
"score"
><
p
>
本次我赚了
{
this
.
props
.
popData
.
score
}
</
p
><
p
>
获得
{
this
.
props
.
popData
.
sendCount
}
青果
</
p
></
span
>
...
...
src/pages/homepahe/homepahe.jsx
View file @
d8911132
...
...
@@ -17,6 +17,13 @@ class Homepahe extends React.Component {
}
componentDidMount
()
{
store
.
getIndexInfo
()
let
data
=
{
boxId
:
2
,
score
:
600
,
sendCount
:
500
}
// modalStore.pushPop("Failpop",data)
modalStore
.
pushPop
(
"Successpop"
,
data
)
}
click_Rule
()
{
if
(
!
store
.
checkTime
(
false
))
{
...
...
@@ -59,7 +66,7 @@ class Homepahe extends React.Component {
</
div
>
}
<
span
className=
"gamebarbg"
></
span
>
<
BarItem
barInfo=
{
store
.
homeInfo
?.
boxInfo
}
nowScore=
{
store
.
homeInfo
.
historyMaxScore
}
></
BarItem
>
<
BarItem
left=
{
88
}
top=
{
361
}
scaleNum=
{
1
}
barInfo=
{
store
.
homeInfo
?.
boxInfo
}
nowScore=
{
store
.
homeInfo
.
historyMaxScore
}
></
BarItem
>
<
Button
className=
"startbtn"
onClick=
{
this
.
click_StartBtn
}
></
Button
>
<
span
className=
"title"
></
span
>
<
Button
className=
"rule"
onClick=
{
this
.
click_Rule
}
></
Button
>
...
...
src/store/index.js
View file @
d8911132
...
...
@@ -3,6 +3,7 @@ import { makeAutoObservable } from 'mobx';
import
API
from
'../api/index'
;
import
{
GetCurrSkinId
,
getCustomShareId
}
from
"@src/utils/utils"
;
import
{
Toast
}
from
'@spark/ui'
;
import
modalStore
from
'./modal'
;
const
skinId
=
GetCurrSkinId
()
||
getCustomShareId
();
...
...
@@ -45,8 +46,8 @@ const store = makeAutoObservable({
this
.
frontVariable
=
data
||
{};
console
.
log
(
'前端开发配置'
,
data
)
},
timeStamp
:
''
,
homeInfo
:{},
timeStamp
:
''
,
homeInfo
:
{},
async
getIndexInfo
()
{
const
{
success
,
data
}
=
await
API
.
indexInfo
()
if
(
success
&&
data
)
{
...
...
@@ -65,13 +66,17 @@ const store = makeAutoObservable({
}
return
true
},
startInfo
:{},
async
startGame
(){
startInfo
:
{},
async
startGame
()
{
const
{
success
,
data
}
=
await
API
.
startGame
()
if
(
success
)
{
if
(
success
)
{
this
.
startInfo
=
data
// TODO 游戏页面
}
},
updateScore
()
{
// modalStore.pushPop("Successpop", data)
// modalStore.pushPop("Failpop", data)
}
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment