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
1f67dd58
Commit
1f67dd58
authored
Apr 23, 2023
by
hewenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: update
parent
90954b08
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
46 deletions
+7
-46
project.config.json
project.config.json
+1
-1
main-component.tsx
src/pages/main/components/main-component.tsx
+5
-11
mystery-box.tsx
src/pages/market/components/mystery-box.tsx
+0
-33
index.tsx
src/pages/market/index.tsx
+1
-1
No files found.
project.config.json
View file @
1f67dd58
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
"miniprogramRoot"
:
"dist/"
,
"miniprogramRoot"
:
"dist/"
,
"projectname"
:
"GeekLearnMathWeapp"
,
"projectname"
:
"GeekLearnMathWeapp"
,
"description"
:
""
,
"description"
:
""
,
"appid"
:
"wx
8f25def587982a19
"
,
"appid"
:
"wx
693fe3460124d84b
"
,
"setting"
:
{
"setting"
:
{
"urlCheck"
:
false
,
"urlCheck"
:
false
,
"es6"
:
false
,
"es6"
:
false
,
...
...
src/pages/main/components/main-component.tsx
View file @
1f67dd58
...
@@ -32,7 +32,6 @@ const MainPage = () => {
...
@@ -32,7 +32,6 @@ const MainPage = () => {
const
point
=
useStoreState
(
state
=>
state
.
userModel
.
point
)
const
point
=
useStoreState
(
state
=>
state
.
userModel
.
point
)
const
isGroupGuideComplete
=
useStoreState
(
state
=>
state
.
guideModel
.
isGroupGuideComplete
)
const
isGroupGuideComplete
=
useStoreState
(
state
=>
state
.
guideModel
.
isGroupGuideComplete
)
const
isMainGuideComplete
=
useStoreState
(
state
=>
state
.
guideModel
.
isMainGuideComplete
)
const
isMainGuideComplete
=
useStoreState
(
state
=>
state
.
guideModel
.
isMainGuideComplete
)
const
isStoreGuideComplete
=
useStoreState
(
state
=>
state
.
guideModel
.
isStoreGuideComplete
)
const
fetchAccount
=
useStoreActions
(
actions
=>
actions
.
userModel
.
fetchAccount
)
const
fetchAccount
=
useStoreActions
(
actions
=>
actions
.
userModel
.
fetchAccount
)
const
updateGroupGuideActive
=
useStoreActions
(
actions
=>
actions
.
guideModel
.
updateGroupGuideActive
)
const
updateGroupGuideActive
=
useStoreActions
(
actions
=>
actions
.
guideModel
.
updateGroupGuideActive
)
const
fetchTribeInfo
=
useStoreActions
(
actions
=>
actions
.
groupModel
.
fetchTribeInfo
)
const
fetchTribeInfo
=
useStoreActions
(
actions
=>
actions
.
groupModel
.
fetchTribeInfo
)
...
@@ -49,10 +48,13 @@ const MainPage = () => {
...
@@ -49,10 +48,13 @@ const MainPage = () => {
})
})
},
[])
},
[])
const
isFocus
=
useFocus
()
// 激活部落引导
// 激活部落引导
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
!
isFocus
)
return
const
currentIndex
=
stageList
.
findIndex
(
c
=>
c
.
status
===
StageStatus
.
CURRENT
)
const
currentIndex
=
stageList
.
findIndex
(
c
=>
c
.
status
===
StageStatus
.
CURRENT
)
if
(
isGroupGuideComplete
||
!
userInfo
.
pointReceiv
e
)
{
if
(
isGroupGuideComplete
||
currentIndex
<
3
||
!
userInfo
.
pointReceive
||
!
userInfo
.
city
||
!
userInfo
.
grad
e
)
{
return
return
}
}
...
@@ -65,20 +67,12 @@ const MainPage = () => {
...
@@ -65,20 +67,12 @@ const MainPage = () => {
}
}
}
}
fn
()
fn
()
},
[
point
,
isGroupGuideComplete
,
stageList
,
updateGroupGuideActive
,
userInfo
,
fetchTribeInfo
,
isMainGuideComplete
])
},
[
point
,
isGroupGuideComplete
,
stageList
,
updateGroupGuideActive
,
userInfo
,
fetchTribeInfo
,
isMainGuideComplete
,
isFocus
])
const
isFocus
=
useFocus
()
onAppHide
(()
=>
{
onAppHide
(()
=>
{
player
.
pause
()
player
.
pause
()
})
})
useEffect
(()
=>
{
if
(
isFocus
)
{
fetchTribeInfo
()
}
},
[
isFocus
,
fetchTribeInfo
])
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
isFocus
)
{
if
(
isFocus
)
{
player
.
play
()
player
.
play
()
...
...
src/pages/market/components/mystery-box.tsx
deleted
100644 → 0
View file @
90954b08
import
{
View
,
Text
,
Button
,
Input
}
from
'@tarojs/components'
import
Modal
from
'@/components/Modal'
import
{
useBoolean
}
from
'@/hooks/use-boolean'
import
CardMain
from
'./card-main'
const
MysteryBox
=
()
=>
{
const
[
isVisible
,
{
toggle
}]
=
useBoolean
(
false
)
const
onClick
=
()
=>
{
toggle
()
}
return
(
<
View
className=
"card-body"
>
<
CardMain
title=
"神秘大礼"
subtitle=
"兑换神秘大礼,线下领取超级大礼"
extra=
{
<
Text
className=
"card-stock"
>
本月库存10
</
Text
>
}
onClick=
{
toggle
}
/>
<
Modal
isVisible=
{
isVisible
}
onClose=
{
toggle
}
>
<
View
>
<
Input
type=
"number"
/>
<
Text
>
兑换礼物
</
Text
>
<
Button
size=
"mini"
onClick=
{
onClick
}
>
兑换
</
Button
>
</
View
>
</
Modal
>
</
View
>
)
}
export
default
MysteryBox
src/pages/market/index.tsx
View file @
1f67dd58
...
@@ -177,7 +177,7 @@ const StudyMarket = () => {
...
@@ -177,7 +177,7 @@ const StudyMarket = () => {
cover=
{
item
.
img
}
cover=
{
item
.
img
}
stock=
{
item
.
stock
}
stock=
{
item
.
stock
}
price=
{
pric
}
price=
{
pric
}
disabled=
{
!
storeGuideActive
&&
disabled
}
disabled=
{
(
!
(
item
.
isGuideCard
&&
isStep1Active
))
&&
disabled
}
subtitle=
{
item
.
description
}
subtitle=
{
item
.
description
}
disabledText=
{
disabledText
}
disabledText=
{
disabledText
}
isGuideActive=
{
isMaskActive
&&
storeGuideStep
===
2
&&
index
===
0
}
isGuideActive=
{
isMaskActive
&&
storeGuideStep
===
2
&&
index
===
0
}
...
...
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