<template>
  <view class="container">
    <view v-if="queryForm.student_id<=0" class="search w100 h100 flex-center-center">
      <view class="btn btn-primary" @click="search">扫码</view>
      <view class="btn btn-primary" @click="toSelect">手动选择</view>
    </view>
    <view v-if="queryForm.student_id>0" class="w100 h100 dis-flex">
      <view class="window w40 flex-center-center flex-dir-column">
        <uv-image/>
        <view class="">{{ pD.title }}</view>
      </view>
      <view class="w60 h100 dis-flex flex-x-center flex-dir-column">
        <view :class="{action:pD.select === 0}" class="info-item">
          <view class="info-item-label">视力</view>
          <view class="">
            <view class="btn btn-primary">进入视力</view>
          </view>
        </view>
        <view :class="{action:pD.select === 1}" class="info-item">
          <view class="info-item-label">体重/身高</view>
          <view class="">
            {{}}
            <view class="btn btn-primary">进入体重/身高</view>
          </view>
        </view>
        <view class="info-item">
          <view class="btn btn-primary">下一个</view>
        </view>
      </view>
    </view>
  </view>
</template>

<script setup>
import {reactive} from "vue";
import {navTo} from "@/utils/app";

const pD = reactive({
  title: '学生未激活',
  select: 0,
  selectMax: 1,
})
const queryForm = reactive({
  student_id: 0,
})
const search = () => {
  queryForm.student_id = 2260
}
const selectHandle = (type) => {
  if (type === 'up') {
    type--
    if (type < 0) type = 0
  } else {
    type++
    if (type > pD.selectMax) type = 0
  }
}
const toSelect = () => {
  navTo('pages/classes/select')
}
</script>

<style lang="scss" scoped>
.container {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  overflow: hidden;
}

.info-item {
  display: flex;
  align-items: center;
  margin-bottom: 30rpx;

  &-label {
    margin-right: 50rpx;
  }
}
</style>
