<template>
  <view>
    <view class="goods_list_style1" v-if="showStyle">
      <view class="goods_item_style1">
        <view class="goods_img">
          <image src="https://api.dreamstech.cn/img/ysyl//20191012/1c15b1d8-da65-4219-a8ae-a8e671e297891570847701931.png"></image>
        </view>
        <view class="goods_info">
          <view class="goods_top">
            <view class="goods_time">10分钟</view>
            <view class="goods_title">众生丸(薄膜衣 浓缩丸)</view>
          </view>
          <view class="goods_des">清热解毒，活血凉血，消炎止痛。用于上呼吸道感染，急、慢性咽喉炎，急性扁桃腺炎等症</view>
          <view class="goods_active">
            <view class="active_item">特价抢购</view>
            <view class="active_item">1元换购</view>
            <view class="active_item">包邮</view>
          </view>
          <view class="goods_bottom">
            <view class="sell_info">
              <view class="sell_price">
                <text>￥110.50</text>
                <text>￥130.50</text>
              </view>
              <view class="sell_count">销量520笔</view>
            </view>
            <image src="http://139.9.103.171:1888/img/image/ss="buy"></image>
          </view>
        </view>
      </view>
    </view>
    <view class="goods_list_style2" v-else>
      <view class="goods_item_style2">
        <view class="goods_item_box">
          <view class="goods_img">
            <image src="https://api.dreamstech.cn/img/ysyl//20191012/1c15b1d8-da65-4219-a8ae-a8e671e297891570847701931.png"></image>
          </view>
          <view class="goods_info">
            <view class="goods_top">
              <view class="goods_title">众生丸(薄膜衣 浓缩丸)</view>
            </view>
            <!-- <view class="goods_des">清热解毒，活血凉血，消炎止痛。用于上呼吸道感染，急、慢性咽喉炎，急性扁桃腺炎等症</view> -->
            <view class="goods_active">
              <view class="active_item">特价抢购</view>
              <view class="active_item">1元换购</view>
              <view class="active_item">包邮</view>
            </view>
            <view class="goods_bottom">
              <view class="sell_info">
                <view class="sell_price">
                  <text>￥110.50</text>
                  <!-- <text>￥130.50</text> -->
                </view>
                <view class="sell_count">销量520笔</view>
              </view>
              <image src="http://139.9.103.171:1888/img/image/ss="buy"></image>
              <!-- <view class="buy">购买</view> -->
            </view>
          </view>
        </view>
      </view>
      <view class="goods_item_style2">
        <view class="goods_item_box">
          <view class="goods_img">
            <image src="https://api.dreamstech.cn/img/ysyl//20191012/1c15b1d8-da65-4219-a8ae-a8e671e297891570847701931.png"></image>
          </view>
          <view class="goods_info">
            <view class="goods_top">
              <view class="goods_title">众生丸(薄膜衣 浓缩丸)</view>
            </view>
            <!-- <view class="goods_des">清热解毒，活血凉血，消炎止痛。用于上呼吸道感染，急、慢性咽喉炎，急性扁桃腺炎等症</view> -->
            <view class="goods_active">
              <view class="active_item">特价抢购</view>
              <view class="active_item">1元换购</view>
              <view class="active_item">包邮</view>
            </view>
            <view class="goods_bottom">
              <view class="sell_info">
                <view class="sell_price">
                  <text>￥110.50</text>
                  <!-- <text>￥130.50</text> -->
                </view>
                <view class="sell_count">销量520笔</view>
              </view>
               <image src="http://139.9.103.171:1888/img/image/ss="buy"></image>
            </view>
           
          </view>
        </view>
      </view>
    </view>
  </view>

</template>

<script>
export default {
  props: {
    dataList: {
      type: Array,
      default: []
    },
    showStyle: {
      type: Boolean,
      default: true
    }
  },
  data() {
    return {};
  },
  methods: {

  },
  created() { }
};
</script>

<style lang="scss">
.goods_list_style1 {
  .goods_item_style1 {
    display: flex;
    flex-direction: row;
    padding: 20upx;
    border-top: 1upx solid #f2f2f2;
    .goods_img {
      image {
        width: 115upx;
        height: 115upx;
      }
    }
    .goods_info {
      padding-left: 20upx;
      .goods_top {
        display: flex;
        flex-direction: row;
        align-items: center;
        .goods_time {
          font-size: 18upx;
          border-radius: 4upx;
          background: $dt-color-primary;
          padding: 5upx 10upx;
          color: #fff;
        }
        .goods_title {
          flex: 1;
          color: #333333;
          font-size: 28upx;
          letter-spacing: 2upx;
          margin-left: 20upx;
        }
      }
      .goods_des {
        font-size: 22upx;
        color: #999;
        line-height: 38upx;
        margin-bottom: 10upx;
      }
      .goods_active {
        display: flex;
        flex-direction: row;
        align-items: center;
        margin-bottom: 10upx;
        flex-wrap: wrap;
        .active_item {
          border: 1upx solid #ee1515;
          border-radius: 4upx;
          padding: 5upx;
          color: #ee1515;
          font-size: 18upx;
          margin-right: 10upx;
        }
      }
      .goods_bottom {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        .sell_info {
          display: flex;
          flex-direction: column;
          .sell_price {
            display: flex;
            flex-direction: row;
            align-items: center;
            text:first-child {
              font-size: 30upx;
              color: #ee1515;
            }
            text:last-child {
              color: #888888;
              font-size: 22upx;
              text-decoration: line-through;
              margin-left: 20upx;
            }
          }
          .sell_count {
            margin-top: 10upx;
            font-size: 22upx;
            color: #888888;
          }
        }
        .buy {
          width: 50upx;
          height: 50upx;
        }
      }
    }
  }
}

.goods_list_style2 {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  .goods_item_style2 {
    width: 50%;
    justify-content: flex-start;
    box-sizing: border-box;
    border-bottom: 2upx solid rgb(238, 238, 238);
    border-right: 2upx solid rgb(238, 238, 238);
    .goods_item_box {
      display: flex;
      flex-direction: column;
      padding: 0 20upx;
      .goods_img {
        width: 100%;
        height: 250upx;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        image {
          width: 218upx;
          height: 218upx;
        }
      }
      .goods_info {
        margin-bottom: 10upx;
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        .goods_top {
          display: flex;
          flex-direction: row;
          align-items: center;
          .goods_title {
            flex: 1;
            color: #333333;
            font-size: 24upx;
            letter-spacing: 1upx;
          }
        }
        .goods_des {
          font-size: 22upx;
          color: #999;
          line-height: 38upx;
          margin-bottom: 10upx;
        }
        .goods_active {
          display: flex;
          flex-direction: row;
          flex-wrap: wrap;
          margin-bottom: 10upx;
          .active_item {
            border: 1upx solid #ee1515;
            border-radius: 4upx;
            padding: 5upx 10upx;
            color: #ee1515;
            font-size: 18upx;
            margin-right: 10upx;
            margin-top: 10upx;
          }
        }
        .goods_bottom {
          display: flex;
          flex-direction: row;
          justify-content: space-between;
          align-items: center;
          .sell_info {
            display: flex;
            flex-direction: column;
            .sell_price {
              display: flex;
              flex-direction: row;
              align-items: center;
              text:first-child {
                font-size: 30upx;
                color: #ee1515;
              }
              // text:last-child {
              //   color: #888888;
              //   font-size: 22upx;
              //   text-decoration: line-through;
              //   margin-left: 20upx;
              // }
            }
            .sell_count {
              margin-top: 10upx;
              font-size: 22upx;
              color: #888888;
            }
          }
          .buy {
            width: 50upx;
            height: 50upx;
          }
        }
      }
    }
  }
}
</style>
