
import { Image } from '@tarojs/components'
import Taro from '@tarojs/taro'
import { getImgURL } from '@/utils/image'
import './index.scss'

export default function MyCourseListItem (props) {
  const { Data = {} } = props
  return (
    <view className='components MyCourseListItem flex-h' onClick={() => {Taro.navigateTo({ url: `/pages/index/courseDetail/index?id=${Data.curriculumId}` })}}>
      <view className='Img'>
        <view>
          {
            Data.curriculumImg &&
            <Image mode='aspectFill' className='centerLabel' src={getImgURL(Data.curriculumImg || null)} />
          }
        </view>
      </view>
      <view className='flex-item'>
        <view className='Name flex-h'>
          <view className='flex-item'>
            <text>{Data.name}</text>
          </view>
        </view>
        <text className='Address'>{Data.remark}</text>
        <view className='ShareInfo'>
          <view className='Users'>
            {/* <view></view>
            <view></view>
            <view></view> */}
          </view>
          <text>{Data.lookNum}人查看</text>
        </view>
      </view>
    </view>
  )
}
