import { useState } from 'react'

import { Button, Radio, View } from '@tarojs/components'
import PayOrderCard from '@/components/PayOrderCard'
import formatTimes from '@/utils/formatTime'
import food from '@/assets/icons/ProCard/food.png'
import ProCard_hot from '@/assets/icons/ProCard/ProCard_hot.png'
import './style.less'

export default (props) => {
  const { item } = props

  return (
    <view class='wrapper-box-cardOrder'>
      <view class='left-complete-one-cardOrder'>
        <View className='left-viewText-payOrder'>返现￥{(item.cashback / 100).toFixed(2)}</View>
        <view className='title-image-cardOrder'>
          <image className='image-1-cardOrder' mode='scaleToFill' src={item.poster}></image>
          <image className='image-2-cardOrder' src={food}></image>
        </view>
        <view className='title-content-cardOrder'>

          <view className='title-text-cardOrder'>{item.description}</view>

          <text className='title-money-cardOrder' >￥{(item.actualPrice / 100).toFixed(2)}元</text>
          <view className='title-time-cardOrder' >有效期：{formatTimes(item.startTime, "yyyy/MM/dd")}-{formatTimes(item.endTime, "yyyy/MM/dd")}</view>
        </view>
      </view>
    </view>
    // </view >
  )
}
