xuxueyang
2024-08-31 32526e5bddb7b14328b2467cd18783f480b33f3b
pages/home/components/home-top-flow.vue
@@ -2,7 +2,7 @@
   <view class="home-top-flow">
      <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" :class="[!item.stock?'':'']" :src="item.cover" :lazy-load="true">
            </image>
            <view class="level">
               {{ item.levelStr}}
@@ -12,11 +12,12 @@
         <view class="m-l-12 info-container flex1">
            <view class="title">
               {{ item.name || '-' }}
               <!-- <span v-if="item.categoryStr" class="m-l-10">{{item.categoryStr || '-'}}</span> -->
               <view class="price">
                  ¥{{ item.price || 0 }}/扎
               </view>
            </view>
            <view class="tags" v-if="item.tag">
            <view class="tags" v-if="item.tags">
               <view class="tag red" v-for="(tag,k) of item.tagArr" :class="[k===0?'red':'green']" :key="tag">{{
              tag
            }}
@@ -52,13 +53,14 @@
         return {
            // list: [{}, {}, {}, {}]
            query: {
               status: 'UP'
               status: 'UP',
               recommend: true
            }
         };
      },
      mounted() {
         this.listApi = '/api/customer/flower/list'
         this.page.size = 4
         this.page.size = 20
         this.page.current = 1
         this.getList('post')
      },
@@ -123,22 +125,22 @@
               display: flex;
               .tag {
                  min-width: 80rpx;
                  padding-left: 20rpx;
                  padding-right: 20rpx;
                  line-height: 36rpx;
                  // min-width: 60rpx;
                  padding-left: 10rpx;
                  padding-right: 10rpx;
                  line-height: 30rpx;
                  background: #FEE6E6;
                  border-radius: 21rpx;
                  font-size: 24rpx;
                  border-radius: 10rpx;
                  font-size: 18rpx;
                  color: #CD1212;
                  margin-right: 12rpx;
                  margin-right: 6rpx;
                  text-align: center;
               }
               .tag.green {
                  color: rgba(110, 159, 102, 1);
                  background: rgba(202, 229, 214, 1);
                  border-radius: 21rpx;
                  border-radius: 10rpx;
                  // opacity: 0.57;
               }
            }