import{s,r as o,C as d}from"./index.a9c80450.js";import{C as n}from"./index.908c3564.js";import{d as u,D as h,T as i,a,F as l,B as p}from"./vendor.cd162bf7.js";import{C}from"./cert-three.95c6c413.js";import{t as r}from"./teacherState.b2ec8831.js";import"./index.fd2af93d.js";/* empty css               */import"./index.e7a51e09.js";/* empty css               *//* empty css              *//* empty css                *//* empty css              *//* empty css               */var B=u({name:"teacher-cert-update",data(){return{authStatus:!1}},async mounted(){var e;try{if(!((e=s.user.data)==null?void 0:e.entryFlag)){h.alert({message:"\u60A8\u5C1A\u672A\u5B8C\u6210\u8FBE\u4EBA\u8BA4\u8BC1\uFF0C\u8FBE\u4EBA\u8BA4\u8BC1\u540E\u624D\u53EF\u66F4\u65B0\u8D44\u6599\u54E6\uFF01",confirmButtonColor:"#2DC7AA"}).then(()=>{this.$router.replace("/teacherCert")});return}const t=(await o.get("/api-teacher/teacherAuthEntryRecord/getLastRecordByUserId")).data||{},c=t.teacherAuthStatus||0;this.authStatus=c==="DOING",r.teacherCert.graduateSchool=t.graduateSchool,r.teacherCert.subject=t.subject,r.teacherCert.subjectId=t.subjectId,r.teacherCert.introduction=t.introduction,r.teacherCert.styleVideoJson=t.styleVideoJson,r.teacherCert.gradCertificate=t.gradCertificate,r.teacherCert.degreeCertificate=t.degreeCertificate,r.teacherCert.teacherCertificate=t.teacherCertificate}catch{}},methods:{async onSubmit(){const e=r.teacherCert;if(!e.graduateSchool){i("\u8BF7\u8F93\u5165\u60A8\u7684\u6BD5\u4E1A\u9662\u6821");return}if(!e.subject){i("\u8BF7\u8F93\u5165\u60A8\u7684\u4E13\u4E1A");return}await o.post("/api-teacher/teacherAuthEntryRecord/doApply",{data:{graduateSchool:e.graduateSchool,subject:e.subject,subjectId:e.subjectId,introduction:e.introduction,styleVideoJson:e.styleVideoJson,gradCertificate:e.gradCertificate,degreeCertificate:e.degreeCertificate,teacherCertificate:e.teacherCertificate}}),i("\u63D0\u4EA4\u6210\u529F"),this.authStatus=!0}},render(){return a(l,null,[this.authStatus?a(d,{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):a("div",{style:{paddingTop:"12px"}},[a(C,null,null),a(n,{position:"bottom"},{default:()=>[a("div",{class:["btnGroup"],style:{paddingTop:"12px"}},[a(p,{block:!0,round:!0,onClick:this.onSubmit,type:"primary",text:"\u63D0\u4EA4\u5BA1\u6838"},null)])]})])])}});export{B as default};
