import Taro from '@tarojs/taro'
import { useState, useEffect } from 'react'
import formatTimes from '@/utils/formatTime'
import iconsearch from '@/assets/icons/housemantj/search.png'
import ms from '@/assets/icons/housemantj/ms3.jpg'
import cutoverUser from '@/assets/icons/UserCenter/cutoverUser.png'
import './style.less'


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



  useEffect(() => {

  }, [])

  return (
    <view className='orderCard'>
      <view style={{ overflow: 'hidden' }}>
        <view className='orderId'>订单编号：{item.orderId}</view>
        <view className='orderTime'>下单日期：{formatTimes(item.orderDate, 'yyyy-MM-dd hh:ss')}</view>
      </view>
      <view className='order'>
        <image className='orderImg' src={item.poster} mode='aspectFit' />
        <view className='orderRight'>
          <view className='foodName'>{item.description}</view>
          <view className='price'>合计金额：￥<text style={{ fontSize: '24rpx' }}>{item.actualPrice / 100}</text>元 <text className='pnum'>数量：<text>1</text>张</text> </view>
          <view>已下单：等待客户上门就餐</view>
        </view>
        <view className='line' />
        <view className='phone'>客户手机：<text>{item.phone.replace(/^(\d{3})\d{4}(\d+)/, "$1****$2") || ''}</text></view>
      </view>
    </view>
  )
}
