card.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <view>
  3. <view @click="$jump('/pages/order/detail?id='+item.id)" class="card" v-for="(item,index) in list" :key="index">
  4. <view class="center">
  5. <image
  6. src="https://guosen-bucket-ldt.obs.cn-south-1.myhuaweicloud.com:443/b15e8992179b4b30b9bdb943d8ad9c07-uWGk0l5GutNQ3013850822b2cdb5f77a445ce68ab57e.jpeg"
  7. mode="aspectFill"></image>
  8. </view>
  9. <view class="content">
  10. <view class="flex justify-between">
  11. <text class="text-bold text-lg">杨国福麻辣烫</text>
  12. <view class="">
  13. <text v-if="item.payStatus=='付款成功'" class="text-base">{{item.orderStatus}}</text>
  14. <text v-else class="text-base">{{item.payStatus}}</text>
  15. </view>
  16. </view>
  17. <view style="font-size: 26rpx;color: #888888;">
  18. <view class="margin-bottom-10">
  19. <text>{{item.id}}</text>
  20. <text @click.stop="$util.copy(item.id)" class="margin-left-10 text-black">复制</text>
  21. </view>
  22. <view class="flex justify-between ">
  23. <text class="center">{{item.createTime}}</text>
  24. <text class="">消费:{{item.totalPrice / 100}}元</text>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. props:{
  34. list:Array
  35. },
  36. data() {
  37. return {
  38. }
  39. },
  40. methods: {
  41. }
  42. }
  43. </script>
  44. <style lang="scss">
  45. .card {
  46. margin: 10rpx;
  47. background-color: #FFFFFF;
  48. display: flex;
  49. padding: 18rpx;
  50. image {
  51. width: 150rpx;
  52. height: 150rpx;
  53. border-radius: 8rpx;
  54. }
  55. .content {
  56. width: calc(100% - 140rpx - 20rpx - 20rpx);
  57. margin-left: 20rpx;
  58. display: flex;
  59. flex-direction: column;
  60. justify-content: space-between;
  61. }
  62. }
  63. </style>