import { useState, useEffect } from 'react'
import { Image } from '@tarojs/components'
import { getImgURL } from '@/utils/image'
import './style.scss'

export default (props) => {
  const { info, visible = false, onClose, onClick } = props

  return (
    <view className='components Adv' style={{display: visible ? 'block' : 'none'}}>
      <view className='centerLabel'>
        <view>
          <view className='Img' onClick={onClick}>
            <Image mode='scaleToFill' src={getImgURL(info?.image)}></Image>
          </view>
          <text className='iconfont icon-guanbi' onClick={onClose}></text>
        </view>
      </view>
    </view>
  )
}
