index.5fa247fa.js 2.6 KB

1
  1. import{d as n,g as d,D as l,y as c,T as o,j as e,F as i,C as h,B as p}from"./ResizeObserver.es.b7226882.js";import{C}from"./index.0b42adfa.js";import{t as a,C as m}from"./cert-three.4fe3bc63.js";import{C as s}from"./index.969bba7f.js";import"./index.1eaf642c.js";import"./index.00914c2e.js";import"./index.af733095.js";import"./index.527ae768.js";import"./index.52126c22.js";import"./index.20c0f4c5.js";import"./index.cf00521e.js";import"./index.e4fc81ba.js";import"./index.40f703b6.js";import"./index.021f1c7b.js";import"./use-id.5d5e6e63.js";var v=n({name:"teacher-cert-update",data(){return{authStatus:!1}},async mounted(){var t;try{if(!((t=d.user.data)!=null&&t.entryFlag)){l.alert({message:"\u60A8\u5C1A\u672A\u5B8C\u6210\u8001\u5E08\u8BA4\u8BC1\uFF0C\u8001\u5E08\u8BA4\u8BC1\u540E\u624D\u53EF\u66F4\u65B0\u8D44\u6599\u54E6\uFF01",confirmButtonColor:"#2DC7AA"}).then(()=>{this.$router.replace("/teacherCert")});return}const r=(await c.get("/api-teacher/teacherAuthEntryRecord/getLastRecordByUserId")).data||{},u=r.teacherAuthStatus||0;this.authStatus=u==="DOING",a.teacherCert.graduateSchool=r.graduateSchool,a.teacherCert.subject=r.subject,a.teacherCert.subjectId=r.subjectId,a.teacherCert.introduction=r.introduction,a.teacherCert.styleVideoJson=r.styleVideoJson,a.teacherCert.gradCertificate=r.gradCertificate,a.teacherCert.degreeCertificate=r.degreeCertificate,a.teacherCert.teacherCertificate=r.teacherCertificate}catch{}},methods:{async onSubmit(){const t=a.teacherCert;if(!t.graduateSchool){o("\u8BF7\u8F93\u5165\u60A8\u7684\u6BD5\u4E1A\u9662\u6821");return}if(!t.subject){o("\u8BF7\u8F93\u5165\u60A8\u7684\u4E13\u4E1A");return}await c.post("/api-teacher/teacherAuthEntryRecord/doApply",{data:{graduateSchool:t.graduateSchool,subject:t.subject,subjectId:t.subjectId,introduction:t.introduction,styleVideoJson:t.styleVideoJson,gradCertificate:t.gradCertificate,degreeCertificate:t.degreeCertificate,teacherCertificate:t.teacherCertificate}}),o("\u63D0\u4EA4\u6210\u529F"),this.authStatus=!0}},render(){return e(i,null,[this.authStatus?e(i,null,[e(s,null,null),e(h,{type:"teacherCert",style:{paddingTop:"60px"},classImgSize:"CERT",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"},null)]):e(i,null,[e(s,null,null),e("div",{style:{paddingTop:"12px"}},[e(m,null,null),e(C,{position:"bottom"},{default:()=>[e("div",{class:["btnGroup"],style:{paddingTop:"12px"}},[e(p,{block:!0,round:!0,onClick:this.onSubmit,type:"primary",text:"\u63D0\u4EA4\u5BA1\u6838"},null)])]})])])])}});export{v as default};