info.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <template>
  2. <view class="container">
  3. <view v-if="queryForm.student_id<=0" class="search w100 h100 flex-center-center">
  4. <view class="btn btn-primary" @click="search">扫码</view>
  5. <view class="btn btn-primary" @click="toSelect">手动选择</view>
  6. </view>
  7. <view v-if="queryForm.student_id>0" class="w100 h100 dis-flex">
  8. <view class="window w40 flex-center-center flex-dir-column">
  9. <uv-image/>
  10. <view class="">{{ pD.title }}</view>
  11. </view>
  12. <view class="w60 h100 dis-flex flex-x-center flex-dir-column">
  13. <view :class="{action:pD.select === 0}" class="info-item">
  14. <view class="info-item-label">视力</view>
  15. <view class="">
  16. <view class="btn btn-primary">进入视力</view>
  17. </view>
  18. </view>
  19. <view :class="{action:pD.select === 1}" class="info-item">
  20. <view class="info-item-label">体重/身高</view>
  21. <view class="">
  22. {{}}
  23. <view class="btn btn-primary">进入体重/身高</view>
  24. </view>
  25. </view>
  26. <view class="info-item">
  27. <view class="btn btn-primary">下一个</view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script setup>
  34. import {reactive} from "vue";
  35. import {navTo} from "@/utils/app";
  36. const pD = reactive({
  37. title: '学生未激活',
  38. select: 0,
  39. selectMax: 1,
  40. })
  41. const queryForm = reactive({
  42. student_id: 0,
  43. })
  44. const search = () => {
  45. queryForm.student_id = 2260
  46. }
  47. const selectHandle = (type) => {
  48. if (type === 'up') {
  49. type--
  50. if (type < 0) type = 0
  51. } else {
  52. type++
  53. if (type > pD.selectMax) type = 0
  54. }
  55. }
  56. const toSelect = () => {
  57. navTo('pages/classes/select')
  58. }
  59. </script>
  60. <style lang="scss" scoped>
  61. .container {
  62. width: 100vw;
  63. height: 100vh;
  64. max-width: 100vw;
  65. max-height: 100vh;
  66. overflow: hidden;
  67. }
  68. .info-item {
  69. display: flex;
  70. align-items: center;
  71. margin-bottom: 30rpx;
  72. &-label {
  73. margin-right: 50rpx;
  74. }
  75. }
  76. </style>