<template>
  <view class="box">
    <view class="top">
      <view @click="goExerciseFree(1)" class="top-item mb30">
        <image
          class="top-item-img1"
          src="https://ndata.zzxcx.net/wxapp/static/imgs/classifyFree/subject1Bg.png"
        ></image>
        <image mode="widthFix" class="goArrow top-item-img2" :src="goArrow" />
        <text class="top-item-text">科目一体验</text>
      </view>
      <view @click="goExerciseFree(4)" class="top-item">
        <image
          class="top-item-img1"
          src="https://ndata.zzxcx.net/wxapp/static/imgs/classifyFree/subject4Bg.png"
        ></image>
        <image mode="widthFix" class="goArrow top-item-img2" :src="goArrow" />
        <text class="top-item-text">科目四体验</text>
      </view>
    </view>
    <view class="bottom">
        <image src="https://ndata.zzxcx.net/wxapp/static/imgs/classifyFree/bottomBg.png"></image>
    </view>
  </view>
</template>

<script>
import goArrow from "@/assets/img/goArrow.png";
import utils from '@/utils/index'
export default {
  data() {
    return {
      goArrow,
      query:{

      }
    };
  },
  onLoad(query){
      this.query = query

  },
  methods: {
    goExerciseFree(subject){
        uni.navigateTo({
            url:"/otherPages/exerciseFree/index?"+utils.mapToUrlQuery(this.query)
        })
    }
  },
};
</script>

<style lang="scss" scoped>
.goArrow {
  width: 146rpx;
}
.mb30{
    margin-bottom: 30rpx;
}
.box{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100vh;
}
.top {
  width: 100%;
  padding: 0 30rpx;
  .top-item {
    width: 100%;
    height: 332rpx;
    position: relative;
    .top-item-text {
      font-size: 50rpx;
      color: white;
      position: absolute;
      left: 40rpx;
      top: 38rpx;
    }
    .top-item-img1 {
      width: 100%;
      height: 332rpx;
    }
    .top-item-img2 {
      top: 236rpx;
      position: absolute;
      left: 40rpx;
    }
  }
}
.bottom{
    width: 100%;
    display: flex;
    image{
        width: 100%;
        height: 588rpx;
    }
}
</style>