Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
GeekLearnMathWeapp
Project
Project
Details
Activity
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
frontend
GeekLearnMathWeapp
Commits
25af2abe
Commit
25af2abe
authored
Apr 05, 2023
by
hewenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: update
parent
5dcb4a02
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
33 deletions
+7
-33
answer-sheet.tsx
src/pages/market/components/answer-sheet.tsx
+0
-29
index.tsx
src/pages/prepare/index.tsx
+7
-4
No files found.
src/pages/market/components/answer-sheet.tsx
deleted
100644 → 0
View file @
5dcb4a02
import
{
View
,
Text
,
Button
}
from
'@tarojs/components'
import
Modal
from
'@/components/Modal'
import
{
useBoolean
}
from
'@/hooks/use-boolean'
// import { MarketModalProps } from '../types'
import
CardMain
from
'./card-main'
const
AnswerSheet
=
({
onConfirm
,
loading
})
=>
{
const
[
isVisible
,
{
setTrue
,
setFalse
}]
=
useBoolean
(
false
)
return
(
<
View
className=
"card-body"
>
<
CardMain
title=
"答题卡"
subtitle=
"答题卡是不断追求更高档位与排名的必备道具答题卡是不断追求更高档位与排名的必备道具"
extra=
{
<
Text
className=
"card-stock"
>
本月库存10
</
Text
>
}
onClick=
{
setTrue
}
/>
<
Modal
isVisible=
{
isVisible
}
onClose=
{
setFalse
}
>
<
View
>
<
Text
>
兑换几张
</
Text
>
<
Button
size=
"mini"
loading=
{
loading
}
onClick=
{
()
=>
onConfirm
(
'CARD'
,
setFalse
)
}
>
兑换
</
Button
>
</
View
>
</
Modal
>
</
View
>
)
}
export
default
AnswerSheet
src/pages/prepare/index.tsx
View file @
25af2abe
...
...
@@ -33,6 +33,8 @@ const Prepare = () => {
const
tribeInfo
=
useStoreState
(
state
=>
state
.
groupModel
.
tribeInfo
)
const
getStageDetail
=
useStoreActions
(
actions
=>
actions
.
gameModel
.
getStageDetail
)
const
getQuestionList
=
useStoreActions
(
actions
=>
actions
.
gameModel
.
getQuestionList
)
const
getSetting
=
useStoreActions
(
actions
=>
actions
.
userModel
.
getSetting
)
const
setting
=
useStoreState
(
state
=>
state
.
userModel
.
setting
)
const
tabs
:
TabItem
[]
=
[
{
...
...
@@ -69,6 +71,7 @@ const Prepare = () => {
useDidShow
(()
=>
{
getStageDetail
(
+
router
.
params
.
id
||
1
)
getSetting
()
})
useShareAppMessage
(()
=>
{
...
...
@@ -140,15 +143,15 @@ const Prepare = () => {
<AnswerCardModal isVisible={isVisible} onClose={setFalse}>
<View
className={classNames(styles.buy_card, {
[styles.buy_card_disabled]: point <
30
,
[styles.buy_card_disabled]: point <
setting.pointToCard
,
[styles.buy_card_loading]: loading,
})}
onClick={() => !loading && point >=
30
&& exchange({ num: 1 })}
onClick={() => !loading && point >=
setting.pointToCard
&& exchange({ num: 1 })}
>
<Loading size="small" className={styles.buy_card_spin} spinning={loading} />
<View className={styles.inner}>
<Image className={styles.logo} src={point >=
30
? assets['diamond.png'].u : assets['diamond-un.png'].u} mode="widthFix" />
<Text>-
30
</Text>
<Image className={styles.logo} src={point >=
setting.pointToCard
? assets['diamond.png'].u : assets['diamond-un.png'].u} mode="widthFix" />
<Text>-
{setting.pointToCard}
</Text>
<Text className={styles.buy}>购买</Text>
<Text className={styles.balance}>(当前剩余 {point})</Text>
</View>
...
...
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