initiation.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="apple-mobile-web-app-capable" content="yes">
  7. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  8. <meta name="format-detection" content="telephone=no">
  9. <meta name="mobile-web-app-capable" content="yes">
  10. <meta name="msapplication-tap-highlight" content="no">
  11. <meta name="fragment" content="!">
  12. <meta name="viewport"
  13. content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, viewport-fit=cover">
  14. <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
  15. <meta http-equiv="Pragma" content="no-cache" />
  16. <meta http-equiv="Expires" content="0" />
  17. <meta http-equiv="Cache" content="no-cache">
  18. <meta name="description" content="">
  19. <link rel="icon" href="../favicon.ico">
  20. <title>乐团启蒙调查</title>
  21. <!-- 引入样式文件 -->
  22. <link rel="stylesheet" href="./js/vant-index.css" />
  23. <link rel="stylesheet" href="./css/initiation.css">
  24. <script src="./js/flexible.js"></script>
  25. </head>
  26. <body>
  27. <style>
  28. .m-toast {
  29. position: fixed;
  30. top: 50%;
  31. left: 50%;
  32. display: -webkit-box;
  33. display: -webkit-flex;
  34. display: flex;
  35. -webkit-box-orient: vertical;
  36. -webkit-box-direction: normal;
  37. -webkit-flex-direction: column;
  38. flex-direction: column;
  39. -webkit-box-align: center;
  40. -webkit-align-items: center;
  41. align-items: center;
  42. -webkit-box-pack: center;
  43. -webkit-justify-content: center;
  44. justify-content: center;
  45. box-sizing: content-box;
  46. width: 88px;
  47. max-width: 70%;
  48. min-height: 88px;
  49. padding: 16px;
  50. color: #fff;
  51. font-size: 14px;
  52. line-height: 20px;
  53. white-space: pre-wrap;
  54. text-align: center;
  55. word-wrap: break-word;
  56. background-color: rgba(50, 50, 51, 0.88);
  57. border-radius: 4px;
  58. -webkit-transform: translate3d(-50%, -50%, 0);
  59. transform: translate3d(-50%, -50%, 0);
  60. z-index: 2002
  61. }
  62. .m-loading {
  63. position: relative;
  64. color: #fff;
  65. font-size: 0;
  66. vertical-align: middle;
  67. padding: 4px
  68. }
  69. .m-loading__spinner {
  70. position: relative;
  71. display: inline-block;
  72. width: 30px;
  73. max-width: 100%;
  74. height: 30px;
  75. max-height: 100%;
  76. vertical-align: middle;
  77. -webkit-animation: m-rotate .8s linear infinite;
  78. animation: m-rotate .8s linear infinite
  79. }
  80. .m-loading__spinner--circular {
  81. -webkit-animation-duration: 2s;
  82. animation-duration: 2s
  83. }
  84. .m-loading__circular {
  85. display: block;
  86. width: 100%;
  87. height: 100%
  88. }
  89. .m-loading__circular circle {
  90. -webkit-animation: m-circular 1.5s ease-in-out infinite;
  91. animation: m-circular 1.5s ease-in-out infinite;
  92. stroke: currentColor;
  93. stroke-width: 3;
  94. stroke-linecap: round
  95. }
  96. .m-loading__text {
  97. display: inline-block;
  98. margin-left: 8px;
  99. color: #969799;
  100. font-size: 14px;
  101. vertical-align: middle
  102. }
  103. .m-loading--vertical {
  104. display: -webkit-box;
  105. display: -webkit-flex;
  106. display: flex;
  107. -webkit-box-orient: vertical;
  108. -webkit-box-direction: normal;
  109. -webkit-flex-direction: column;
  110. flex-direction: column;
  111. -webkit-box-align: center;
  112. -webkit-align-items: center;
  113. align-items: center
  114. }
  115. .m-loading--vertical .m-loading__text {
  116. margin: 8px 0 0
  117. }
  118. @-webkit-keyframes m-circular {
  119. 0% {
  120. stroke-dasharray: 1, 200;
  121. stroke-dashoffset: 0
  122. }
  123. 50% {
  124. stroke-dasharray: 90, 150;
  125. stroke-dashoffset: -40
  126. }
  127. 100% {
  128. stroke-dasharray: 90, 150;
  129. stroke-dashoffset: -120
  130. }
  131. }
  132. @keyframes m-circular {
  133. 0% {
  134. stroke-dasharray: 1, 200;
  135. stroke-dashoffset: 0
  136. }
  137. 50% {
  138. stroke-dasharray: 90, 150;
  139. stroke-dashoffset: -40
  140. }
  141. 100% {
  142. stroke-dasharray: 90, 150;
  143. stroke-dashoffset: -120
  144. }
  145. }
  146. .m-toast__text {
  147. margin-top: 8px
  148. }
  149. .van-field--error .van-field__control,
  150. .van-field--error .van-field__control::placeholder {
  151. color: #c8c9cc;
  152. -webkit-text-fill-color: currentColor;
  153. }
  154. </style>
  155. <div id="m_loading" class="m-toast m-toast--middle m-toast--loading" style="z-index: 2001;">
  156. <div class="m-loading m-loading--circular m-toast__loading"><span
  157. class="m-loading__spinner m-loading__spinner--circular"><svg viewBox="25 25 50 50" class="m-loading__circular">
  158. <circle cx="50" cy="50" r="20" fill="none"></circle>
  159. </svg></span></div>
  160. <div class="m-toast__text">加载中...</div>
  161. </div>
  162. <div id="app">
  163. <!-- <div class="banner">
  164. <img src="./images/initiation/banner.png" alt="">
  165. </div> -->
  166. <div class="title" v-clock v-html="(orchestraName || '') + '启蒙登记表'">
  167. </div>
  168. <van-form validate-first scroll-to-error @submit="onSubmit" ref='form' class="form">
  169. <div class="top-tips">科学的教育与关爱,足以改变世界。我们希望,学员的未来会因您和我们的共同努力而更加光辉灿烂!</div>
  170. <van-cell-group inset class="cell-group">
  171. <van-field label="学员姓名" :rules="[{ validator, message }]" name="username" v-model="stu.username"
  172. placeholder="请填写学员真实姓名" autocomplete="off"></van-field>
  173. <!-- <van-field label="性别" name="sex" :rules="[{ required: true, message: '请选择性别' }]">
  174. <template #input>
  175. <van-radio-group v-model="stu.sex" checked-color="#FF8057" direction="horizontal">
  176. <van-tag size="large" type="primary" :color="!(stu.sex === 1) ? '#EAEAEA' : '#FF8057'"
  177. :text-color="!(stu.sex === 1) ? '#AAA' : '#FFF'" class="radioSection" round>
  178. <van-radio class="radioItem" :name="1"></van-radio>男生
  179. </van-tag>
  180. <van-tag size="large" type="primary" :color="!(stu.sex === 0) ? '#EAEAEA' : '#FF8057'"
  181. :text-color="!(stu.sex === 0) ? '#AAA' : '#FFF'" class="radioSection" round>
  182. <van-radio class="radioItem" :name="0"></van-radio>女生
  183. </van-tag>
  184. </van-radio-group>
  185. </template>
  186. </van-field> -->
  187. <van-field label="在读年级" v-model="stu.currentGrade" readonly name="currentGrade"
  188. :rules="[{ required: true, message: '请选择在读年级', trigger: 'onChange' }]" @click="() => showPicker = true"
  189. placeholder="请选择在读年级">
  190. <template #right-icon>
  191. <van-icon name="arrow" :color="'#323233'" size="16"></van-icon>
  192. </template>
  193. </van-field>
  194. <van-field v-show="false" v-model="stu.currentGradeNum" name="currentGradeNum" readonly></van-field>
  195. <van-field label="所在班级" v-model="stu.currentClass" readonly name="currentClass"
  196. :rules="[{ required: true, message: '请选择所在班级', trigger: 'onChange' }]" @click="() => classPicker = true"
  197. placeholder="请选择所在班级">
  198. <template #right-icon>
  199. <van-icon name="arrow" :color="'#323233'" size="16"></van-icon>
  200. </template>
  201. </van-field>
  202. <van-field label="您是否有意向让孩子加入学校乐团?" name="musicalInstrumentsLearning"
  203. :rules="[{ required: true, message: '请选择您的意向' }]">
  204. <template #input>
  205. <van-radio-group v-model="stu.joinOrchestra" checked-color="#FF8057" direction="horizontal">
  206. <van-tag size="large" type="primary" :color="!(stu.joinOrchestra === 1) ? '#EAEAEA' : '#FF8057'"
  207. :text-color="!(stu.joinOrchestra === 1) ? '#AAA' : '#FFF'" class="radioSection" round>
  208. <van-radio class="radioItem" :name="1"></van-radio>有意向
  209. </van-tag>
  210. <van-tag size="large" type="primary" :color="!(stu.joinOrchestra === 0) ? '#EAEAEA' : '#FF8057'"
  211. :text-color="!(stu.joinOrchestra === 0) ? '#AAA' : '#FFF'" class="radioSection"
  212. @click="() => stu.learningSubjectName = ''" round>
  213. <van-radio class="radioItem" :name="0"></van-radio>无意向
  214. </van-tag>
  215. </van-radio-group>
  216. </template>
  217. </van-field>
  218. <van-field label="孩子是否有学习过乐器" v-if="stu.joinOrchestra==1" name="learningSubjectName"
  219. v-model="stu.learningSubjectName" placeholder="(非必填)请输入所学乐器"></van-field>
  220. <van-field label="您是否有意向参与线上家长会了解相关情况" name="joinParentMeeting" v-if="stu.joinOrchestra==1"
  221. :rules="[{ required: true, message: '请选择您是否有意向参与线上家长会了解相关情况' }]">
  222. <template #input>
  223. <van-radio-group v-model="stu.joinParentMeeting" checked-color="#FF8057" direction="horizontal">
  224. <van-tag size="large" type="primary" :color="!(stu.joinParentMeeting === 1) ? '#EAEAEA' : '#FF8057'"
  225. :text-color="!(stu.joinParentMeeting === 1) ? '#AAA' : '#FFF'" class="radioSection" round>
  226. <van-radio class="radioItem" :name="1"></van-radio>有意向
  227. </van-tag>
  228. <van-tag size="large" type="primary" :color="!(stu.joinParentMeeting === 0) ? '#EAEAEA' : '#FF8057'"
  229. :text-color="!(stu.joinParentMeeting === 0) ? '#AAA' : '#FFF'" class="radioSection" round>
  230. <van-radio class="radioItem" :name="0"></van-radio>无意向
  231. </van-tag>
  232. </van-radio-group>
  233. </template>
  234. </van-field>
  235. <!-- <van-field :border="true" label="您对校管乐团的组建有什么建议" type="textarea" rows="3" name="personalSuggestion"
  236. v-model="stu.personalSuggestion" placeholder="(非必填)请填写您的建议内容">
  237. </van-field> -->
  238. <van-field type="tel" v-if="stu.joinOrchestra==1" maxlength="11" minlength="11" label="联系电话(直接监护人)"
  239. v-model="stu.phone" name="phone" :rules="[{ pattern, message: '输入监护人手机号码有误' }]" placeholder="请输入监护人手机号码">
  240. </van-field>
  241. </van-cell-group>
  242. <van-button size="large" block round class="btn-submit" color="#FF8057" :loading="btnLoading"
  243. native-type="submit">提交</van-button>
  244. </van-form>
  245. <van-popup v-model:show="showPicker" position="bottom" round>
  246. <van-picker show-toolbar :columns="currentGrade" @cancel="showPicker = false" @confirm="onConfirm" />
  247. </van-popup>
  248. <van-popup v-model:show="classPicker" position="bottom" round>
  249. <van-picker show-toolbar :columns="classList" @cancel="classPicker = false" @confirm="onConfirmClass" />
  250. </van-popup>
  251. <van-popup v-model:show="submitStatus" round
  252. style="width: 100%;background-color: transparent;transform: translateY(-60%);" :close-on-click-overlay="false">
  253. <div class="submit-container">
  254. <p class="submit-title">提交成功</p>
  255. <p class="submit-tips">您已完成乐团启蒙调查</p>
  256. <div @click="onLinkUrl" class="submit-btn"></div>
  257. </div>
  258. </van-popup>
  259. <van-popup v-model:show="showPopup" round style="width: 88%" :close-on-click-overlay="false" class="wxPopupDialog">
  260. <div class="popupContainer">
  261. <p class="title1">温馨提示</p>
  262. <p class="popupTips">请使用微信打开</p>
  263. </div>
  264. </van-popup>
  265. </div>
  266. <!-- 引入 Vue 和 Vant 的 JS 文件 -->
  267. <script src="./js/vue.global.min.js"></script>
  268. <script src="./js/vant.min.js"></script>
  269. <script src="./js/axios.js"></script>
  270. <script type="text/javascript" src="./js/utils.js"></script>
  271. <script>
  272. // 乐团交付,乐团停止或关闭,有新的交付团;则不允许报名
  273. var classList = []
  274. for (var i = 1; i <= 40; i++) {
  275. classList.push({ text: i + '班', value: i })
  276. }
  277. var app = Vue.createApp({
  278. data() {
  279. return {
  280. orchestraId: getQueryVariable('orchestraId'),
  281. orchestraName: null,
  282. schoolId: null,
  283. showPicker: false,
  284. classPicker: false,
  285. submitStatus: false,
  286. pattern: /^((13[0-9])|(14(0|[5-7]|9))|(15([0-3]|[5-9]))|(16(2|[5-7]))|(17[0-8])|(18[0-9])|(19([0-3]|[5-9])))\d{8}$/,
  287. nameReg: /^[\u4E00-\u9FA5]+$/,
  288. currentGrade: [
  289. { text: '一年级', value: 1 },
  290. { text: '二年级', value: 2 },
  291. { text: '三年级', value: 3 },
  292. { text: '四年级', value: 4 },
  293. { text: '五年级', value: 5 },
  294. { text: '六年级', value: 6 },
  295. { text: '七年级', value: 7 },
  296. { text: '八年级', value: 8 },
  297. { text: '九年级', value: 9 }
  298. ], // 年级数组列表
  299. classList: classList,
  300. columns: [],
  301. pickerType: null, // 下拉类型
  302. stu: {
  303. username: null, // 姓名
  304. // sex: 1, // 性别
  305. phone: null, // 电话
  306. currentGrade: '', // 年级
  307. currentGradeNum: null, // 年级编号
  308. currentClass: '', // 班级
  309. currentClassNum: null, // 年级编号
  310. learningSubjectName: null,
  311. joinOrchestra: null, //
  312. personalSuggestion: null, // 个人建议
  313. joinParentMeeting: null
  314. },
  315. btnLoading: false,
  316. checkPhone: true,
  317. showPopup: false,
  318. code: '',
  319. canSignUp: '',
  320. }
  321. },
  322. async mounted() {
  323. if (document.querySelector('#m_loading')) {
  324. document.querySelector('#m_loading').remove()
  325. }
  326. // 重置数据
  327. this.stu = {
  328. username: null, // 姓名
  329. // sex: 1, // 性别
  330. phone: null, // 电话
  331. currentGrade: '', // 年级
  332. currentGradeNum: null, // 年级编号
  333. currentClass: '', // 班级
  334. currentClassNum: null, // 年级编号
  335. learningSubjectName: null,
  336. joinOrchestra: null, //
  337. personalSuggestion: null, // 个人建议
  338. joinParentMeeting: null
  339. }
  340. // 判断是否是微信,只能微信中打开
  341. if (!browser().weixin) {
  342. this.showPopup = true
  343. return
  344. } else {
  345. //授权
  346. const code = getUrlCode()
  347. console.log(code)
  348. if (!code) {
  349. this.getAppIdAndCode(window.location.href)
  350. return
  351. } else {
  352. this.code = code
  353. }
  354. }
  355. if (!this.orchestraId) {
  356. vant.showToast('信息获取失败,请联系老师')
  357. }
  358. try {
  359. this.setLoading(true)
  360. var schoolDetail = await axios.post('/api-student/open/school/detail', {
  361. orchestraId: this.orchestraId
  362. })
  363. if (schoolDetail.data.code === 200 && schoolDetail.data.data) {
  364. var schoolSystem = schoolDetail.data.data.schoolSystem || 'sixYearSystem'
  365. this.schoolId = schoolDetail.data.data.id
  366. // if (schoolSystem === 'sixYearSystem') {
  367. // this.currentGrade.push({ text: '六年级', value: 6 }, { text: '初一', value: 7 }, { text: '初二', value: 8 }, { text: '初三', value: 9 })
  368. // } else {
  369. // this.currentGrade.push({ text: '初一', value: 6 }, { text: '初二', value: 7 }, { text: '初三', value: 8 }, { text: '初四', value: 9 })
  370. // }
  371. }
  372. var orchestraDetail = await axios.get('/api-student/open/orchestra/detail/' + this.orchestraId)
  373. if (orchestraDetail.data.code === 200 && orchestraDetail.data.data) {
  374. this.orchestraName = orchestraDetail.data.data.name || ''
  375. this.canSignUp = orchestraDetail.data.data.status
  376. if (orchestraDetail.data.data.status !== 'INITIATION_SURVEY') {
  377. vant.showToast('乐团启蒙阶段已结束')
  378. return
  379. }
  380. }
  381. } catch {
  382. vant.showDialog({
  383. message: '信息获取失败,请联系老师',
  384. theme: 'round-button',
  385. confirmButtonColor: '#FF8057'
  386. })
  387. }
  388. this.setLoading(false)
  389. },
  390. methods: {
  391. async getAppIdAndCode(url) {
  392. try {
  393. var res = await axios.get('/api-school/open/paramConfig/wechatAppId')
  394. // 判断是否有微信appId
  395. if (res.data.code === 200 && res.data.data) {
  396. vant.closeToast()
  397. if (/online.lexiaoya/.test(location.href)) {
  398. this.goAuth(res.data.data, url)
  399. } else {
  400. this.goTestAuth(res.data.data, url)
  401. }
  402. }
  403. } catch {
  404. //
  405. }
  406. },
  407. goTestAuth(wxAppId, urlString) {
  408. const replaceUrl =
  409. `https://online.lexiaoya.cn/getWxCode?appid=${wxAppId || 'wx8654c671631cfade'}&state=STATE&redirect_uri=` +
  410. encodeURIComponent(urlString || window.location.href)
  411. window.location.replace(replaceUrl)
  412. },
  413. goAuth(wxAppId, urlString) {
  414. // 用户授权
  415. console.log(urlString || window.location.href, 'urlString || window.location.href')
  416. const urlNow = encodeURIComponent(urlString || window.location.href)
  417. console.log(urlNow, 'urlNow')
  418. const scope = 'snsapi_base' //snsapi_userinfo //静默授权 用户无感知
  419. const appid = wxAppId || 'wx8654c671631cfade'
  420. const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${urlNow}&response_type=code&scope=${scope}&state=STATE&connect_redirect=1#wechat_redirect`
  421. window.location.replace(url)
  422. },
  423. onLinkUrl() {
  424. this.submitStatus = false
  425. window.location.href = window.location.origin + '/orchestra-student/#/download'
  426. },
  427. // async checkchangePhone(val) {
  428. // try {
  429. // await this.$refs.form.validate('phone')
  430. // this.checkPhone = false
  431. // // 查询老数据
  432. // let tempValues = {}
  433. // this.setLoading(true)
  434. // tempValues.orchestraId = this.orchestraId
  435. // tempValues.phone = this.stu.phone
  436. // var user = await axios.get('/api-student/open/orchestraInitiationSurvey/detailByPhone', {
  437. // params: {
  438. // ...tempValues
  439. // }
  440. // })
  441. // console.log(user.data.code)
  442. // if (user.data.code === 200 && user.data.data) {
  443. // var detail = user.data.data
  444. // console.log(detail, 'detail')
  445. // var grade = this.currentGrade.find(item => item.value == detail.currentGrade)
  446. // var cls = this.classList.find(item => item.value == detail.currentClass)
  447. // this.stu = {
  448. // username: detail.username, // 姓名
  449. // sex: detail.sex ? 1 : 0, // 性别
  450. // phone: detail.phone, // 电话
  451. // currentGrade: grade.text, // 年级
  452. // currentGradeNum: detail.currentGrade, // 年级编号
  453. // currentClass: cls.text, // 班级
  454. // currentClassNum: detail.currentClass, // 年级编号
  455. // learningSubjectName: detail.learningSubjectName,
  456. // joinOrchestra: detail.joinOrchestra ? 1 : 0, // 是否有学习经验
  457. // personalSuggestion: detail.personalSuggestion, // 个人建议
  458. // joinParentMeeting: detail.joinParentMeeting ? 1 : 0
  459. // }
  460. // }
  461. // } catch { }
  462. // this.setLoading(false)
  463. // },
  464. validator(val) {
  465. // 校验函数返回 true 表示校验通过,false 表示不通过
  466. return this.nameReg.test(val) && (val.length >= 2 && val.length <= 15);
  467. },
  468. message(value) {
  469. if (!value) {
  470. return '请填写学员真实姓名'
  471. } else if (!this.nameReg.test(value)) {
  472. return '学员姓名必须为中文'
  473. } else if (value.length < 2 || value.length > 15) {
  474. return '学员姓名必须为2~15个字'
  475. }
  476. },
  477. async onSubmit() {
  478. if (this.canSignUp !== 'INITIATION_SURVEY') {
  479. vant.showToast('乐团启蒙阶段已结束')
  480. return
  481. }
  482. this.btnLoading = true
  483. try {
  484. var stu = this.stu
  485. // 无意向
  486. if (stu.joinOrchestra == 0) {
  487. stu.learningSubjectName = null
  488. stu.joinParentMeeting = null
  489. stu.phone = null
  490. }
  491. var res = await axios.post('/api-student/open/orchestraInitiationSurvey/save', {
  492. orchestraId: this.orchestraId,
  493. schoolId: this.schoolId,
  494. ...stu,
  495. currentClass: stu.currentClassNum,
  496. currentGrade: stu.currentGradeNum,
  497. code: this.code,
  498. })
  499. console.log(res)
  500. if (res.data.code === 200) {
  501. this.submitStatus = true
  502. // window.location.href =
  503. // 'https://mp.weixin.qq.com/s?__biz=MzkxMDMwOTI5Nw==&mid=2247485261&idx=1&sn=70c79a832a609bf9fae01c9e90fb4f69&chksm=c12c2593f65bac85d26362bca470f6abc2bfc087d9f4dcf87c00094420bdf5a3acb1b870199b#rd'
  504. } else {
  505. vant.showToast(res.data.message)
  506. }
  507. } catch {
  508. vant.showToast('保存失败,请重试')
  509. }
  510. this.btnLoading = false
  511. },
  512. setLoading(status) {
  513. if (status) {
  514. vant.showLoadingToast({
  515. duration: 0, // 持续展示 toast
  516. message: '加载中...',
  517. forbidClick: true,
  518. loadingType: 'spinner',
  519. })
  520. } else {
  521. vant.closeToast()
  522. }
  523. },
  524. onConfirm(options) {
  525. var stu = this.stu
  526. stu.currentGrade = options.selectedOptions[0].text
  527. stu.currentGradeNum = options.selectedOptions[0].value
  528. this.showPicker = false
  529. },
  530. onConfirmClass(options) {
  531. var stu = this.stu
  532. stu.currentClass = options.selectedOptions[0].text
  533. stu.currentClassNum = options.selectedOptions[0].value
  534. this.classPicker = false
  535. }
  536. }
  537. })
  538. app.use(vant)
  539. app.mount('#app')
  540. </script>
  541. </body>
  542. </html>