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,E as p}from"./ResizeObserver.es.62ab429c.js";import{C}from"./index.105e15bd.js";import{t as a,C as m}from"./cert-three.6b965a13.js";import{C as s}from"./index.786e83cc.js";import"./index.a6e5e68b.js";import"./index.3b8bb459.js";import"./index.5a30932c.js";import"./index.ac0c4528.js";import"./index.1a2d53c5.js";import"./index.021584f9.js";import"./index.3d6f6bcd.js";import"./index.7f3546e4.js";import"./index.d7a13e47.js";import"./index.82be4917.js";import"./use-id.1bbe472d.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};
