调整盲盒
This commit is contained in:
parent
29a3724bba
commit
6aefb4c721
|
|
@ -14,6 +14,7 @@ import { checkBuyResult } from 'services/blindBox'
|
||||||
import useRefresh from 'hooks/useRefresh'
|
import useRefresh from 'hooks/useRefresh'
|
||||||
import useToast from 'hooks/useToast'
|
import useToast from 'hooks/useToast'
|
||||||
import { UnOpenModel } from 'components/Modal'
|
import { UnOpenModel } from 'components/Modal'
|
||||||
|
import Empty from 'components/Empty'
|
||||||
import tokens from 'config/constants/tokens'
|
import tokens from 'config/constants/tokens'
|
||||||
import { ListProp } from 'types/blindBox'
|
import { ListProp } from 'types/blindBox'
|
||||||
import Header from './component/Header'
|
import Header from './component/Header'
|
||||||
|
|
@ -169,6 +170,11 @@ const AuthorizationBtn = styled(Button)`
|
||||||
width: 500px;
|
width: 500px;
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
const EmptyFlex = styled(Flex)`
|
||||||
|
width: 100%;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
`
|
||||||
|
|
||||||
const BlindBox: React.FC = () => {
|
const BlindBox: React.FC = () => {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
|
|
@ -357,17 +363,24 @@ const BlindBox: React.FC = () => {
|
||||||
return (
|
return (
|
||||||
<MainFlex>
|
<MainFlex>
|
||||||
{/* <UnOpenModel /> */}
|
{/* <UnOpenModel /> */}
|
||||||
<SwiperDiv
|
{blindBoxList && blindBoxList.length > 0 && (
|
||||||
color={blindBoxList?.length === 1 ? 'none' : ''}
|
<SwiperDiv
|
||||||
onSlideChange={swiperChange}
|
color={blindBoxList?.length === 1 ? 'none' : ''}
|
||||||
loop
|
onSlideChange={swiperChange}
|
||||||
pagination={{ clickable: true }}
|
loop
|
||||||
spaceBetween={16}
|
pagination={{ clickable: true }}
|
||||||
freeModeMomentumRatio={0.25}
|
spaceBetween={16}
|
||||||
freeModeMomentumVelocityRatio={0.5}
|
freeModeMomentumRatio={0.25}
|
||||||
>
|
freeModeMomentumVelocityRatio={0.5}
|
||||||
{renderContent()}
|
>
|
||||||
</SwiperDiv>
|
{renderContent()}
|
||||||
|
</SwiperDiv>
|
||||||
|
)}
|
||||||
|
{blindBoxList && blindBoxList.length === 0 && (
|
||||||
|
<EmptyFlex>
|
||||||
|
<Empty />
|
||||||
|
</EmptyFlex>
|
||||||
|
)}
|
||||||
</MainFlex>
|
</MainFlex>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue