<template>
  <div class="outer">
    <div class="background">
      <div class="top">
        <h4 class="text">我的积分</h4>
        <h2 class="point">999</h2>
        <div class="earn">
          <div>赚积分</div>
        </div>
      </div>
    </div>
    <div class="container">
      <div class="menu">
        <div class="item item1">
          <img src="../../static/point/shangcheng.png" alt="" />
          <span>积分商城</span>
        </div>
        <div class="item item2">
          <img src="../../static/point/mingxi.png" alt="" />
          <span>积分明细</span>
        </div>
        <div class="item item3">
          <img src="../../static/point/dingdan.png" alt="" />
          <span>积分订单</span>
        </div>
      </div>
      <div class="news">
        <img src="../../static/test/new.png" alt="" />
      </div>
      <div class="show">
        <product-list/>
      </div>
    </div>
  </div>
</template>

<script>
import ProductList from "../../components/ProductList"
export default {
  head() {
    return {
      title: "积分主页",
    };
  },
  data() {
    return {
      images: [],
      list: [],
      loading: false, //加载状态
      finished: false, //是否完成加载
      refreshing: false, //是否正在上拉刷新
    };
  },
  components:{
    ProductList
  },
  beforeCreate() {},
  created() {},
  beforeMount() {},
  mounted() {
    console.log(this);
  },
  beforeUpdate() {},
  updated() {},
  beforeDestroy() {},
  destroyed() {},
  methods: {
    // onLoad() {
    //   var that = this;
    //   that.$axios
    //     .get("/getIntegralWaresInfoList", {
    //       params: {
    //         stationId: "1",
    //       },
    //     })
    //     .then((res) => {
    //       if (res.data.retCode == 0) {
    //         that.list = res.data.data; //追加数据
    //         // 加载状态结束
    //         that.loading = false;
    //         that.finished = true;
    //         console.log(that.list);
    //       }
    //     });
    // },
    // onRefresh() {
    //   // 清空列表数据
    //   that.finished = true;
    //   // 重新加载数据
    //   // 将 loading 设置为 true，表示处于加载状态
    //   that.loading = true;
    //   that.onLoad();
    // },
  },
};
</script>

<style>
.outer {
  position: relative;
}
.background {
  background-color: #f3b335;
  width: 100%;
  height: 49.46vw;
  position: relative;
  background: url("../../static/point/bj.png") no-repeat 0px 0px;
  background-size: cover;
  z-index: -1;
}
.background .text {
  position: absolute;
  left: 4vw;
  top: 8vw;
  margin: 0;
  padding: 0;
  width: 14.9vw;
  height: 5.33vw;
  font-size: 3.7vw;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: #ffffff;
  line-height: 5.33vw;
}
.background .point {
  position: absolute;
  margin: 0;
  padding: 0;
  left: 4vw;
  top: 15.33vw;
  width: 36vw;
  height: 16.8vw;
  font-size: 12vw;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: #ffffff;
  line-height: 14vw;
}
.background .earn {
  position: absolute;
  right: 0;
  top: 20.66vw;
  width: 21.33vw;
  height: 7.33vw;
  font-size: 3.46vw;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  background: url("../../static/point/jifen.png") no-repeat;
  background-size: cover;
  box-sizing: border-box;
}
.background .earn div {
  position: absolute;
  top: 1.5vw;
  right: 2vw;
  width: 10.4vw;
  height: 4.93vw;
  font-size: 3.46vw;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: #f3b235;
  line-height: 4.93vw;
}
.container {
  margin-top: -13.33vw;
  width: 100%;
  padding: 0 4vw;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  z-index: 99;
}
.container .menu {
  width: 100%;
  height: 26.66vw;
  background: #ffffff;
  box-shadow: 0px 2px 10px 5px rgba(227, 227, 227, 0.5);
  border-radius: 20px;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
}
.container .menu .item {
  width: 14.93vw;
  height: 14.93vw;
}
.container .menu .item img {
  display: block;
  width: 12vw;
  height: 12vw;
  margin: 0 auto;
}
.container .menu .item span {
  display: block;
  width: 100%;
  height: 3.73vw;
  font-size: 3.73vw;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: #666666;
  line-height: 3.73vw;
  text-align: center;
  margin-top: 3vw;
}

.container .news {
  margin-top: 4vw;
  width: 100%;
  height: 21.33vw;
}
.container .news img {
  width: 100%;
  height: 100%;
}
</style>
