xuxueyang
2024-07-30 1fb44496929548b4f07b37796d506dedc494d44a
pages/home/components/home-top-flow.vue
@@ -1,9 +1,8 @@
<template>
  <view class="home-top-flow">
    <view class="item flex" v-for="(item,index) of list" :key="index">
      <view class="item flex" v-for="(item,index) of list" :key="index" @click="toDetail(item)">
      <view class="img">
        <image class="img img100"
               :src="item.cover">
            <image class="img img100" :src="item.cover">
        </image>
        <view class="level">
          {{ item.levelStr}}
@@ -39,6 +38,9 @@
            {{ item.unit || 0 }}
          </view>
        </view>
            <view class="button-buy  m-l-a m-r-0" v-if="item.status=='UP'">
               立即抢购
            </view>
      </view>
    </view>
  </view>
@@ -49,6 +51,9 @@
  data() {
    return {
      // list: [{}, {}, {}, {}]
            query: {
               status: 'UP'
            }
    };
  },
  mounted() {
@@ -67,6 +72,11 @@
          }
        }
      }
         },
         toDetail(item) {
            uni.navigateTo({
               url: '/sub_pages/customer/trade/detail?id=' + item.id
            })
    }
  },
@@ -82,6 +92,16 @@
    padding: 10rpx;
    .info-container {
            .button-buy {
               width: 128rpx;
               height: 48rpx;
               border-radius: 30rpx;
               border: 2rpx solid #CF0000;
               font-size: 24rpx;
               color: #CF0000;
               line-height: 48rpx;
               text-align: center;
            }
      .other-info {
        margin-top: 6rpx;