Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bjz1014
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
wildfirecode13
bjz1014
Commits
6dd68507
Commit
6dd68507
authored
Oct 14, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
8261efae
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
11 deletions
+48
-11
rule.jsx
src/components/rule/rule.jsx
+6
-1
rule.less
src/components/rule/rule.less
+0
-1
index.jsx
src/pages/index/index.jsx
+42
-9
No files found.
src/components/rule/rule.jsx
View file @
6dd68507
...
@@ -13,6 +13,11 @@ class Rule extends React.Component {
...
@@ -13,6 +13,11 @@ class Rule extends React.Component {
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
}
}
onClick_rule
=
()
=>
{
modalStore
.
closePop
();
}
render
()
{
render
()
{
return
(
return
(
<
div
className=
"rule"
>
<
div
className=
"rule"
>
...
@@ -23,7 +28,7 @@ class Rule extends React.Component {
...
@@ -23,7 +28,7 @@ class Rule extends React.Component {
3.玩家可以通过积分解锁炮弹车的皮肤以及游戏场景皮肤。
3.玩家可以通过积分解锁炮弹车的皮肤以及游戏场景皮肤。
4.玩家控制小车的过程中不可触碰到石头,如果触碰到则游戏结束。
4.玩家控制小车的过程中不可触碰到石头,如果触碰到则游戏结束。
</
span
>
</
span
>
<
span
className=
"rule_close"
></
span
>
<
span
onClick=
{
this
.
onClick_rule
}
className=
"rule_close"
></
span
>
</
div
>
</
div
>
);
);
}
}
...
...
src/components/rule/rule.less
View file @
6dd68507
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
top: 213px;
top: 213px;
position: absolute;
position: absolute;
font-size: 26px;
font-size: 26px;
line-height: 301px;
color: rgba(107, 41, 62, 1);
color: rgba(107, 41, 62, 1);
}
}
.rule_close {
.rule_close {
...
...
src/pages/index/index.jsx
View file @
6dd68507
...
@@ -4,28 +4,61 @@ import modalStore from '@src/store/modal';
...
@@ -4,28 +4,61 @@ import modalStore from '@src/store/modal';
import
{
observer
}
from
'mobx-react'
;
import
{
observer
}
from
'mobx-react'
;
import
React
from
'react'
;
import
React
from
'react'
;
import
'./index.less'
;
import
'./index.less'
;
@
observer
@
observer
class
Index
extends
React
.
Component
{
class
Index
extends
React
.
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
this
.
state
=
{
isOn
:
1
}
}
onclick_rank
=
()
=>
{
console
.
warn
(
'onclick_rank'
)
}
onclick_start
=
()
=>
{
console
.
warn
(
'onclick_start'
)
}
openMusic
(
isOn
){
console
.
warn
(
'isOn'
,
isOn
?
'开'
:
'关'
);
}
}
onclick_record
=
()
=>
{}
componentDidMount
(){
onclick_rule
=
()
=>
{
this
.
openMusic
(
1
);
modalStore
.
pushPop
(
"Assist"
);
}
onClick_music_on
=
()
=>
{
this
.
setState
({
isOn
:
0
});
this
.
openMusic
(
0
)
}
onClick_music_off
=
()
=>
{
this
.
setState
({
isOn
:
1
})
this
.
openMusic
(
1
)
}
onclick_record
=
()
=>
{
console
.
warn
(
'onclick_record'
)
}
onclick_rule
=
()
=>
{
modalStore
.
pushPop
(
"Rule"
);
}
}
render
()
{
render
()
{
const
{
isOn
}
=
this
.
state
;
return
(
return
(
<
div
className=
"index"
>
<
div
className=
"index"
>
<
span
className=
"index_bg"
></
span
>
<
span
className=
"index_bg"
></
span
>
<
span
className=
"index_rankbtn"
></
span
>
<
span
onClick=
{
this
.
onclick_rank
}
className=
"index_rankbtn"
></
span
>
<
span
className=
"index_f"
></
span
>
{
<
span
className=
"index_on"
></
span
>
isOn
?
(<
span
onClick=
{
this
.
onClick_music_on
}
className=
"index_on"
></
span
>)
:
(<
span
onClick=
{
this
.
onClick_music_off
}
className=
"index_f"
></
span
>)
}
<
span
onClick=
{
this
.
onclick_record
}
className=
"index_record"
></
span
>
<
span
onClick=
{
this
.
onclick_record
}
className=
"index_record"
></
span
>
<
span
onClick=
{
this
.
onclick_rule
}
className=
"index_rule"
></
span
>
<
span
onClick=
{
this
.
onclick_rule
}
className=
"index_rule"
></
span
>
<
span
className=
"index_tips"
>
今日剩余X次
</
span
>
<
span
className=
"index_tips"
>
今日剩余X次
</
span
>
<
span
className=
"index_start_btn"
></
span
>
<
span
onClick=
{
this
.
onclick_start
}
className=
"index_start_btn"
></
span
>
<
span
className=
"index_title"
></
span
>
<
span
className=
"index_title"
></
span
>
</
div
>
</
div
>
);
);
...
...
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