companion-teacher-register.tsx 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826
  1. import { areas } from '@/helpers/area'
  2. import request from '@/helpers/request'
  3. import {
  4. CellGroup,
  5. Form,
  6. Field,
  7. RadioGroup,
  8. Tag,
  9. Icon,
  10. Checkbox,
  11. Radio,
  12. Button,
  13. showToast,
  14. showDialog,
  15. showLoadingToast,
  16. closeToast,
  17. Picker,
  18. Popup,
  19. CountDown,
  20. CheckboxGroup,
  21. Sticky
  22. } from 'vant'
  23. import { defineComponent, onMounted, reactive, ref } from 'vue'
  24. import { useRoute } from 'vue-router'
  25. import styles from './companion-teacher-register.module.less'
  26. import ImgCode from '@/components/o-img-code'
  27. import schoolLogo from './images/school-logo.png'
  28. import iconClose from './images/icon-close.png'
  29. import topBanner1 from './images/top-banner1.png'
  30. import { checkPhone } from '@/helpers/validate'
  31. import OUpload from '@/components/o-upload'
  32. import router from '@/router'
  33. import dayjs from 'dayjs'
  34. import { browser, getUrlCode } from '@/helpers/utils'
  35. import qs from 'query-string'
  36. export default defineComponent({
  37. name: 'companion-teacher-register',
  38. setup() {
  39. const route = useRoute()
  40. const state = reactive({
  41. showPicker: false,
  42. showSubject: false,
  43. submitStatus: false,
  44. showEducation: false,
  45. checkPhone: true,
  46. id: route.query.id,
  47. name: route.query.name,
  48. t: route.query.t as any, // 过期时间
  49. qrCodeStatus: false, // 二维码是否失效
  50. qrCodeMessage: '',
  51. pattern: /^1(3|4|5|6|7|8|9)\d{9}$/,
  52. columns: [] as any,
  53. pickerType: null, // 下拉类型
  54. popupSelectSubjects: [] as any,
  55. selectSubjects: [] as any, // 选中的声部
  56. forms: {
  57. realName: '',
  58. phone: null,
  59. gender: 1,
  60. idCardNo: null,
  61. cityCode: null,
  62. cityCodeName: '',
  63. provinceCode: null,
  64. showSubjectIds: '',
  65. subjectIds: [],
  66. smsValidCode: '',
  67. educationBackground: '', // 学历
  68. graduateSchool: null, // 毕业学校
  69. idcardFrontImg: '',
  70. idcardBackImg: '' // 身份证反面照
  71. },
  72. btnLoading: false,
  73. checked: true,
  74. columnSubject: [] as any,
  75. countDownStatus: true, // 是否发送验证码
  76. countDownTime: 120, // 倒计时时间
  77. countDownRef: null as any, // 倒计时实例
  78. imgCodeStatus: false,
  79. showPopup: false,
  80. code: '' // 授权码
  81. })
  82. const onSubmit = async () => {
  83. if (state.qrCodeStatus) {
  84. showDialog({
  85. title: '提示',
  86. message: state.qrCodeMessage,
  87. theme: 'round-button',
  88. confirmButtonColor: '#ff8057'
  89. })
  90. return
  91. }
  92. if (!state.checked) {
  93. showToast('请阅读并同意协议')
  94. return
  95. }
  96. state.btnLoading = true
  97. try {
  98. const forms = state.forms
  99. await request.post('/api-school/open/schoolTeacherStudent/registerTeacher', {
  100. data: {
  101. ...forms,
  102. code: state.code,
  103. subjectIds: forms.subjectIds.join(','),
  104. schoolId: state.id
  105. }
  106. })
  107. // state.submitStatus = true
  108. window.location.href =
  109. 'https://mp.weixin.qq.com/s?__biz=MzkxMDMwOTI5Nw==&mid=2247485261&idx=1&sn=70c79a832a609bf9fae01c9e90fb4f69&chksm=c12c2593f65bac85d26362bca470f6abc2bfc087d9f4dcf87c00094420bdf5a3acb1b870199b#rd'
  110. } catch {
  111. // showToast('保存失败,请重试')
  112. }
  113. state.btnLoading = false
  114. }
  115. const onConfirm = (val: any) => {
  116. const selectedOptions = val.selectedOptions[1]
  117. state.forms.cityCode = selectedOptions.code
  118. state.forms.cityCodeName = selectedOptions.name
  119. const selectedFirst = val.selectedOptions[0]
  120. state.forms.provinceCode = selectedFirst.code
  121. state.showPicker = false
  122. }
  123. const onSubjectRemove = (item: any, index: any) => {
  124. console.log(item)
  125. showDialog({
  126. title: '提示',
  127. message: '您是否删除选中的声部',
  128. confirmButtonColor: '#ff8057',
  129. showCancelButton: true
  130. }).then(() => {
  131. state.selectSubjects.splice(index, 1)
  132. const tIndex = state.popupSelectSubjects.findIndex((s: any) => s === item.value)
  133. state.popupSelectSubjects.splice(tIndex, 1)
  134. // const tempSubjectIds: any = []
  135. // state.selectSubjects.forEach((subject: any) => {
  136. // tempSubjectIds.push(subject.value)
  137. // })
  138. state.forms.subjectIds = state.popupSelectSubjects
  139. state.forms.showSubjectIds = state.popupSelectSubjects.join(',')
  140. })
  141. }
  142. // 选择声部
  143. const onConfirmSubject = () => {
  144. const tempSubjects: any = []
  145. state.columnSubject.forEach((item: any) => {
  146. if (state.popupSelectSubjects.includes(item.value)) {
  147. tempSubjects.push(item)
  148. }
  149. })
  150. state.selectSubjects = tempSubjects
  151. state.forms.subjectIds = state.popupSelectSubjects || []
  152. state.forms.showSubjectIds = state.popupSelectSubjects.join(',')
  153. state.showSubject = false
  154. }
  155. // 选择学历
  156. const onConfirmEduction = (val: any) => {
  157. const selectedOptions = val.selectedOptions[0]
  158. state.forms.educationBackground = selectedOptions.value
  159. state.showEducation = false
  160. }
  161. const onSendCode = () => {
  162. // 发送验证码
  163. console.log(state.forms.phone)
  164. if (!checkPhone(state.forms.phone as any)) {
  165. return showToast('请输入正确的手机号码')
  166. }
  167. state.imgCodeStatus = true
  168. }
  169. const onCodeSend = () => {
  170. state.countDownStatus = false
  171. const clearTimer = setInterval(() => {
  172. state.countDownTime = state.countDownTime - 1
  173. if (state.countDownTime <= 0) {
  174. state.countDownTime = 120
  175. state.countDownStatus = true
  176. clearInterval(clearTimer)
  177. }
  178. }, 1000)
  179. }
  180. const onFinished = () => {
  181. state.countDownStatus = true
  182. // ;(this.$refs.countDownRef as any).reset()
  183. }
  184. onMounted(async () => {
  185. if (!state.id) {
  186. showToast('信息获取失败,请联系伴学指导')
  187. }
  188. // 判断是否是微信,只能微信中打开
  189. if (!browser().weixin) {
  190. state.showPopup = true
  191. return
  192. } else {
  193. //授权
  194. const code = getUrlCode()
  195. if (!code) {
  196. const newUrl =
  197. window.location.origin +
  198. window.location.pathname +
  199. '#' +
  200. route.path +
  201. '?' +
  202. qs.stringify({
  203. ...route.query
  204. })
  205. getAppIdAndCode(newUrl)
  206. return
  207. } else {
  208. state.code = code
  209. }
  210. }
  211. // t: route.query.t, // 过期时间
  212. try {
  213. const res = await request.post('/api-school/open/schoolTeacherStudent/queryQrCodeStatus', {
  214. data: {
  215. schoolId: state.id,
  216. qrCodeEffectiveStartTime: state.t
  217. ? dayjs(Number(state.t)).format('YYYY-MM-DD HH:mm:ss')
  218. : null
  219. }
  220. })
  221. if (res.code === 999) {
  222. showDialog({
  223. title: '提示',
  224. message: res.message,
  225. theme: 'round-button',
  226. confirmButtonColor: '#ff8057'
  227. })
  228. state.qrCodeStatus = true
  229. state.qrCodeMessage = res.message
  230. }
  231. } catch (e: any) {
  232. //
  233. console.log(e)
  234. }
  235. try {
  236. const tempareas: any = []
  237. areas.forEach((item) => {
  238. const temp = {
  239. name: item.name,
  240. code: item.code,
  241. areas: [] as any
  242. }
  243. if (item.areas && item.areas.length > 0) {
  244. item.areas.forEach((child) => {
  245. temp.areas.push({
  246. name: child.name,
  247. code: child.code
  248. })
  249. })
  250. }
  251. tempareas.push(temp)
  252. })
  253. state.columns = tempareas || []
  254. const { data } = await request.post('/api-school/open/subjectBasicConfig/page', {
  255. data: {
  256. page: 1,
  257. rows: 50
  258. }
  259. })
  260. const rows = data.rows || []
  261. const tempSubjects: any = []
  262. rows.forEach((item: any) => {
  263. tempSubjects.push({
  264. text: item.subjectName,
  265. value: item.subjectId
  266. })
  267. })
  268. state.columnSubject = tempSubjects
  269. } catch {
  270. showDialog({
  271. message: '信息获取失败,请联系伴学指导',
  272. theme: 'round-button',
  273. confirmButtonColor: '#ff8057'
  274. })
  275. }
  276. })
  277. const onPreview = (type: any) => {
  278. if (type === 'REGISTER') {
  279. window.open(
  280. window.location.origin + window.location.pathname + '#/preview-protocol',
  281. '_blank'
  282. )
  283. } else if (type === 'PRIVACY') {
  284. window.open(
  285. window.location.origin + window.location.pathname + '#/privacyProtocol',
  286. '_blank'
  287. )
  288. } else if (type === 'WITHDRAW') {
  289. //
  290. window.open(window.location.origin + window.location.pathname + '#/cashProtocol', '_blank')
  291. }
  292. }
  293. const formRef = ref()
  294. const checkchangePhone = async () => {
  295. try {
  296. await formRef.value?.validate('phone')
  297. state.checkPhone = false
  298. getTeacherDetails()
  299. } catch {
  300. //
  301. }
  302. }
  303. const getAppIdAndCode = async (url?: string) => {
  304. try {
  305. const { data } = await request.get('/api-school/open/paramConfig/wechatAppId')
  306. // 判断是否有微信appId
  307. if (data) {
  308. closeToast()
  309. goAuth(data, url)
  310. }
  311. } catch {
  312. //
  313. }
  314. }
  315. const goAuth = (wxAppId: string, urlString?: string) => {
  316. // 用户授权
  317. console.log(urlString || window.location.href, 'urlString || window.location.href')
  318. const urlNow = encodeURIComponent(urlString || window.location.href)
  319. console.log(urlNow, 'urlNow')
  320. const scope = 'snsapi_base' //snsapi_userinfo //静默授权 用户无感知
  321. const appid = wxAppId || 'wx8654c671631cfade'
  322. 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`
  323. window.location.replace(url)
  324. }
  325. // 反显数据
  326. const getTeacherDetails = async () => {
  327. try {
  328. if (!state.forms.phone) return
  329. const { data } = await request.post(
  330. '/api-school/open/teacher/detail/' + state.forms.phone,
  331. {
  332. requestType: 'form',
  333. data: {
  334. phone: state.forms.phone
  335. }
  336. }
  337. )
  338. // 判断是否有数据
  339. if (!data) return
  340. const subjects = data.subjectId
  341. ? data.subjectId.split(',').map((subject: any) => Number(subject))
  342. : []
  343. state.popupSelectSubjects = subjects || []
  344. // 显示声部
  345. subjects.forEach((subject: any) => {
  346. const item = state.columnSubject.find((item: any) => item.value === subject)
  347. if (item) {
  348. state.selectSubjects.push(item)
  349. }
  350. })
  351. let cityCodeName = ''
  352. state.columns.forEach((p: any) => {
  353. if (p.areas && p.areas.length > 0) {
  354. p.areas.forEach((c: any) => {
  355. if (c.code === Number(data.cityCode)) {
  356. cityCodeName = c.name
  357. }
  358. })
  359. }
  360. })
  361. state.forms = {
  362. realName: data.realName,
  363. phone: data.phone,
  364. gender: data.gender,
  365. idCardNo: data.idCardNo,
  366. cityCode: data.cityCode,
  367. cityCodeName: cityCodeName,
  368. provinceCode: data.provinceCode,
  369. showSubjectIds: data.subjectId,
  370. subjectIds: subjects as any,
  371. smsValidCode: '',
  372. educationBackground: data.educationBackground || '', // 学历
  373. graduateSchool: data.graduateSchool, // 毕业学校
  374. idcardFrontImg: data.idcardFrontImg || '',
  375. idcardBackImg: data.idcardBackImg || '' // 身份证反面照
  376. }
  377. } catch {
  378. //
  379. }
  380. }
  381. return () => (
  382. <div class={styles.register}>
  383. <div class={styles.title}>
  384. <p class={styles.tips}>
  385. <img src={schoolLogo} />
  386. <span>{state.name}</span>
  387. </p>
  388. </div>
  389. <Form validateFirst scrollToError onSubmit={onSubmit} ref={formRef} class={styles.form}>
  390. <CellGroup inset class={styles['cell-group']}>
  391. <Field
  392. label="手机号码"
  393. v-model={state.forms.phone}
  394. rules={[
  395. { required: true, message: '请输入手机号码' },
  396. { pattern: state.pattern, message: '输入手机号码有误' }
  397. ]}
  398. name="phone"
  399. placeholder="请输入手机号码"
  400. maxlength={11}
  401. onBlur={checkchangePhone}
  402. type="tel"
  403. ></Field>
  404. <div class={styles.phoneTips}>
  405. <Icon name="warning" size="16" />
  406. 提示:手机号将成为您管乐团伴学指导端登录账号
  407. </div>
  408. <Field
  409. label="真实姓名"
  410. v-model={state.forms.realName}
  411. rules={[{ required: true, message: '请填写真实姓名' }]}
  412. name="realName"
  413. placeholder="请填写真实姓名"
  414. maxlength="5"
  415. ></Field>
  416. <Field
  417. label="身份证号码"
  418. v-model={state.forms.idCardNo}
  419. rules={[
  420. { required: true, message: '请输入身份证号' },
  421. {
  422. pattern:
  423. /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
  424. message: '请输入正确的身份证号'
  425. }
  426. ]}
  427. name="idCardNo"
  428. maxlength={18}
  429. placeholder="请输入身份证号码"
  430. ></Field>
  431. <Field label="性别" name="gender" rules={[{ required: true, message: '请选择性别' }]}>
  432. {{
  433. input: () => (
  434. <RadioGroup
  435. checked-color="#FF8057"
  436. v-model={state.forms.gender}
  437. direction="horizontal"
  438. >
  439. <Tag
  440. size="large"
  441. type="primary"
  442. color={!(state.forms.gender === 1) ? '#EAEAEA' : '#FF8057'}
  443. textColor={!(state.forms.gender === 1) ? '#AAA' : '#FFF'}
  444. class={styles.radioSection}
  445. round
  446. >
  447. <Radio class={styles.radioItem} name={1}></Radio>男
  448. </Tag>
  449. <Tag
  450. size="large"
  451. type="primary"
  452. color={!(state.forms.gender === 0) ? '#EAEAEA' : '#FF8057'}
  453. textColor={!(state.forms.gender === 0) ? '#AAA' : '#FFF'}
  454. class={styles.radioSection}
  455. round
  456. >
  457. <Radio class={styles.radioItem} name={0}></Radio>女
  458. </Tag>
  459. </RadioGroup>
  460. )
  461. }}
  462. </Field>
  463. <div class={[styles.fieldGroup, 'van-hairline--bottom']}>
  464. <Field
  465. label="身份证照片正面"
  466. v-model={state.forms.idcardFrontImg}
  467. readonly
  468. border={false}
  469. name="idcardFrontImg"
  470. rules={[{ required: true, message: '请上传身份证正面', trigger: 'onChange' }]}
  471. placeholder="请上传身份证正面"
  472. >
  473. {{
  474. input: () => (
  475. <OUpload
  476. style={{ width: '100%' }}
  477. tips="上传身份证正面"
  478. bucket="gyt"
  479. path="/user/"
  480. v-model:modelValue={state.forms.idcardFrontImg}
  481. />
  482. )
  483. }}
  484. </Field>
  485. <Field
  486. label={'上传身份证反面'}
  487. labelClass={styles.fieldTitle}
  488. v-model={state.forms.idcardBackImg}
  489. readonly
  490. border={false}
  491. name="idcardBackImg"
  492. rules={[{ required: true, message: '请上传身份证反面', trigger: 'onChange' }]}
  493. placeholder="请上传身份证反面"
  494. >
  495. {{
  496. input: () => (
  497. <OUpload
  498. style={{ width: '100%' }}
  499. tips="上传身份证反面"
  500. bucket="gyt"
  501. path="/user/"
  502. v-model:modelValue={state.forms.idcardBackImg}
  503. />
  504. )
  505. }}
  506. </Field>
  507. </div>
  508. <Field
  509. label="学历"
  510. v-model={state.forms.educationBackground}
  511. readonly
  512. name="educationBackground"
  513. onClick={() => {
  514. state.showEducation = true
  515. }}
  516. rules={[{ required: true, message: '请选择学历', trigger: 'onChange' }]}
  517. placeholder="请选择学历"
  518. >
  519. {{
  520. 'right-icon': () => <Icon name="arrow" color={'#323233'} size="16"></Icon>
  521. }}
  522. </Field>
  523. <Field
  524. label="毕业学校"
  525. v-model={state.forms.graduateSchool}
  526. rules={[{ required: true, message: '请输入毕业学校' }]}
  527. name="graduateSchool"
  528. placeholder="请输入毕业学校"
  529. ></Field>
  530. <Field
  531. label="所在城市"
  532. v-model={state.forms.cityCodeName}
  533. readonly
  534. name="cityCodeName"
  535. onClick={() => {
  536. state.showPicker = true
  537. }}
  538. rules={[{ required: true, message: '请选择所在城市', trigger: 'onChange' }]}
  539. placeholder="请选择所在城市"
  540. >
  541. {{
  542. 'right-icon': () => <Icon name="arrow" color={'#323233'} size="16"></Icon>
  543. }}
  544. </Field>
  545. <Field
  546. label="声部(可多选)"
  547. v-model={state.forms.showSubjectIds}
  548. readonly
  549. name="showSubjectIds"
  550. onClick={() => {
  551. state.showSubject = true
  552. }}
  553. rules={[{ required: true, message: '请选择声部', trigger: 'onChange' }]}
  554. placeholder="请选择声部"
  555. >
  556. {{
  557. 'right-icon': () => <Icon name="arrow" color={'#323233'} size="16"></Icon>,
  558. input: () => (
  559. <>
  560. {state.forms.subjectIds.length <= 0 ? (
  561. <div class={styles.subjectPlaceholder} style="color:#c8c9cc">
  562. 请选择声部
  563. </div>
  564. ) : (
  565. ''
  566. )}
  567. {state.forms.subjectIds.length > 0 ? (
  568. <div>
  569. {state.selectSubjects.map((item: any, index: any) => (
  570. <Tag
  571. closeable
  572. size="medium"
  573. color="#FF8057"
  574. onClose={() => onSubjectRemove(item, index)}
  575. >
  576. {item.text}
  577. </Tag>
  578. ))}
  579. </div>
  580. ) : (
  581. ''
  582. )}
  583. </>
  584. )
  585. }}
  586. </Field>
  587. <Field
  588. label="验证码"
  589. v-model={state.forms.smsValidCode}
  590. name="smsValidCode"
  591. rules={[{ required: true, message: '请输入验证码', trigger: 'onChange' }]}
  592. placeholder="请输入验证码"
  593. maxlength={6}
  594. type="tel"
  595. >
  596. {{
  597. button: () =>
  598. state.countDownStatus ? (
  599. <Button type="primary" round size="small" color="#ff8057" onClick={onSendCode}>
  600. 发送验证码
  601. </Button>
  602. ) : (
  603. <Button
  604. type="default"
  605. round
  606. size="small"
  607. disabled
  608. style={{ minWidth: '60px' }}
  609. onClick={onSendCode}
  610. >
  611. {state.countDownTime + 's'}
  612. </Button>
  613. )
  614. }}
  615. </Field>
  616. </CellGroup>
  617. <div class={styles.protocol}>
  618. <Checkbox
  619. v-model={state.checked}
  620. icon-size="16"
  621. style="margin-right: 6px"
  622. checked-color="#FF8057"
  623. ></Checkbox>
  624. <div>
  625. <span
  626. onClick={() => {
  627. state.checked = !state.checked
  628. }}
  629. >
  630. 请认真阅读并勾选
  631. </span>
  632. <span class={styles.c} onClick={() => onPreview('REGISTER')}>
  633. 《管乐团用户注册协议》
  634. </span>
  635. <span class={styles.c} onClick={() => onPreview('PRIVACY')}>
  636. 《隐私协议》
  637. </span>
  638. <span class={styles.c} onClick={() => onPreview('WITHDRAW')}>
  639. 《共享经济平台注册经营者协议》
  640. </span>
  641. </div>
  642. </div>
  643. <Button
  644. size="large"
  645. block
  646. round
  647. class={styles['btn-submit']}
  648. color="#FF8057"
  649. loading={state.btnLoading}
  650. native-type="submit"
  651. disabled={state.btnLoading}
  652. >
  653. 完成
  654. </Button>
  655. </Form>
  656. {/* 城市 */}
  657. <Popup v-model:show={state.showPicker} position="bottom" round>
  658. <Picker
  659. showToolbar
  660. columns={state.columns}
  661. onCancel={() => (state.showPicker = false)}
  662. onConfirm={onConfirm}
  663. columnsFieldNames={{ text: 'name', value: 'code', children: 'areas' }}
  664. />
  665. </Popup>
  666. <Popup
  667. v-model:show={state.showSubject}
  668. position="bottom"
  669. round
  670. safeAreaInsetBottom
  671. closeable
  672. >
  673. {/* <Picker
  674. showToolbar
  675. columns={state.columnSubject}
  676. onCancel={() => (state.showSubject = false)}
  677. onConfirm={onConfirmSubject}
  678. /> */}
  679. <div class={styles.filterTitle}>全部声部</div>
  680. <div class={styles.searchResult} style={{ maxHeight: '45vh', overflowY: 'auto' }}>
  681. <CheckboxGroup
  682. class={[styles.childContent, styles['radio-group']]}
  683. modelValue={state.popupSelectSubjects}
  684. onUpdate:modelValue={(val) => {
  685. console.log(val)
  686. state.popupSelectSubjects = val
  687. }}
  688. >
  689. {state.columnSubject.map((item: any) => (
  690. <Checkbox key={item.value} name={item.value} class={styles.radio}>
  691. <Tag
  692. class={[styles.item, 'van-ellipsis']}
  693. plain={state.popupSelectSubjects.includes(item.value)}
  694. type="primary"
  695. size="large"
  696. >
  697. {item.text}
  698. </Tag>
  699. </Checkbox>
  700. ))}
  701. </CheckboxGroup>
  702. <Sticky position="bottom" offsetBottom={0}>
  703. <div class={['btnGroup']}>
  704. <Button type="primary" round block onClick={onConfirmSubject}>
  705. 确 认
  706. </Button>
  707. </div>
  708. </Sticky>
  709. </div>
  710. </Popup>
  711. {/* 学历 */}
  712. {/* 学历分为专科、本科、硕士、博士、其他 */}
  713. <Popup v-model:show={state.showEducation} position="bottom" round>
  714. <Picker
  715. showToolbar
  716. columns={[
  717. { text: '专科', value: '专科' },
  718. { text: '本科', value: '本科' },
  719. { text: '硕士', value: '硕士' },
  720. { text: '博士', value: '博士' },
  721. { text: '其他', value: '其他' }
  722. ]}
  723. onCancel={() => (state.showEducation = false)}
  724. onConfirm={onConfirmEduction}
  725. />
  726. </Popup>
  727. <Popup v-model:show={state.submitStatus} round style="width: 75%" closeOnClickOverlay>
  728. <div class={styles.stautsS}>
  729. {/* <img
  730. class={styles['icon-close']}
  731. src={iconClose}
  732. onClick={() => {
  733. state.submitStatus = false
  734. window.location.href =
  735. window.location.origin + '/orchestra-student/#/download?type=teacher'
  736. }}
  737. /> */}
  738. <img src={topBanner1} class={styles['submit-img']} />
  739. <div class={styles['submit-container']}>
  740. <p class={styles['submit-title']}>恭喜您已成功登记为</p>
  741. <p class={styles['submit-o']}>
  742. {state.name} <br />
  743. <span>【伴学指导】</span>
  744. </p>
  745. <p class={styles['submit-tips']}>请下载管乐团伴学指导端APP进行授课</p>
  746. <Button
  747. type="primary"
  748. color="#FF8057"
  749. block
  750. round
  751. onClick={() => {
  752. state.submitStatus = false
  753. window.location.href =
  754. window.location.origin + '/orchestra-student/#/download?type=teacher'
  755. }}
  756. >
  757. 立即下载
  758. </Button>
  759. </div>
  760. </div>
  761. </Popup>
  762. {state.imgCodeStatus ? (
  763. <ImgCode
  764. v-model:value={state.imgCodeStatus}
  765. phone={state.forms.phone as any}
  766. type="REGISTER"
  767. onClose={() => {
  768. state.imgCodeStatus = false
  769. }}
  770. onSendCode={onCodeSend}
  771. />
  772. ) : null}
  773. <Popup
  774. v-model:show={state.showPopup}
  775. round
  776. style={{ width: '88%' }}
  777. closeOnClickOverlay={false}
  778. class={styles.wxPopupDialog}
  779. >
  780. <div class={styles.popupContainer}>
  781. <p class={styles.title1}>温馨提示</p>
  782. <p class={styles.popupTips}>请使用微信打开</p>
  783. </div>
  784. </Popup>
  785. </div>
  786. )
  787. }
  788. })