index.5dd4a6f9.js 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. import { s as c, r as o, C as d } from './index.9e4b607f.js'
  2. import { C as n } from './index.e311a214.js'
  3. import { d as u, D as h, T as i, a, F as l, B as p } from './vendor.3506a68e.js'
  4. import { C } from './cert-three.1f600374.js'
  5. import { t as r } from './teacherState.06f523ca.js'
  6. import './index.8b9f8b97.js'
  7. /* empty css */ import './index.dc64d189.js'
  8. /* empty css */ /* empty css */ /* empty css */ /* empty css */ /* empty css */ var B =
  9. u({
  10. name: 'teacher-cert-update',
  11. data() {
  12. return { authStatus: !1 }
  13. },
  14. async mounted() {
  15. var e
  16. try {
  17. if (!((e = c.user.data) == null ? void 0 : e.entryFlag)) {
  18. h.alert({
  19. message:
  20. '\u60A8\u5C1A\u672A\u5B8C\u6210\u8FBE\u4EBA\u8BA4\u8BC1\uFF0C\u8FBE\u4EBA\u8BA4\u8BC1\u540E\u624D\u53EF\u66F4\u65B0\u8D44\u6599\u54E6\uFF01',
  21. confirmButtonColor: '#01C1B5'
  22. }).then(() => {
  23. this.$router.replace('/teacherCert')
  24. })
  25. return
  26. }
  27. const t =
  28. (
  29. await o.get(
  30. '/api-teacher/teacherAuthEntryRecord/getLastRecordByUserId'
  31. )
  32. ).data || {},
  33. s = t.teacherAuthStatus || 0
  34. ;(this.authStatus = s === 'DOING'),
  35. (r.teacherCert.graduateSchool = t.graduateSchool),
  36. (r.teacherCert.subject = t.subject),
  37. (r.teacherCert.subjectId = t.subjectId),
  38. (r.teacherCert.introduction = t.introduction),
  39. (r.teacherCert.styleVideoJson = t.styleVideoJson),
  40. (r.teacherCert.gradCertificate = t.gradCertificate),
  41. (r.teacherCert.degreeCertificate = t.degreeCertificate),
  42. (r.teacherCert.teacherCertificate = t.teacherCertificate)
  43. } catch {}
  44. },
  45. methods: {
  46. async onSubmit() {
  47. const e = r.teacherCert
  48. if (!e.graduateSchool) {
  49. i('\u8BF7\u8F93\u5165\u60A8\u7684\u6BD5\u4E1A\u9662\u6821')
  50. return
  51. }
  52. if (!e.subject) {
  53. i('\u8BF7\u8F93\u5165\u60A8\u7684\u4E13\u4E1A')
  54. return
  55. }
  56. await o.post('/api-teacher/teacherAuthEntryRecord/doApply', {
  57. data: {
  58. graduateSchool: e.graduateSchool,
  59. subject: e.subject,
  60. subjectId: e.subjectId,
  61. introduction: e.introduction,
  62. styleVideoJson: e.styleVideoJson,
  63. gradCertificate: e.gradCertificate,
  64. degreeCertificate: e.degreeCertificate,
  65. teacherCertificate: e.teacherCertificate
  66. }
  67. }),
  68. i('\u63D0\u4EA4\u6210\u529F'),
  69. (this.authStatus = !0)
  70. }
  71. },
  72. render() {
  73. return a(l, null, [
  74. this.authStatus
  75. ? a(
  76. d,
  77. {
  78. type: 'teacherCert',
  79. style: { paddingTop: '60px' },
  80. classImgSize: 'CERT',
  81. tips: '\u611F\u8C22\u60A8\u7684\u7533\u8BF7\uFF0C\u5C0F\u9177\u5C06\u572824\u5C0F\u65F6\u5185\u5B8C\u6210\u5BA1\u6838\uFF0C\u8BF7\u7559\u610FAPP\u6D88\u606F\u53CA\u77ED\u4FE1\u83B7\u53D6\u5BA1\u6838\u7ED3\u679C\u3002'
  82. },
  83. null
  84. )
  85. : a('div', { style: { paddingTop: '12px' } }, [
  86. a(C, null, null),
  87. a(
  88. n,
  89. { position: 'bottom' },
  90. {
  91. default: () => [
  92. a(
  93. 'div',
  94. { class: ['btnGroup'], style: { paddingTop: '12px' } },
  95. [
  96. a(
  97. p,
  98. {
  99. block: !0,
  100. round: !0,
  101. onClick: this.onSubmit,
  102. type: 'primary',
  103. text: '\u63D0\u4EA4\u5BA1\u6838'
  104. },
  105. null
  106. )
  107. ]
  108. )
  109. ]
  110. }
  111. )
  112. ])
  113. ])
  114. }
  115. })
  116. export { B as default }