Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
华
华夏模拟理财_20250701
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
华夏模拟理财_20250701
Commits
e9d6bd92
Commit
e9d6bd92
authored
Jul 04, 2025
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
10a5a589
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
100 additions
and
4 deletions
+100
-4
draw.ts
mock/draw.ts
+1
-0
bg.png
src/assets/PrizePanel/bg.png
+0
-0
btn.png
src/assets/PrizePanel/btn.png
+0
-0
TurnTable.tsx
src/pages/ResPage/TurnTable/TurnTable.tsx
+11
-3
NoPrizePanel.tsx
src/panels/NoPrizePanel/NoPrizePanel.tsx
+1
-1
PrizePanel.less
src/panels/PrizePanel/PrizePanel.less
+57
-0
PrizePanel.tsx
src/panels/PrizePanel/PrizePanel.tsx
+30
-0
No files found.
mock/draw.ts
View file @
e9d6bd92
...
@@ -38,6 +38,7 @@ export default [
...
@@ -38,6 +38,7 @@ export default [
optionId
:
`prizeId
${
i
}
`
,
optionId
:
`prizeId
${
i
}
`
,
optionImg
:
"optionImg"
,
optionImg
:
"optionImg"
,
prizeId
:
`prizeId
${
i
}
`
,
prizeId
:
`prizeId
${
i
}
`
,
optionName
:
`optionName
${
i
}
`
,
prizeType
:
Math
.
random
()
*
5
>>
0
,
prizeType
:
Math
.
random
()
*
5
>>
0
,
position
:
Math
.
random
()
*
6
>>
0
,
position
:
Math
.
random
()
*
6
>>
0
,
userRecordId
:
"userRecordId"
,
userRecordId
:
"userRecordId"
,
...
...
src/assets/PrizePanel/bg.png
0 → 100644
View file @
e9d6bd92
22.2 KB
src/assets/PrizePanel/btn.png
0 → 100644
View file @
e9d6bd92
9.52 KB
src/pages/ResPage/TurnTable/TurnTable.tsx
View file @
e9d6bd92
...
@@ -10,13 +10,14 @@ import resStore from "@/store/ResStore.ts";
...
@@ -10,13 +10,14 @@ import resStore from "@/store/ResStore.ts";
import
classNames
from
"classnames"
;
import
classNames
from
"classnames"
;
import
{
NoPrizePanel
}
from
"@/panels/NoPrizePanel/NoPrizePanel.tsx"
;
import
{
NoPrizePanel
}
from
"@/panels/NoPrizePanel/NoPrizePanel.tsx"
;
import
{
ModalCtrl
}
from
"@/core/ctrls/ModalCtrl.tsx"
;
import
{
ModalCtrl
}
from
"@/core/ctrls/ModalCtrl.tsx"
;
import
{
PrizePanel
}
from
"@/panels/PrizePanel/PrizePanel.tsx"
;
@
observer
@
observer
class
TurnTable
extends
React
.
Component
{
class
TurnTable
extends
React
.
Component
{
turntableRef
=
null
;
// 大转盘
turntableRef
=
null
;
// 大转盘
btnStarting
=
false
;
// 转盘是否启动
btnStarting
=
false
;
// 转盘是否启动
drawResultInfo
=
{};
drawResultInfo
:
any
=
{};
async
componentDidMount
()
{
async
componentDidMount
()
{
}
}
...
@@ -24,7 +25,14 @@ class TurnTable extends React.Component {
...
@@ -24,7 +25,14 @@ class TurnTable extends React.Component {
onStop
=
()
=>
{
onStop
=
()
=>
{
this
.
btnStarting
=
false
;
this
.
btnStarting
=
false
;
resStore
.
updateInfo
();
resStore
.
updateInfo
();
// ModalCtrl.showModal(NoPrizePanel, this.drawResultInfo);
console
.
log
(
this
.
drawResultInfo
)
if
(
this
.
drawResultInfo
.
prizeId
==
"thanks"
)
{
ModalCtrl
.
showModal
(
NoPrizePanel
,
this
.
drawResultInfo
);
}
else
{
ModalCtrl
.
showModal
(
PrizePanel
,
this
.
drawResultInfo
);
}
}
}
// 开始抽奖
// 开始抽奖
...
@@ -42,9 +50,9 @@ class TurnTable extends React.Component {
...
@@ -42,9 +50,9 @@ class TurnTable extends React.Component {
this
.
btnStarting
=
false
;
this
.
btnStarting
=
false
;
return
;
return
;
}
}
this
.
drawResultInfo
=
data
;
this
.
turntableRef
.
launch
();
this
.
turntableRef
.
launch
();
this
.
drawResultInfo
=
data
;
const
index
=
resStore
.
info
.
prizeInfo
?.
findIndex
((
item
)
=>
item
.
prizeId
===
this
.
drawResultInfo
.
prizeId
);
const
index
=
resStore
.
info
.
prizeInfo
?.
findIndex
((
item
)
=>
item
.
prizeId
===
this
.
drawResultInfo
.
prizeId
);
this
.
turntableRef
.
braking
(
index
);
this
.
turntableRef
.
braking
(
index
);
});
});
...
...
src/panels/NoPrizePanel/NoPrizePanel.tsx
View file @
e9d6bd92
...
@@ -15,7 +15,7 @@ export class NoPrizePanel extends Component<any, any> {
...
@@ -15,7 +15,7 @@ export class NoPrizePanel extends Component<any, any> {
render
()
{
render
()
{
return
<
div
className=
"NoPrizePanel"
>
return
<
div
className=
"NoPrizePanel
modal_center
"
>
<
div
className=
"bg"
/>
<
div
className=
"bg"
/>
<
Button
className=
"btn"
onClick=
{
this
.
clickClose
}
/>
<
Button
className=
"btn"
onClick=
{
this
.
clickClose
}
/>
<
Button
className=
"close"
onClick=
{
this
.
clickClose
}
/>
<
Button
className=
"close"
onClick=
{
this
.
clickClose
}
/>
...
...
src/panels/PrizePanel/PrizePanel.less
0 → 100644
View file @
e9d6bd92
@import "../../res.less";
.PrizePanel {
width: 750px;
height: 100%;
left: 0;
top: 0;
position: absolute;
.bg {
position: absolute;
left: 82px;
top: 348px;
width: 585px;
height: 671px;
.webpBg("PrizePanel/bg.png");
}
.btn {
position: absolute;
left: 120px;
top: 811px;
width: 510px;
height: 138px;
.webpBg("PrizePanel/btn.png");
}
.img {
border-radius: 22px;
background-color: white;
position: absolute;
left: 265px;
top: 494px;
width: 220px;
height: 220px;
}
.prizeName {
font-size: 28px;
color: rgb(1, 1, 1);
text-align: center;
position: absolute;
left: 100px;
width: 550px;
top: 740px;
.lineClamp1();
}
.close {
position: absolute;
left: 346px;
top: 1161px;
width: 58px;
height: 58px;
.webpBg("common/close.png");
}
}
src/panels/PrizePanel/PrizePanel.tsx
0 → 100644
View file @
e9d6bd92
import
{
Component
}
from
"react"
;
import
"./PrizePanel.less"
;
import
{
Button
}
from
"@grace/ui"
;
import
{
ModalCtrl
}
from
"@/core/ctrls/ModalCtrl.tsx"
;
export
class
PrizePanel
extends
Component
<
any
,
any
>
{
componentDidMount
()
{
}
clickClose
=
()
=>
{
ModalCtrl
.
closeModal
();
}
render
()
{
const
{
optionImg
,
optionName
}
=
this
.
props
;
return
<
div
className=
"PrizePanel modal_center"
>
<
div
className=
"bg"
/>
<
img
className=
"img"
src=
{
optionImg
}
/>
<
div
className=
"prizeName"
>
{
optionName
}
</
div
>
<
Button
className=
"btn"
onClick=
{
this
.
clickClose
}
/>
<
Button
className=
"close"
onClick=
{
this
.
clickClose
}
/>
</
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