index.jsx 656B

123456789101112131415161718192021
  1. import { useState, useEffect } from 'react'
  2. import { Image } from '@tarojs/components'
  3. import { getImgURL } from '@/utils/image'
  4. import './style.scss'
  5. export default (props) => {
  6. const { info, visible = false, onClose, onClick } = props
  7. return (
  8. <view className='components Adv' style={{display: visible ? 'block' : 'none'}}>
  9. <view className='centerLabel'>
  10. <view>
  11. <view className='Img' onClick={onClick}>
  12. <Image mode='scaleToFill' src={getImgURL(info?.image)}></Image>
  13. </view>
  14. <text className='iconfont icon-guanbi' onClick={onClose}></text>
  15. </view>
  16. </view>
  17. </view>
  18. )
  19. }