Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kww_dayDayGetCredits_250512
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
kww_dayDayGetCredits_250512
Commits
b22942ef
Commit
b22942ef
authored
May 14, 2025
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
f5fd21af
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
157 additions
and
64 deletions
+157
-64
main.ts
mock/main.ts
+20
-13
会员金币堆.png
src/assets/WedExpPanel/会员金币堆.png
+0
-0
金币堆.png
src/assets/WedExpPanel/金币堆.png
+0
-0
HomePage.tsx
src/pages/HomePage/HomePage.tsx
+2
-2
Sign.tsx
src/pages/HomePage/Sign/Sign.tsx
+39
-11
SkyFullGoldPanel.less
src/panels/SkyFullGoldPanel/SkyFullGoldPanel.less
+5
-4
WedExpPanel.less
src/panels/WedExpPanel/WedExpPanel.less
+25
-4
WedExpPanel.tsx
src/panels/WedExpPanel/WedExpPanel.tsx
+22
-9
store.ts
src/store/store.ts
+44
-21
No files found.
mock/main.ts
View file @
b22942ef
import
{
AESDecrypt
,
AESEncrypt
}
from
"./Crypto"
;
export
default
[
export
default
[
{
{
url
:
'/main/index.do'
,
url
:
'/main/index.do'
,
response
:
({
query
})
=>
{
response
:
({
query
})
=>
{
const
signDay
=
Math
.
random
()
*
7
>>
0
;
return
{
return
{
success
:
true
,
success
:
true
,
code
:
""
,
code
:
""
,
...
@@ -17,21 +17,28 @@ export default [
...
@@ -17,21 +17,28 @@ export default [
currentStoreNum
:
123
,
currentStoreNum
:
123
,
storeLimitNum
:
2222
,
storeLimitNum
:
2222
,
continueSignDays
:
3
,
continueSignDays
:
3
,
todaySignFlag
:
tru
e
,
todaySignFlag
:
fals
e
,
signRecords
:
[
signRecords
:
new
Array
(
7
).
fill
(
1
).
map
((
_
,
index
)
=>
{
{
return
{
id
:
1
,
id
:
index
,
day
:
1
,
day
:
index
+
1
,
creditsNum
:
100
,
creditsNum
:
100
+
Math
.
random
()
*
100
>>
0
,
boolSign
:
false
,
boolSign
:
index
<
signDay
,
}
}
]
,
})
,
overflowBubble
:
{
overflowBubble
:
{
id
:
1
,
id
:
1
,
creditsNum
:
100
,
creditsNum
:
100
,
expireTime
:
Date
.
now
()
+
10000000
,
expireTime
:
Date
.
now
()
+
10000000
,
},
},
bubbleRecords
:
[],
bubbleRecords
:
new
Array
(
4
).
fill
(
1
).
map
((
_
,
index
)
=>
{
return
{
id
:
index
,
creditsNum
:
100
+
Math
.
random
()
*
100
>>
0
,
expireTime
:
Date
.
now
()
+
10000000
,
type
:
1
+
Math
.
random
()
*
2
>>
0
,
}
}),
returnAwardCreditsNum
:
1111
,
returnAwardCreditsNum
:
1111
,
downGoldVo
:
{
downGoldVo
:
{
creditsNum
:
100
,
creditsNum
:
100
,
...
@@ -64,10 +71,10 @@ export default [
...
@@ -64,10 +71,10 @@ export default [
"code"
:
""
,
"code"
:
""
,
"message"
:
""
,
"message"
:
""
,
"data"
:
{
"data"
:
{
signCredits
:
1
11
,
signCredits
:
1
00
,
extraCredits
:
1
2
0
,
extraCredits
:
1
0
0
,
boolLimit
:
true
,
boolLimit
:
true
,
multupleValue
:
11
,
multupleValue
:
3
,
url
:
"urlurlurlurlurl"
,
url
:
"urlurlurlurlurl"
,
taskId
:
"taskId"
,
taskId
:
"taskId"
,
newLuckCreditsNum
:
33
,
newLuckCreditsNum
:
33
,
...
...
src/assets/WedExpPanel/会员金币堆.png
View replaced file @
f5fd21af
View file @
b22942ef
114 KB
|
W:
|
H:
115 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/assets/WedExpPanel/金币堆.png
View replaced file @
f5fd21af
View file @
b22942ef
81 KB
|
W:
|
H:
81.7 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/pages/HomePage/HomePage.tsx
View file @
b22942ef
...
@@ -36,14 +36,14 @@ class HomePage extends React.Component<any, any> {
...
@@ -36,14 +36,14 @@ class HomePage extends React.Component<any, any> {
root
:
HTMLDivElement
;
root
:
HTMLDivElement
;
componentDidMount
()
{
componentDidMount
()
{
//
store.updateIndex();
store
.
updateIndex
();
// store.queryTask()
// store.queryTask()
// if (getUrlParam('inviteCode')) {
// if (getUrlParam('inviteCode')) {
// store.doAssist()
// store.doAssist()
// }
// }
// ModalCtrl.showModal(Fail_challenge);
// ModalCtrl.showModal(Fail_challenge);
ModalCtrl
.
showModal
(
WedExp
Panel
);
ModalCtrl
.
showModal
(
SkyFullGold
Panel
);
}
}
clickPrize
=
()
=>
{
clickPrize
=
()
=>
{
...
...
src/pages/HomePage/Sign/Sign.tsx
View file @
b22942ef
...
@@ -5,6 +5,10 @@ import { Button } from "@grace/ui";
...
@@ -5,6 +5,10 @@ import { Button } from "@grace/ui";
import
styles
from
"./Sign.module.less"
;
import
styles
from
"./Sign.module.less"
;
import
classNames
from
"classnames"
;
import
classNames
from
"classnames"
;
import
API
from
"@/api"
;
import
{
_asyncThrottle
}
from
"@/utils/utils.ts"
;
import
{
ModalCtrl
}
from
"@/core/ctrls/ModalCtrl.tsx"
;
import
WedExpPanel
from
"@/panels/WedExpPanel/WedExpPanel.tsx"
;
@
observer
@
observer
...
@@ -14,27 +18,49 @@ class Sign extends React.Component<any, any> {
...
@@ -14,27 +18,49 @@ class Sign extends React.Component<any, any> {
}
}
clickSign
=
_asyncThrottle
(
async
()
=>
{
const
{
todaySignFlag
}
=
store
.
indexData
;
if
(
todaySignFlag
)
return
;
const
{
success
,
data
}
=
await
API
.
sign
();
if
(
!
success
)
return
;
const
{
signCredits
,
extraCredits
,
boolLimit
,
multupleValue
,
url
,
taskId
,
newLuckCreditsNum
}
=
data
;
if
(
boolLimit
)
{
// 周三限时奖励
ModalCtrl
.
showModal
(
WedExpPanel
,
data
);
}
});
render
()
{
render
()
{
const
{}
=
store
.
indexData
const
{
signRecords
,
continueSignDays
,
todaySignFlag
}
=
store
.
indexData
;
const
signedCount
=
signRecords
?.
filter
((
item
)
=>
item
.
boolSign
).
length
||
0
;
const
signProgress
=
Math
.
max
(
signedCount
-
1
,
0
);
return
<
div
className=
{
styles
.
sign
}
>
return
<
div
className=
{
styles
.
sign
}
>
<
div
className=
{
styles
.
title
}
>
已连续签到
<
span
>
23
</
span
>
天
</
div
>
<
div
className=
{
styles
.
title
}
>
已连续签到
<
span
>
{
continueSignDays
}
</
span
>
天
</
div
>
<
div
className=
{
styles
.
tip
}
>
断签7天后积分将清零
</
div
>
<
div
className=
{
styles
.
tip
}
>
断签7天后积分将清零
</
div
>
<
div
className=
{
styles
.
itemRoot
}
>
<
div
className=
{
styles
.
itemRoot
}
>
{
{
new
Array
(
7
).
fill
(
0
).
map
((
item
,
index
)
=>
{
signRecords
?.
map
((
item
,
index
)
=>
{
const
{
id
,
boolSign
,
creditsNum
,
day
}
=
item
;
const
creditCls
=
classNames
(
styles
.
credits
,
{
const
creditCls
=
classNames
(
styles
.
credits
,
{
[
styles
.
creditsSigned
]:
true
,
[
styles
.
creditsSigned
]:
boolSign
,
});
});
const
dayCls
=
classNames
(
styles
.
day
,
{
const
dayCls
=
classNames
(
styles
.
day
,
{
[
styles
.
daySigned
]:
true
,
[
styles
.
daySigned
]:
boolSign
,
});
});
return
<
div
key=
{
i
ndex
}
className=
{
styles
.
item
}
>
return
<
div
key=
{
i
d
}
className=
{
styles
.
item
}
>
<
div
className=
{
creditCls
}
>
<
div
className=
{
creditCls
}
>
<
div
className=
{
styles
.
creditTxt
}
>
最高
<
span
>
150
</
span
></
div
>
{
!
boolSign
&&
<
div
className=
{
styles
.
creditTxt
}
>
最高
<
span
>
{
creditsNum
}
</
span
></
div
>
}
</
div
>
</
div
>
<
div
className=
{
dayCls
}
>
第
{
index
+
1
}
天
</
div
>
<
div
className=
{
dayCls
}
>
第
{
day
}
天
</
div
>
</
div
>
</
div
>
})
})
}
}
...
@@ -44,15 +70,17 @@ class Sign extends React.Component<any, any> {
...
@@ -44,15 +70,17 @@ class Sign extends React.Component<any, any> {
<
div
<
div
className=
{
styles
.
progressFill
}
className=
{
styles
.
progressFill
}
style=
{
{
style=
{
{
width
:
`${100 / 6 *
1
}%`
,
width
:
`${100 / 6 *
signProgress
}%`
,
}
}
}
}
/>
/>
</
div
>
</
div
>
<
div
className=
{
styles
.
progressPoint
}
/>
<
div
className=
{
styles
.
progressPoint
}
/>
<
div
className=
{
styles
.
progressPoint
}
style=
{
{
transform
:
`translateX(${signProgress * 0.99}rem)`
,
}
}
/>
<
Button
className=
{
styles
.
btn
}
onClick=
{
this
.
clickSign
}
/>
<
Button
className=
{
styles
.
btn
}
/>
</
div
>;
</
div
>;
}
}
}
}
...
...
src/panels/SkyFullGoldPanel/SkyFullGoldPanel.less
View file @
b22942ef
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
.logo {
.logo {
position: absolute;
position: absolute;
left: 14
9
px;
left: 14
4
px;
top: 931px;
top: 931px;
width: 95px;
width: 95px;
height: 83px;
height: 83px;
...
@@ -77,17 +77,18 @@
...
@@ -77,17 +77,18 @@
}
}
.txt {
.txt {
font-size: 2
9
px;
font-size: 2
8
px;
color: rgb(32, 16, 3);
color: rgb(32, 16, 3);
position: absolute;
position: absolute;
left: 24
7
px;
left: 24
3
px;
top: 938px;
top: 938px;
line-height: 1.2;
font-weight: bold;
font-weight: bold;
}
}
.btn {
.btn {
position: absolute;
position: absolute;
left: 4
79
px;
left: 4
85
px;
top: 947px;
top: 947px;
width: 128px;
width: 128px;
height: 50px;
height: 50px;
...
...
src/panels/WedExpPanel/WedExpPanel.less
View file @
b22942ef
...
@@ -45,6 +45,16 @@
...
@@ -45,6 +45,16 @@
height: 228px;
height: 228px;
.webpBg("WedExpPanel/金币堆.png");
.webpBg("WedExpPanel/金币堆.png");
}
}
.multuple {
position: absolute;
left: 460px;
top: 597px;
font-size: 28px;
color: #e70813;
font-weight: bold;
font-style: italic;
}
}
}
.vip {
.vip {
...
@@ -56,6 +66,16 @@
...
@@ -56,6 +66,16 @@
height: 209px;
height: 209px;
.webpBg("WedExpPanel/会员金币堆.png");
.webpBg("WedExpPanel/会员金币堆.png");
}
}
.multuple {
position: absolute;
left: 350px;
top: 606px;
font-size: 28px;
color: #e70813;
font-weight: bold;
font-style: italic;
}
}
}
.taskBg {
.taskBg {
...
@@ -69,7 +89,7 @@
...
@@ -69,7 +89,7 @@
.logo {
.logo {
position: absolute;
position: absolute;
left: 14
9
px;
left: 14
4
px;
top: 931px;
top: 931px;
width: 95px;
width: 95px;
height: 83px;
height: 83px;
...
@@ -77,17 +97,18 @@
...
@@ -77,17 +97,18 @@
}
}
.txt {
.txt {
font-size: 2
9
px;
font-size: 2
8
px;
color: rgb(32, 16, 3);
color: rgb(32, 16, 3);
position: absolute;
position: absolute;
left: 24
7
px;
left: 24
3
px;
top: 938px;
top: 938px;
line-height: 1.2;
font-weight: bold;
font-weight: bold;
}
}
.btn {
.btn {
position: absolute;
position: absolute;
left: 4
79
px;
left: 4
85
px;
top: 947px;
top: 947px;
width: 128px;
width: 128px;
height: 50px;
height: 50px;
...
...
src/panels/WedExpPanel/WedExpPanel.tsx
View file @
b22942ef
...
@@ -9,7 +9,13 @@ import { SvgaPlayer } from "@grace/svgaplayer";
...
@@ -9,7 +9,13 @@ import { SvgaPlayer } from "@grace/svgaplayer";
import
bgEffectSvga
from
"@/assets/svga/2输出签到成功弹窗.svga"
;
import
bgEffectSvga
from
"@/assets/svga/2输出签到成功弹窗.svga"
;
export
interface
IWedExpPanelProps
{
export
interface
IWedExpPanelProps
{
signCredits
:
number
;
extraCredits
:
number
;
boolLimit
:
boolean
;
multupleValue
:
number
;
url
:
string
;
taskId
:
string
;
newLuckCreditsNum
:
number
;
}
}
@
observer
@
observer
...
@@ -28,26 +34,33 @@ class WedExpPanel extends React.Component<IWedExpPanelProps> {
...
@@ -28,26 +34,33 @@ class WedExpPanel extends React.Component<IWedExpPanelProps> {
render
()
{
render
()
{
const
{
signCredits
,
extraCredits
,
boolLimit
,
multupleValue
,
url
,
taskId
,
newLuckCreditsNum
}
=
this
.
props
;
return
<
div
className=
"WedExpPanel modal_center"
>
return
<
div
className=
"WedExpPanel modal_center"
>
<
SvgaPlayer
className=
"bgEffect"
src=
{
bgEffectSvga
}
/>
<
SvgaPlayer
className=
"bgEffect"
src=
{
bgEffectSvga
}
/>
<
div
className=
"bg"
/>
<
div
className=
"bg"
/>
<
div
className=
"tip"
>
<
div
className=
"tip"
>
获得
50
积分
<
br
/>
获得
{
signCredits
}
积分
<
br
/>
解锁周三限时奖励
解锁周三限时奖励
</
div
>
</
div
>
<
div
className=
"vip"
>
{
<
div
className=
"img"
/>
!!
extraCredits
</
div
>
?
<
div
className=
"vip"
>
{
/*<div className="normal">*/
}
<
div
className=
"img"
/>
{
/* <div className="img"/>*/
}
<
div
className=
"multuple"
>
{
multupleValue
}
x
</
div
>
{
/*</div>*/
}
</
div
>
:
<
div
className=
"normal"
>
<
div
className=
"img"
/>
<
div
className=
"multuple"
>
{
multupleValue
}
x
</
div
>
</
div
>
}
<
div
className=
"taskBg"
/>
<
div
className=
"taskBg"
/>
<
div
className=
"logo"
/>
<
div
className=
"logo"
/>
<
div
className=
"txt"
>
<
div
className=
"txt"
>
观看品牌视频15s
<
br
/>
观看品牌视频15s
<
br
/>
积分膨胀至
150
积分膨胀至
{
(
signCredits
+
extraCredits
)
*
multupleValue
}
积分
</
div
>
</
div
>
<
div
className=
"com_banner"
/>
<
div
className=
"com_banner"
/>
...
...
src/store/store.ts
View file @
b22942ef
...
@@ -12,15 +12,9 @@ class Store {
...
@@ -12,15 +12,9 @@ class Store {
/** 前端开发配置 */
/** 前端开发配置 */
frontVariable
:
{
frontVariable
:
{
privacyTxt
:
string
,
prizeInfoAuthTxt
:
string
,
shareInfo
:
IWxShareInfo
,
shareInfo
:
IWxShareInfo
,
shopUrl
?:
string
,
scanUrl
?:
string
,
ruleImg
?:
string
,
ruleImg
?:
string
,
}
=
{
}
=
{
privacyTxt
:
""
,
prizeInfoAuthTxt
:
""
,
shareInfo
:
{
shareInfo
:
{
title
:
""
,
title
:
""
,
desc
:
""
,
desc
:
""
,
...
@@ -47,29 +41,58 @@ class Store {
...
@@ -47,29 +41,58 @@ class Store {
}
}
indexData
:
{
indexData
:
{
remainTimes
?:
number
,
actStartTime
?:
number
,
uid
?:
string
,
actEndTime
?:
number
,
actEndTimestamp
?:
number
,
currentTime
?:
number
,
timeStamp
?:
number
,
actStartTimestamp
?:
number
,
guideFlag
?:
boolean
,
remainDrawTimes
?:
number
,
currentStoreNum
?:
number
,
newAssist
?:
number
,
storeLimitNum
?:
number
,
continueSignDays
?:
number
,
todaySignFlag
?:
boolean
,
signRecords
?:
{
id
:
string
,
day
:
number
,
creditsNum
:
number
,
boolSign
:
boolean
,
}[],
overflowBubble
?:
{
id
:
number
,
creditsNum
:
number
,
expireTime
:
number
,
},
bubbleRecords
?:
{
id
:
number
,
creditsNum
:
number
,
expireTime
:
number
,
}[],
returnAwardCreditsNum
?:
number
,
downGoldVo
?:
{
creditsNum
:
number
,
multipleValue
:
number
,
taskId
:
string
,
url
:
string
,
}
}
=
{};
}
=
{};
async
updateIndex
()
{
async
updateIndex
()
{
// const { success, data, timeStamp } = await API.index();
const
{
success
,
data
}
=
await
API
.
index
();
// if (!success) {
if
(
!
success
)
{
// return;
return
;
// }
}
// this.indexData = data;
this
.
indexData
=
data
;
// this.indexData.timeStamp = timeStamp;
}
}
judgeActTime
(
brakeStart
=
true
,
brakeEnd
=
true
)
{
judgeActTime
(
brakeStart
=
true
,
brakeEnd
=
true
)
{
if
(
brakeStart
&&
this
.
indexData
.
timeStamp
<
this
.
indexData
.
actStartTimestamp
)
{
if
(
brakeStart
&&
this
.
indexData
.
currentTime
<
this
.
indexData
.
actStartTime
)
{
Toast
.
show
(
"活动未开始"
);
Toast
.
show
(
"活动未开始"
);
return
false
return
false
}
else
if
(
brakeEnd
&&
this
.
indexData
.
timeStamp
>
this
.
indexData
.
actEndTimestamp
)
{
}
else
if
(
brakeEnd
&&
this
.
indexData
.
currentTime
>
this
.
indexData
.
actEndTime
)
{
Toast
.
show
(
"活动已结束"
);
Toast
.
show
(
"活动已结束"
);
return
false
return
false
}
}
...
...
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