Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Edwise
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
Edwise
Edwise
Commits
a737b55c
Commit
a737b55c
authored
Dec 31, 2020
by
huangwenjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
d2ca2245
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
78 additions
and
105 deletions
+78
-105
proxy.js
mock/proxy.js
+1
-1
index.js
src/api/index.js
+12
-7
ComGameFinalClear.jsx
src/components/ComGameFinalClear/ComGameFinalClear.jsx
+7
-13
ComGameFinalClear.less
src/components/ComGameFinalClear/ComGameFinalClear.less
+21
-64
ComGameSuccess.jsx
src/components/ComGameSuccess/ComGameSuccess.jsx
+12
-4
ComGameSuccess.less
src/components/ComGameSuccess/ComGameSuccess.less
+7
-0
ComgetPoints.jsx
src/components/ComgetPoints/ComgetPoints.jsx
+14
-14
pagecanvas.jsx
src/pages/pagecanvas/pagecanvas.jsx
+4
-2
No files found.
mock/proxy.js
View file @
a737b55c
...
...
@@ -7,11 +7,11 @@ export default {
[
`/projectx/
${
projectId
}
/projectRule.query`
]:
common
.
rule
,
[
`/hdtool/recon/ajaxElement`
]:
common
.
ajaxElement
,
[
`/hdtool/recon/doJoin`
]:
common
.
doJoin
,
[
`/hdtool/recon/ngame/ngameSubmit`
]:
common
.
gameSubmit
,
},
post
:
{
[
`/projectx/
${
projectId
}
/join.do`
]:
collect_0722
.
join
,
[
`/hdtool/recon/ngame/getNgameStartStatus`
]:
common
.
getNgameStartStatus
,
[
`/hdtool/recon/ngame/ngameSubmit`
]:
common
.
gameSubmit
,
[
`/hdtool/recon/getOrderStatus`
]:
common
.
getOrderStatus
}
};
\ No newline at end of file
src/api/index.js
View file @
a737b55c
import
apiCfg
from
'./apicfg'
;
import
request
from
'./request'
;
...
...
@@ -18,7 +16,10 @@ function getRequestParams(value) {
method
:
'get'
}
}
else
if
(
typeof
value
===
'object'
)
{
const
{
uri
,
method
=
'post'
}
=
value
;
const
{
uri
,
method
=
'post'
}
=
value
;
return
{
uri
,
method
...
...
@@ -32,10 +33,14 @@ function getRequestParams(value) {
function
generateAPI
(
apiList
)
{
const
api
=
{};
Object
.
entries
(
apiList
).
forEach
(([
key
,
value
])
=>
{
const
{
method
,
uri
}
=
getRequestParams
(
value
);
api
[
key
]
=
params
=>
request
[
method
](
uri
,
method
===
'post'
?
params
:
{
params
});
const
{
method
,
uri
}
=
getRequestParams
(
value
);
api
[
key
]
=
params
=>
request
[
method
](
uri
,
method
===
'post'
?
params
:
{
params
});
});
return
api
;
}
}
\ No newline at end of file
src/components/ComGameFinalClear/ComGameFinalClear.jsx
View file @
a737b55c
...
...
@@ -3,19 +3,17 @@
import
React
,
{
Component
}
from
'react'
;
import
resList
from
'../../resconfig/resList'
;
import
ViewCtrl
from
'../../util/viewCtrl'
;
import
'./ComGameFinalClear.less'
;
class
ComGameFinalClear
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
this
.
state
||
{
resList
:
resList
,
prizeImg
:
''
};
this
.
state
=
this
.
state
||
{
resList
:
resList
,
prizeImg
:
''
};
}
componentDidMount
()
{
const
{
imgUrl
,
title
}
=
this
.
props
.
data
.
lottery
;
const
{
imgUrl
,
title
}
=
this
.
props
.
data
.
lottery
;
this
.
setState
({
prizeImg
:
imgUrl
prizeImg
:
imgUrl
})
}
...
...
@@ -27,14 +25,10 @@ class ComGameFinalClear extends Component {
render
()
{
return
(
<
div
className=
"gong_xi_ni zoom"
>
<
img
className=
"dan_chuang_bei_jing4"
src=
{
this
.
state
.
resList
[
'e34fa1ff-c46e-4a73-b778-03790f7a66bb'
].
url
}
/>
<
img
className=
"guan_bi_an_niu3"
src=
{
this
.
state
.
resList
[
'28caebe0-9290-49fe-9661-ccc2c9885520'
].
url
}
onClick=
{
this
.
showIndex
.
bind
(
this
)
}
/>
<
img
className=
"ling_qu_an_niu"
src=
{
this
.
state
.
resList
[
'c6574000-2e9f-4ac0-8de9-4503598127d1'
].
url
}
onClick=
{
this
.
showIndex
.
bind
(
this
)
}
/>
<
div
className=
"ju_xing2"
/>
<
img
className=
"myPrize"
src=
{
this
.
state
.
prizeImg
}
/>
{
/* <label className="prize_thanks" style={!this.state.isPrize?{display:""}:{display:"none"}}>谢谢参与</label> */
}
<
label
className=
"gong_xi_ni_chuang_guan_cheng_gong_huo_de"
>
恭喜你
<
br
/>
闯关成功,获得
</
label
>
<
div
className=
"dan_chuang__da_kai_fu_dai "
>
<
img
className=
"gong_xi_ni_bei_jing "
src=
{
this
.
state
.
resList
[
'58645aa4-b3a2-4a49-bbfa-b7133e197789'
].
url
}
/>
<
img
className=
"myPrize"
src=
{
this
.
state
.
prizeImg
}
/>
<
img
className=
"zai_wan_yi_ci "
src=
{
this
.
state
.
resList
[
'29f1fc8a-9eec-4b43-b414-45e802ec5377'
].
url
}
onClick=
{
this
.
showIndex
.
bind
(
this
)
}
/>
</
div
>
);
}
...
...
src/components/ComGameFinalClear/ComGameFinalClear.less
View file @
a737b55c
.
gong_xi_n
i {
width:
520
px;
height:
722
px;
.
dan_chuang__da_kai_fu_da
i {
width:
659
px;
height:
811
px;
opacity: 1;
left:
12
0px;
top: 4
29
px;
left:
5
0px;
top: 4
33
px;
position: absolute;
transform-origin:
50% 50%
0px;
.
dan_chuang_bei_jing4
{
width:
510
px;
height: 7
22
px;
transform-origin:
0px 0px
0px;
.
gong_xi_ni_bei_jing
{
width:
659
px;
height: 7
46
px;
opacity: 1;
vertical-center: -439;
position: absolute;
transform-origin: 0px 0px 0px;
}
.guan_bi_an_niu3 {
width: 57px;
height: 58px;
opacity: 1;
left: 463px;
top: 145px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.ling_qu_an_niu {
width: 237px;
height: 59px;
opacity: 1;
left: 137px;
top: 600px;
position: absolute;
transform-origin: 0px 0px 0px;
}
.ju_xing2 {
width: 206px;
height: 206px;
opacity: 1;
left: 154px;
top: 360px;
position: absolute;
transform-origin: 0px 0px 0px;
// background-color: rgba(255, 255, 255, 1);
}
.myPrize {
width:
206
px;
height:
206
px;
width:
320
px;
height:
320
px;
opacity: 1;
left: 1
54
px;
top:
3
60px;
left: 1
70
px;
top:
2
60px;
position: absolute;
transform-origin: 0px 0px 0px;
// background-color: rgba(255, 255, 255, 1);
}
.gong_xi_ni_chuang_guan_cheng_gong_huo_de {
width: 510px;
height: 79px;
opacity: 1;
left: 0px;
top: 250px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 41.66667px;
color: rgba(250, 36, 32, 1);
text-align: center;
font-weight: normal;
}
.prize_thanks{
width: 510px;
height: 79px;
.zai_wan_yi_ci {
width: 469px;
height: 129px;
opacity: 1;
left: 0px;
top: 460px;
vertical-center: -65.5;
left: 91px;
top: 594px;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 60px;
color: rgba(250, 36, 32, 1);
text-align: center;
font-weight: normal;
}
}
}
\ No newline at end of file
src/components/ComGameSuccess/ComGameSuccess.jsx
View file @
a737b55c
...
...
@@ -12,27 +12,35 @@ class ComGameSuccess extends Component {
this
.
state
=
{
resList
:
resList
,
bgSource
:
""
,
btnSource
:
""
btnSource
:
""
,
scoreClass
:
"score "
};
}
componentDidMount
()
{
if
(
this
.
props
.
data
.
score
<
200
)
{
this
.
setState
({
bgSource
:
this
.
state
.
resList
[
'86e6d9b6-1494-4404-9b16-c5c560291f9a'
].
url
})
this
.
setState
({
btnSource
:
this
.
state
.
resList
[
'ce76f2ba-1e2b-4372-98ab-f22c559bc2c1'
].
url
})
this
.
setState
({
scoreClass
:
"score red"
,
})
}
else
{
this
.
setState
({
bgSource
:
this
.
state
.
resList
[
'24270f9f-5fcb-4a8c-b9e3-f6cd9a974609'
].
url
})
this
.
setState
({
btnSource
:
this
.
state
.
resList
[
'819dffa8-a443-468f-a487-8ef8d9702adc'
].
url
})
this
.
setState
({
scoreClass
:
"score gold"
,
})
}
}
async
gameSubmit
()
{
await
this
.
props
.
call
()
this
.
props
.
closeWin
();
}
render
()
{
return
(
<
div
className=
"ComGameSuccess"
>
<
img
className=
"bg"
src=
{
this
.
state
.
bgSource
}
/>
<
span
className=
"tips"
>
本局收集好运值
</
span
>
<
span
className=
"score"
>
{
this
.
props
.
score
}
</
span
>
<
img
className=
"submitBtn "
src=
{
this
.
state
.
btnSource
}
/>
<
span
className=
{
this
.
state
.
scoreClass
}
>
{
this
.
props
.
data
.
score
}
</
span
>
<
img
className=
"submitBtn "
src=
{
this
.
state
.
btnSource
}
onClick=
{
this
.
gameSubmit
.
bind
(
this
)
}
/>
</
div
>
);
}
...
...
src/components/ComGameSuccess/ComGameSuccess.less
View file @
a737b55c
...
...
@@ -21,6 +21,7 @@
vertical-center: -422.5;
left: 191px;
top: 282px;
text-align: center;
position: absolute;
transform-origin: 0px 0px 0px;
font-size: 30px;
...
...
@@ -38,6 +39,12 @@
font-size: 81.18063px;
color: rgba(254, 234, 187, 1);
}
.red {
color:"rgba(254, 234, 187, 1)"
}
.gold {
color:"#EE6612"
}
.submitBtn {
width: 469px;
height: 129px;
...
...
src/components/ComgetPoints/ComgetPoints.jsx
View file @
a737b55c
...
...
@@ -8,29 +8,29 @@ import './ComgetPoints.less';
class
ComgetPoints
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
this
.
state
||
{
resList
:
resList
,
isGo
:
false
};
this
.
state
=
this
.
state
||
{
resList
:
resList
,
isGo
:
false
};
}
componentDidMount
(){
componentDidMount
()
{
let
{
getCreditsLink
}
=
window
.
CFG
if
(
getCreditsLink
&&
getCreditsLink
!==
""
)
{
this
.
setState
({
isGo
:
true
})
}
else
{
this
.
setState
({
isGo
:
false
})
this
.
setState
({
isGo
:
true
})
}
else
{
this
.
setState
({
isGo
:
false
})
}
}
getPointsLink
(){
getPointsLink
()
{
console
.
log
(
'去跳转赚取积分链接'
);
let
{
getCreditsLink
}
=
window
.
CFG
if
(
getCreditsLink
&&
getCreditsLink
!==
""
)
{
window
.
location
.
href
=
getCreditsLink
;
window
.
location
.
href
=
getCreditsLink
;
}
else
{
this
.
props
.
closeWin
();
this
.
props
.
closeWin
();
}
}
...
...
@@ -38,8 +38,8 @@ class ComgetPoints extends Component {
return
(
<
div
className=
"zhuan_ji_fen15 zoom"
>
<
img
className=
"dan_chuang_bei_jing19"
src=
{
this
.
state
.
resList
[
'9dee8a6c-0fef-4d77-9b78-bfdea719b5a8'
].
url
}
/>
<
img
className=
"guan_bi_an_niu18"
src=
{
this
.
state
.
resList
[
'28caebe0-9290-49fe-9661-ccc2c9885520'
].
url
}
onClick=
{
this
.
props
.
closeWin
}
/>
<
img
className=
"zhuan_ji_fen17"
style=
{
this
.
state
.
isGo
?{
display
:
""
}:{
display
:
"none"
}
}
src=
{
this
.
state
.
resList
[
'5ac11cd5-4893-42d9-aa30-0002de09d02d'
].
url
}
onClick=
{
this
.
getPointsLink
.
bind
(
this
)
}
/>
<
img
className=
"guan_bi_an_niu18"
src=
{
this
.
state
.
resList
[
'28caebe0-9290-49fe-9661-ccc2c9885520'
].
url
}
onClick=
{
this
.
props
.
closeWin
}
/>
<
img
className=
"zhuan_ji_fen17"
style=
{
this
.
state
.
isGo
?
{
display
:
""
}
:
{
display
:
"none"
}
}
src=
{
this
.
state
.
resList
[
'5ac11cd5-4893-42d9-aa30-0002de09d02d'
].
url
}
onClick=
{
this
.
getPointsLink
.
bind
(
this
)
}
/>
<
label
className=
"hen_bao_qian16"
>
很抱歉
</
label
>
<
label
className=
"ji_fen_bu_zulabel"
>
积分不足,去赚积分吧~
</
label
>
</
div
>
...
...
src/pages/pagecanvas/pagecanvas.jsx
View file @
a737b55c
...
...
@@ -55,7 +55,7 @@ class PageCanvas extends Component {
if
(
params
.
data
.
score
<
100
)
{
this
.
gameFailed
()
}
else
if
(
params
.
data
.
score
>=
100
)
{
this
.
gameSuccess
(
params
.
score
)
this
.
gameSuccess
(
{
score
:
params
.
data
.
score
}
)
}
}
...
...
@@ -67,7 +67,9 @@ class PageCanvas extends Component {
gameSuccess
(
params
)
{
console
.
log
(
"游戏成功"
)
ViewCtrl
.
showWin
(
Enum
.
Com
.
ComGameSuccess
,
{
score
:
this
.
score
});
ViewCtrl
.
showWin
(
Enum
.
Com
.
ComGameSuccess
,
{
score
:
params
.
score
},
()
=>
{
this
.
gameSubmit
(
params
.
score
)
});
}
/**发送分数 */
...
...
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