zsjyYubaoming.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <template>
  2. <view class="dljt-page-box zsjy-page">
  3. <MtaNavbar></MtaNavbar>
  4. <view class="dljt-container-box">
  5. <view class="dljt-page-title">招生就业</view>
  6. <view class="dljt-page-content-box">
  7. <view class="dljt-breadcrumb-box">
  8. <view class="breadcrumb-text" @click="handleGo()">首页</view>
  9. <icon class="breadcrumb-jt"></icon>
  10. <view class="breadcrumb-text">招生就业</view>
  11. <icon class="breadcrumb-jt"></icon>
  12. <view class="breadcrumb-active">预报名</view>
  13. </view>
  14. <view>
  15. <form @submit="formSubmit" class="dljt-form-box">
  16. <view class="dljt-input-row require-row">
  17. <view class="input-title">姓名</view>
  18. <input class="form-input" name="input" v-model="formData.name" placeholder="请输入姓名" />
  19. </view>
  20. <view class="dljt-input-row require-row">
  21. <view class="input-title">身份证号</view>
  22. <input class="form-input" name="input" v-model="formData.name" placeholder="请输入身份证号" />
  23. </view>
  24. <view class="dljt-input-row require-row">
  25. <view class="input-title">预报专业</view>
  26. <uni-data-select class="form-select" v-model="formData.zhuanye" :localdata="range"
  27. @change="change" placeholder="请选择预报专业"></uni-data-select>
  28. </view>
  29. <view class="dljt-input-row require-row">
  30. <view class="input-title">联系电话</view>
  31. <input class="form-input" name="input" v-model="formData.dianhua" placeholder="请输入联系电话" />
  32. </view>
  33. <view class="dljt-input-row">
  34. <view class="input-title">初中毕业学校</view>
  35. <input class="form-input" name="input" v-model="formData.xuexiao" placeholder="请输入初中毕业学校" />
  36. </view>
  37. <view class="dljt-input-row">
  38. <view class="input-title">模拟考试分数</view>
  39. <input class="form-input" name="input" v-model="formData.fenshu" placeholder="请输入模拟考试分数" />
  40. </view>
  41. <view class="dljt-input-row">
  42. <view class="input-title">身高</view>
  43. <input class="form-input" name="input" v-model="formData.shengao" placeholder="请输入身高" />
  44. </view>
  45. <view class="dljt-input-row">
  46. <view class="input-title">体重</view>
  47. <input class="form-input" name="input" v-model="formData.tizhong" placeholder="请输入体重" />
  48. </view>
  49. <view class="dljt-input-row">
  50. <button class="form-btn-box" form-type="submit">确认报名</button>
  51. </view>
  52. </form>
  53. </view>
  54. </view>
  55. <!-- 底部导航 -->
  56. <MtaFooter></MtaFooter>
  57. </view>
  58. </view>
  59. </template>
  60. <script setup>
  61. import {
  62. ref,
  63. reactive
  64. } from "vue";
  65. import {
  66. onLoad
  67. } from "@dcloudio/uni-app"
  68. import * as httpApi from "@/api/common.js"
  69. import MtaScrollViewVue from "@/components/MtaScrollView/MtaScrollView.vue";
  70. import {
  71. formatDateToYearMonthDay,
  72. getStringByHtml3
  73. } from "@/utils/common.js"
  74. import MtaFooter from "@/components/MtaFooter.vue"
  75. import default1 from '@/static/images/common/news-bj1.jpg'
  76. const range = ref([])
  77. const formData = reactive({
  78. name: '',
  79. idcard: '',
  80. fenshu: '',
  81. dianhua: '',
  82. shengao: '',
  83. tizhong: '',
  84. xuexiao: '',
  85. zhuanye: '',
  86. })
  87. function formSubmit() {
  88. if (!formData.name) {
  89. uni.showToast({
  90. title: '请输入姓名'
  91. })
  92. return;
  93. }
  94. if (!formData.idcard) {
  95. uni.showToast({
  96. title: '请输入身份证号'
  97. })
  98. return;
  99. }
  100. if (!formData.zhuanye) {
  101. uni.showToast({
  102. title: '请选择预报专业'
  103. })
  104. return;
  105. }
  106. if (!formData.dianhua) {
  107. uni.showToast({
  108. title: '请输入联系电话'
  109. })
  110. return;
  111. }
  112. httpApi.getCommonYubaoming(formData).then(res => {
  113. if (res.data) {
  114. uni.showToast({
  115. title: '报名成功!'
  116. })
  117. }
  118. })
  119. }
  120. function handleClick(data) {
  121. uni.navigateTo({
  122. url: `/pages/dqgzXueyuanfengcaiInfo/dqgzXueyuanfengcaiInfo?id=${data.id}`
  123. })
  124. }
  125. function getList(data) {
  126. return httpApi.getDangjianFengcaiList(data)
  127. }
  128. function handleGo() {
  129. uni.navigateTo({
  130. url: '/pages/index/index'
  131. })
  132. }
  133. function pageInit() {
  134. httpApi.getCommonYubaomingZhuanyeList().then(res => {
  135. range.value = res.data.map(item => {
  136. return {
  137. value: item,
  138. text: item
  139. }
  140. });
  141. })
  142. }
  143. onLoad(() => {
  144. pageInit();
  145. })
  146. </script>
  147. <style>
  148. </style>