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
0bba6b9b
Commit
0bba6b9b
authored
Apr 22, 2024
by
raca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 更新引导页 积分兑换 显示数量
parent
366c0f2d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
3 deletions
+18
-3
auth.ts
src/api/auth.ts
+2
-0
auth-phone-before.tsx
src/pages/market/components/tutorial/auth-phone-before.tsx
+8
-1
receive-point.tsx
src/pages/market/components/tutorial/receive-point.tsx
+8
-2
No files found.
src/api/auth.ts
View file @
0bba6b9b
...
@@ -67,6 +67,8 @@ export type SettintType = {
...
@@ -67,6 +67,8 @@ export type SettintType = {
joinGroupPoint
?:
number
;
joinGroupPoint
?:
number
;
personalPkLosePoint
?:
number
;
personalPkLosePoint
?:
number
;
personalPkWinPoint
?:
number
;
personalPkWinPoint
?:
number
;
newUserPoint
?:
number
;
createNamePoint
?:
number
;
}
}
export
function
getSetting
()
{
export
function
getSetting
()
{
...
...
src/pages/market/components/tutorial/auth-phone-before.tsx
View file @
0bba6b9b
import
{
View
,
RootPortal
,
Image
,
Text
}
from
'@tarojs/components'
import
{
View
,
RootPortal
,
Image
,
Text
}
from
'@tarojs/components'
import
{
useEffect
}
from
'react'
import
{
useEffect
}
from
'react'
import
{
useDidShow
}
from
'@tarojs/taro'
import
tutorialAssets
from
'@/assets/oss/assets-tutorial'
import
tutorialAssets
from
'@/assets/oss/assets-tutorial'
import
classNames
from
'classnames'
import
classNames
from
'classnames'
import
{
useStoreState
,
useStoreActions
}
from
'@/store/hooks'
import
{
useStoreState
,
useStoreActions
}
from
'@/store/hooks'
...
@@ -13,6 +14,12 @@ const ModalAuthPhoneBefore = (props: ModalAuthPhoneBeforeProps) => {
...
@@ -13,6 +14,12 @@ const ModalAuthPhoneBefore = (props: ModalAuthPhoneBeforeProps) => {
const
{
onConfirm
}
=
props
const
{
onConfirm
}
=
props
const
userInfo
=
useStoreState
(
state
=>
state
.
userModel
.
userInfo
)
const
userInfo
=
useStoreState
(
state
=>
state
.
userModel
.
userInfo
)
const
nextStoreGuide
=
useStoreActions
(
actions
=>
actions
.
guideModel
.
nextStoreGuide
)
const
nextStoreGuide
=
useStoreActions
(
actions
=>
actions
.
guideModel
.
nextStoreGuide
)
const
getSetting
=
useStoreActions
(
actions
=>
actions
.
userModel
.
getSetting
)
const
setting
=
useStoreState
((
state
)
=>
state
.
userModel
.
setting
)
useDidShow
(()
=>
{
getSetting
()
})
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
userInfo
.
authPhone
===
'Y'
)
{
if
(
userInfo
.
authPhone
===
'Y'
)
{
...
@@ -35,7 +42,7 @@ const ModalAuthPhoneBefore = (props: ModalAuthPhoneBeforeProps) => {
...
@@ -35,7 +42,7 @@ const ModalAuthPhoneBefore = (props: ModalAuthPhoneBeforeProps) => {
为了让阿喵老师能给你发放礼品,需要你进行授权哦。
为了让阿喵老师能给你发放礼品,需要你进行授权哦。
<
View
>
<
View
>
<
Text
className=
{
styles
.
em
}
>
授权成功后,
</
Text
>
还可以
<
Text
className=
{
styles
.
em
}
>
授权成功后,
</
Text
>
还可以
<
Text
className=
{
styles
.
em
}
>
获得
20
水晶
</
Text
>
奖励哦!
<
Text
className=
{
styles
.
em
}
>
获得
{
setting
.
newUserPoint
}
水晶
</
Text
>
奖励哦!
</
View
>
</
View
>
</
View
>
</
View
>
<
View
className=
{
styles
.
continue
}
>
<
View
className=
{
styles
.
continue
}
>
...
...
src/pages/market/components/tutorial/receive-point.tsx
View file @
0bba6b9b
import
{
View
,
RootPortal
,
Image
,
Button
,
CommonEventFunction
,
ButtonProps
}
from
'@tarojs/components'
import
{
View
,
RootPortal
,
Image
,
Button
,
CommonEventFunction
,
ButtonProps
}
from
'@tarojs/components'
import
{
showToast
}
from
'@tarojs/taro'
import
{
showToast
,
useDidShow
}
from
'@tarojs/taro'
import
{
useBoolean
}
from
'@/hooks'
import
{
useBoolean
}
from
'@/hooks'
import
{
receivePoint
}
from
'@/api'
import
{
receivePoint
}
from
'@/api'
import
{
useStoreState
,
useStoreActions
}
from
'@/store/hooks'
import
{
useStoreState
,
useStoreActions
}
from
'@/store/hooks'
...
@@ -19,6 +19,8 @@ const ModalReceivePoint = (props: ReceivePointProps) => {
...
@@ -19,6 +19,8 @@ const ModalReceivePoint = (props: ReceivePointProps) => {
const
completeStoreGuide
=
useStoreActions
(
actions
=>
actions
.
guideModel
.
completeStoreGuide
)
const
completeStoreGuide
=
useStoreActions
(
actions
=>
actions
.
guideModel
.
completeStoreGuide
)
const
updateNickNameAndPhone
=
useStoreActions
(
actions
=>
actions
.
userModel
.
updateNickNameAndPhone
)
const
updateNickNameAndPhone
=
useStoreActions
(
actions
=>
actions
.
userModel
.
updateNickNameAndPhone
)
const
[
fail
,
failActions
]
=
useBoolean
(
false
)
const
[
fail
,
failActions
]
=
useBoolean
(
false
)
const
getSetting
=
useStoreActions
((
state
)
=>
state
.
userModel
.
getSetting
)
const
setting
=
useStoreState
((
state
)
=>
state
.
userModel
.
setting
)
const
updatePhoneAndReceive
=
async
(
code
:
string
)
=>
{
const
updatePhoneAndReceive
=
async
(
code
:
string
)
=>
{
if
(
loading
)
return
if
(
loading
)
return
...
@@ -66,6 +68,10 @@ const ModalReceivePoint = (props: ReceivePointProps) => {
...
@@ -66,6 +68,10 @@ const ModalReceivePoint = (props: ReceivePointProps) => {
completeStoreGuide
()
completeStoreGuide
()
}
}
useDidShow
(()
=>
{
getSetting
()
})
const
renderModal
=
()
=>
{
const
renderModal
=
()
=>
{
if
(
fail
)
{
if
(
fail
)
{
return
(
return
(
...
@@ -98,7 +104,7 @@ const ModalReceivePoint = (props: ReceivePointProps) => {
...
@@ -98,7 +104,7 @@ const ModalReceivePoint = (props: ReceivePointProps) => {
return
(
return
(
<
View
className=
{
styles
.
modal
}
catchMove
>
<
View
className=
{
styles
.
modal
}
catchMove
>
<
Image
src=
{
giftAssets
[
'point-receive.png'
].
u
}
className=
{
styles
.
icon
}
></
Image
>
<
Image
src=
{
giftAssets
[
'point-receive.png'
].
u
}
className=
{
styles
.
icon
}
></
Image
>
<
View
className=
{
styles
.
count
}
>
水晶 +
20
</
View
>
<
View
className=
{
styles
.
count
}
>
水晶 +
{
setting
.
newUserPoint
}
</
View
>
<
View
className=
{
styles
.
tips
}
>
阿喵老师的奖励,继续加油哦~
</
View
>
<
View
className=
{
styles
.
tips
}
>
阿喵老师的奖励,继续加油哦~
</
View
>
{
useInfo
.
authPhone
===
'Y'
{
useInfo
.
authPhone
===
'Y'
?
(
?
(
...
...
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