import{d as m,g as r,w as c,D as _,T as d,n as h,j as e,F as p,C as F,z as a,M as v,B as f}from"./index.394decd7.js";import{C as g}from"./index.9e0d46e4.js";import{I as i}from"./index.ae2dd816.js";import{R as E}from"./index.eb3110b4.js";import{S as B}from"./index.3bbf4ddb.js";import{C as A}from"./index.e6e212d8.js";import{i as C}from"./icon_teacher.40b6f077.js";import"./use-refs.09b2d19c.js";const D="_openBtn_asp60_12",N="_userLogo_asp60_22",x="_level_asp60_50",b="_cert_asp60_53",y="_teacherItem_asp60_64",I="_title_asp60_75",T="_content_asp60_81";var t={"open-live":"_open-live_asp60_1","header-content":"_header-content_asp60_6",openBtn:D,"open-teacher-info":"_open-teacher-info_asp60_16",userLogo:N,"teacher-info":"_teacher-info_asp60_33","teacher-name":"_teacher-name_asp60_40",level:x,cert:b,"teacher-desc":"_teacher-desc_asp60_60",teacherItem:y,title:I,content:T,"open-tips":"_open-tips_asp60_88","open-content":"_open-content_asp60_103","cert-text":"_cert-text_asp60_117","cert-img":"_cert-img_asp60_123"},L="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAALRQTFRFAAAA/5kz/6px/5lN/5lm/5ZI/5tX/6Rk/7eC/5VJ/5NI/6hr/51Y/7qL/7qM/51Z/6hq/5NI/6Ji/7yM/5RI/5dN/7aE/7eE/7yO/5RJ/5RJ/7yP/72P/55a/6ls/76R/5RJ/5ZN/51a/55b/59d/6Jj/6Nj/6lt/6lu/6pu/6tx/6ty/611/7N+/7iI/7uN/76R/8ij/86s/9m//97H/+PP/+zf/+3g/+3h/+/l//37////uo7UtgAAACB0Uk5TAAUJCgouODg5k5Wen6CgoaG7xsbX1+Li4/j9/f3+/v77Ap2qAAAAo0lEQVQY0yWLQW6DMBQFh29jQYnaJvtKvf/ZsklEgsDmvSy8HM3MADCVr+y2th0YIJbbFVS1PddGJq5/gKqY53icics/oHE5jKa2x3QDVMdISHyXGPtvkKCUWPoPFuA5cmfTADtnd1/VwDa59v5J5xovATpjwja8o21g8fuTbDhqOoeLBEkvA/c90c4J2DcDj5WEjpaTbTjuqxkASpkz9V0r8AG2xm36KYuxVQAAAABJRU5ErkJggg==",R="./assets/2.d60d5fe9.png",k="./assets/3.a6301a1a.png",z=m({name:"live-cert",computed:{users(){return r.user.data},btnStatus(){const s=this.users,u=this.fansNum,n=this.overClassNum;return(s==null?void 0:s.fansNum)>=u&&(s==null?void 0:s.expTime)>=n}},data(){return{fansNum:0,overClassNum:0}},async mounted(){var u,n;const s=(u=r.user.data)==null?void 0:u.liveFlag;r.openLiveStatus=s===1;try{(await c.get("/api-teacher/sysConfig/queryByParamNameList",{params:{paramNames:"open_live_fans_num,open_list_over_class"}})).data.forEach(o=>{o.paramName==="open_live_fans_num"?this.fansNum=Number(o.paramValue):o.paramName==="open_list_over_class"&&(this.overClassNum=Number(o.paramValue))}),(n=r.user.data)!=null&&n.entryFlag||_.alert({message:"\u60A8\u5C1A\u672A\u5B8C\u6210\u8FBE\u4EBA\u8BA4\u8BC1\uFF0C\u8FBE\u4EBA\u8BA4\u8BC1\u540E\u624D\u53EF\u5F00\u901A\u76F4\u64AD\u6743\u9650\u54E6\uFF01",confirmButtonColor:"#2DC7AA"}).then(()=>{this.$router.replace("/teacherCert")})}catch{}},methods:{async onOpenLive(){try{await c.get("/api-teacher/teacher/openLive",{}),d("\u5F00\u901A\u6210\u529F"),setTimeout(()=>{h({api:"back"})},1e3)}catch{}}},render(){return e(p,null,[r.openLiveStatus?e(p,null,[e(A,null,null),e(F,{classImgSize:"CERT",type:"liveCert",style:{paddingTop:"60px"},tips:"\u5F00\u901A\u6210\u529F\uFF0C\u5FEB\u53BB\u5F00\u542F\u76F4\u64AD\u6216\u521B\u5EFA\u76F4\u64AD\u8BFE\u5427"},null)]):e("div",{class:t["open-live"]},[e(A,{background:"transparent",border:!1,title:" "},null),e(g,{class:t["open-teacher-info"],border:!1},{default:()=>{var s,u,n,l;return[e("div",{class:t["teacher-info"]},[e("div",{class:t["teacher-name"]},[((s=this.users)==null?void 0:s.username)||`\u6E38\u5BA2${(u=this.users)==null?void 0:u.userId}`]),e("div",{class:t.level},[(n=this.users)!=null&&n.starGrade?e(E,{modelValue:(l=this.users)==null?void 0:l.starGrade,iconPrefix:"iconfont",color:"#FFC459","void-icon":"star_default",icon:"star_active",size:15},null):e("span",{style:{fontSize:"12px",color:"#999999"}},[a("\u6682\u65E0\u8BC4\u5206")])])])]},icon:()=>{var s;return e(i,{class:t.userLogo,src:((s=this.users)==null?void 0:s.headUrl)||C,fit:"cover"},null)}}),e("div",{class:t["teacher-desc"]},[e("div",{class:[t.teacherItem]},[e("div",{class:t.content},[a("\u7C89\u4E1D")]),e("div",{class:t.title},[this.fansNum])]),e("div",{class:t.teacherItem,style:{textAlign:"right"}},[e("div",{class:t.content},[a("\u5DF2\u4E0A\u8BFE\u65F6")]),e("div",{class:t.title},[this.overClassNum])])]),this.btnStatus?null:e("div",{class:t["open-tips"]},[e(v,{name:L,size:"16"},null),e("p",null,[a("\u4F60\u5C1A\u672A\u8FBE\u5230\u5F00\u901A\u76F4\u64AD\u7684\u6761\u4EF6")])]),e("div",{class:t["open-content"]},[e("h2",null,[a("\u76F4\u64AD")]),e("p",{class:t["cert-text"]},[a("\u5F00\u901A\u76F4\u64AD\u529F\u80FD\u540E\uFF0C\u60A8\u53EF\u4EE5\u521B\u5EFA\u81EA\u5DF1\u7684\u76F4\u64AD\u95F4\u5F00\u542F\u76F4\u64AD\u3002")]),e("p",{class:t["cert-img"]},[e(i,{src:R,width:"100%",height:"150px",fit:"contain"},null)]),e("h2",null,[a("\u76F4\u64AD\u8BFE")]),e("p",{class:t["cert-text"]},[a("\u60A8\u53EF\u5236\u5B9A\u6559\u5B66\u65B9\u6848\u8BBE\u7F6E\u76F4\u64AD\u8BFE\u7A0B\uFF0C\u5B66\u5458\u8D2D\u4E70\u540E\uFF0C\u60A8\u53EF\u5728\u76F4\u64AD\u95F4\u5BF9\u8D2D\u4E70\u76F4\u64AD\u8BFE\u7684\u5B66\u5458\u8FDB\u884C\u76F4\u64AD\u6559\u5B66\uFF0C\u76F4\u64AD\u8BFE\u7A0B\u65E0\u4EBA\u6570\u4E0A\u9650\uFF0C\u53EF\u6781\u5927\u7684\u63D0\u9AD8\u8BFE\u7A0B\u6536\u5165\u3002")]),e("p",{class:t["cert-img"]},[e(i,{src:k,width:"100%",height:"150px",fit:"contain"},null)])]),e(B,{offsetBottom:0,position:"bottom"},{default:()=>[e("div",{class:[t["header-content"],"btnGroup"]},[e(f,{round:!0,plain:!0,block:!0,disabled:!this.btnStatus,class:t.openBtn,onClick:this.onOpenLive},null)])]})])])}});export{z as default};