index.1ce6ee22.js 5.0 KB

1
  1. import{d as A,g as n,y as c,D as m,T as _,n as h,j as e,F as i,C as F,A as u,N as d,B as v}from"./ResizeObserver.es.b7226882.js";import{C as f}from"./index.40f703b6.js";import{I as l}from"./index.20c0f4c5.js";import{S as g}from"./index.f6c44874.js";import{C as p}from"./index.969bba7f.js";import{i as E}from"./icon_teacher.40b6f077.js";const B="_openBtn_asp60_12",D="_userLogo_asp60_22",C="_level_asp60_50",N="_cert_asp60_53",b="_teacherItem_asp60_64",y="_title_asp60_75",x="_content_asp60_81";var t={"open-live":"_open-live_asp60_1","header-content":"_header-content_asp60_6",openBtn:B,"open-teacher-info":"_open-teacher-info_asp60_16",userLogo:D,"teacher-info":"_teacher-info_asp60_33","teacher-name":"_teacher-name_asp60_40",level:C,cert:N,"teacher-desc":"_teacher-desc_asp60_60",teacherItem:b,title:y,content:x,"open-tips":"_open-tips_asp60_88","open-content":"_open-content_asp60_103","cert-text":"_cert-text_asp60_117","cert-img":"_cert-img_asp60_123"},I="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==",T="./assets/2.d60d5fe9.png",L="./assets/3.a6301a1a.png",P=A({name:"live-cert",computed:{users(){return n.user.data},btnStatus(){const a=this.users,s=this.fansNum,r=this.overClassNum;return(a==null?void 0:a.fansNum)>=s&&(a==null?void 0:a.expTime)>=r}},data(){return{fansNum:0,overClassNum:0}},async mounted(){var s,r;const a=(s=n.user.data)==null?void 0:s.liveFlag;n.openLiveStatus=a===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))}),(r=n.user.data)!=null&&r.entryFlag||m.alert({message:"\u60A8\u5C1A\u672A\u5B8C\u6210\u8001\u5E08\u8BA4\u8BC1\uFF0C\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",{}),_("\u5F00\u901A\u6210\u529F"),setTimeout(()=>{h({api:"back"})},1e3)}catch{}}},render(){return e(i,null,[n.openLiveStatus?e(i,null,[e(p,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(p,{background:"transparent",border:!1,title:" "},null),e(f,{class:t["open-teacher-info"],border:!1},{default:()=>{var a,s;return[e("div",{class:t["teacher-info"]},[e("div",{class:t["teacher-name"]},[((a=this.users)==null?void 0:a.username)||`\u6E38\u5BA2${(s=this.users)==null?void 0:s.userId}`])])]},icon:()=>{var a;return e(l,{class:t.userLogo,src:((a=this.users)==null?void 0:a.headUrl)||E,fit:"cover"},null)}}),e("div",{class:t["teacher-desc"]},[e("div",{class:[t.teacherItem]},[e("div",{class:t.content},[u("\u7C89\u4E1D")]),e("div",{class:t.title},[this.fansNum])]),e("div",{class:t.teacherItem,style:{textAlign:"right"}},[e("div",{class:t.content},[u("\u5DF2\u4E0A\u8BFE\u65F6")]),e("div",{class:t.title},[this.overClassNum])])]),this.btnStatus?null:e("div",{class:t["open-tips"]},[e(d,{name:I,size:"16"},null),e("p",null,[u("\u4F60\u5C1A\u672A\u8FBE\u5230\u5F00\u901A\u76F4\u64AD\u7684\u6761\u4EF6")])]),e("div",{class:t["open-content"]},[e("h2",null,[u("\u76F4\u64AD")]),e("p",{class:t["cert-text"]},[u("\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(l,{src:T,width:"100%",height:"150px",fit:"contain"},null)]),e("h2",null,[u("\u76F4\u64AD\u8BFE")]),e("p",{class:t["cert-text"]},[u("\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(l,{src:L,width:"100%",height:"150px",fit:"contain"},null)])]),e(g,{offsetBottom:0,position:"bottom"},{default:()=>[e("div",{class:[t["header-content"],"btnGroup"]},[e(v,{round:!0,plain:!0,block:!0,disabled:!this.btnStatus,class:t.openBtn,onClick:this.onOpenLive},null)])]})])])}});export{P as default};