Commit 3a7e9f17 authored by hewenhao's avatar hewenhao

feat: receiv point

parent 94c1fa68
import { View, RootPortal, Image, Text } from '@tarojs/components' import { View, RootPortal, Image, Text } from '@tarojs/components'
import { useEffect } from 'react'
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 styles from './shared.module.scss' import styles from './shared.module.scss'
type ModalAuthPhoneBeforeProps = { type ModalAuthPhoneBeforeProps = {
...@@ -9,6 +11,18 @@ type ModalAuthPhoneBeforeProps = { ...@@ -9,6 +11,18 @@ type ModalAuthPhoneBeforeProps = {
const ModalAuthPhoneBefore = (props: ModalAuthPhoneBeforeProps) => { const ModalAuthPhoneBefore = (props: ModalAuthPhoneBeforeProps) => {
const { onConfirm } = props const { onConfirm } = props
const userInfo = useStoreState(state => state.userModel.userInfo)
const nextStoreGuide = useStoreActions(actions => actions.guideModel.nextStoreGuide)
useEffect(() => {
if (userInfo.authPhone === 'Y') {
nextStoreGuide()
}
}, [userInfo.authPhone, nextStoreGuide])
if (userInfo.authPhone === 'Y') {
return null
}
return ( return (
<RootPortal> <RootPortal>
......
...@@ -53,7 +53,7 @@ const ModalReceivePoint = (props: ReceivePointProps) => { ...@@ -53,7 +53,7 @@ const ModalReceivePoint = (props: ReceivePointProps) => {
if (loading) return if (loading) return
loadingActions.setTrue() loadingActions.setTrue()
try { try {
// await receivePoint() await receivePoint()
loadingActions.setFalse() loadingActions.setFalse()
onConfirm && onConfirm() onConfirm && onConfirm()
} catch (err) { } catch (err) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment