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.39b48a47.js";import{C}from"./index.b1c0c586.js";import{t as a,C as m}from"./cert-three.935dbe85.js";import{C as s}from"./index.970ad07b.js";import"./index.dc19bc54.js";import"./index.f6c41ddf.js";import"./index.16ffd6ad.js";import"./index.867583ad.js";import"./index.c6490fa7.js";import"./index.fcbcb027.js";import"./index.0e35d2fb.js";import"./index.fe852f14.js";import"./index.db115763.js";import"./index.428ab1a8.js";import"./use-id.b004ff17.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};
|