<template>
  <view class="themes-default">
    <image
      class="themes-default__img"
      :src="shopData.bgimg
          ? shopData.bgimg
          : event_rul + '/static/images/df-bg.png'
      "
      mode="widthFix"
    ></image>
    <!-- 头部 -->
    <themes-head
      :navHeight="navHeight"
      @navselect="navHeadSelect"
      :navList="navList"
      :navIndex="navIndex"
      :shopData="shopData"
    ></themes-head>
    <view class="themes-content position-r">
      <Choiceness v-if="tabArr.indexOf(0) > -1" v-show="navIndex === 0"></Choiceness>
      <Goods v-if="tabArr.indexOf(1) > -1" v-show="navIndex === 1" :hearHeight="hearHeight"></Goods>
      <Activity v-if="tabArr.indexOf(2) > -1" v-show="navIndex === 2" :hearHeight="hearHeight"></Activity>
      <new-product v-if="tabArr.indexOf(3) > -1" v-show="navIndex === 3" :hearHeight="hearHeight"></new-product>
    </view>
    <!-- 悬浮按钮 -->
    <drag-button></drag-button>
  </view>
</template>

<script>
import { myMixin } from "../logic/index.js";
import themesHead from "./components/themes-head.vue";
import Choiceness from "./choiceness.vue";
import Activity from "./activity.vue";
import newProduct from "./newProduct.vue";
import Goods from "./goods.vue";

export default {
  mixins: [myMixin],
  components: {
    themesHead,
    Choiceness,
    Activity,
    newProduct,
    Goods,
  },
};
</script>

<style lang="scss" scoped>
.themes-default {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #FAF8F8;
  position: relative;
  z-index: 1;
  &::-webkit-scrollbar {
    display: none;
  }
  &__img {
    position: absolute;
    top: 0;
    z-index: -1;
    width: 100%;
    height: 622rpx;
  }
}
.themes-content {
  flex: 1;
  z-index: 2;
  padding: 0 28rpx 40rpx;
  margin-top: 16rpx;
  position: relative;
  &::before {
    content: "";
    position: absolute;
    top: 12rpx;
    left: 0;
    width: 100%;
    height: 270rpx;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #FFFFFF 80rpx, #FFFFFF 100%);
  }
}
</style>