index.bd8b0ed2.js 2.5 KB

1
  1. import{d as s,s as u,D as n,e as i,T as o,i as a,C as d,B as h,F as l}from"./index.6b776f4b.js";import{C as p}from"./index.5070a0ba.js";import{C}from"./cert-three.57c0d66a.js";import{t as r}from"./teacherState.5cee83cd.js";import"./index.3c35af68.js";import"./index.6bbd549f.js";import"./index.87f67876.js";import"./index.7cc0b0e7.js";import"./index.570314c1.js";import"./index.bf33b691.js";import"./index.7486196c.js";import"./index.ef17e812.js";import"./use-id.40b6af6b.js";var D=s({name:"teacher-cert-update",data(){return{authStatus:!1}},async mounted(){var t;try{if(!((t=u.user.data)!=null&&t.entryFlag)){n.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 e=(await i.get("/api-teacher/teacherAuthEntryRecord/getLastRecordByUserId")).data||{},c=e.teacherAuthStatus||0;this.authStatus=c==="DOING",r.teacherCert.graduateSchool=e.graduateSchool,r.teacherCert.subject=e.subject,r.teacherCert.subjectId=e.subjectId,r.teacherCert.introduction=e.introduction,r.teacherCert.styleVideoJson=e.styleVideoJson,r.teacherCert.gradCertificate=e.gradCertificate,r.teacherCert.degreeCertificate=e.degreeCertificate,r.teacherCert.teacherCertificate=e.teacherCertificate}catch{}},methods:{async onSubmit(){const t=r.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 i.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 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(p,{position:"bottom"},{default:()=>[a("div",{class:["btnGroup"],style:{paddingTop:"12px"}},[a(h,{block:!0,round:!0,onClick:this.onSubmit,type:"primary",text:"\u63D0\u4EA4\u5BA1\u6838"},null)])]})])])}});export{D as default};