index.ede1af2e.js 4.8 KB

1
  1. var y=Object.defineProperty,E=Object.defineProperties;var b=Object.getOwnPropertyDescriptors;var d=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var h=(a,t,s)=>t in a?y(a,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[t]=s,m=(a,t)=>{for(var s in t||(t={}))w.call(t,s)&&h(a,s,t[s]);if(d)for(var s of d(t))S.call(t,s)&&h(a,s,t[s]);return a},g=(a,t)=>E(a,b(t));import{r as I,c as l}from"./index.6fc5f983.js";import{C as p}from"./index.ba731085.js";import{P as N}from"./index.404471e8.js";import{I as L}from"./index.0a61232e.js";import{d as f,c as e,F as c,aw as C,ax as o,l as A,f as v,a as T,O as P,P as i}from"./vendor.63aa8b19.js";const _="_liveClass_1u6h7_1",F="_items_1u6h7_21";var x={liveClass:_,items:F},n=f({name:"list",props:{groupStatus:{type:String,default:""}},data(){return{pageInfo:{limit:9,page:1,total:0,page_size:[9,18,36,45]},list:[],loading:!1,dataShow:!1}},mounted(){this.getList()},methods:{async getList(){var a;this.loading=!0;try{const{data:t}=await I.post("/api-website/courseGroup/queryPageCourseGroup",{data:{groupStatus:this.groupStatus,page:this.pageInfo.page,rows:this.pageInfo.limit,teacherId:(a=l.user.data)==null?void 0:a.userId}});this.list=t.rows||[],this.pageInfo.total=t.total,t.total<=0&&(this.dataShow=!0)}catch{}this.dataShow?this.loading=!1:setTimeout(()=>{this.loading=!1},200)}},render(){var a,t,s,r;return e(c,null,[((a=l.user.data)==null?void 0:a.entryFlag)&&((t=l.user.data)==null?void 0:t.liveFlag)?e(c,null,[e("div",{class:"flex flex-wrap"},[e(C,{loading:this.loading,animated:!0,class:"flex justify-between",count:3},{default:()=>[this.list.map(u=>e("div",{class:["w-1/3 pt-8",x.items]},[e(L,{item:g(m({},u),{type:"live"})},null)]))],template:()=>e("div",{class:"w-[218px]"},[e("div",{class:"flex flex-col pt-8 w-[218px] rounded-[10px] overflow-hidden m-auto"},[e(o,{variant:"image",style:{width:"100%",height:"122px"}},null),e("div",{class:"text-base px-2.5 pt-2 text-[#666666] leading-none font-semibold whitespace-nowrap overflow-hidden text-ellipsis"},[e(o,{variant:"h3"},null)]),e("div",{class:"mx-2.5 pt-1.5 pb-2 flex items-center justify-between"},[e(o,{variant:"p",style:{width:"20%"}},null),e("p",{style:{width:"60%"}},null),e(o,{variant:"p",style:{width:"20%"}},null)])])])})]),e(N,{total:this.pageInfo.total,page:this.pageInfo.page,"onUpdate:page":u=>this.pageInfo.page=u,limit:this.pageInfo.limit,"onUpdate:limit":u=>this.pageInfo.limit=u,pageSizes:this.pageInfo.page_size,pagination:this.getList},null),this.dataShow&&e(p,null,null)]):((s=l.user.data)==null?void 0:s.entryFlag)?!((r=l.user.data)==null?void 0:r.liveFlag)&&e(p,{type:"live",message:"\u60A8\u5C1A\u672A\u5F00\u901A\u76F4\u64AD\u670D\u52A1\uFF0C\u5F00\u901A\u540E\u5373\u53EF\u521B\u5EFA\u76F4\u64AD\u8BFE\u7A0B~",buttonVisibility:!0,buttonText:"\u7ACB\u5373\u5F00\u901A",onDetail:()=>{this.$router.push("/userInfo/openLive")}},null):e(p,{type:"teacherCert",message:"\u60A8\u8FD8\u672A\u5B8C\u6210\u8FBE\u4EBA\u8BA4\u8BC1\uFF0C\u8BA4\u8BC1\u540E\u624D\u53EF\u521B\u5EFA\u76F4\u64AD\u8BFE\u54E6~",buttonVisibility:!0,buttonText:"\u53BB\u8BA4\u8BC1",onDetail:()=>{this.$router.push("/teacherAuth")}},null)])}}),B=f({name:"live-class",data(){return{activeName:"ING"}},render(){return e("div",{class:[x.liveClass,"relative px-[25px]"]},[e(A,{round:!0,type:"primary",class:"absolute right-11 top-3 z-10",onClick:()=>{var a,t,s,r;if(((a=l.user.data)==null?void 0:a.entryFlag)&&((t=l.user.data)==null?void 0:t.liveFlag))this.$router.push({path:"/userInfo/liveOperation",query:{type:"create"}});else{if(!((s=l.user.data)==null?void 0:s.entryFlag)){v.error("\u60A8\u8FD8\u672A\u5B8C\u6210\u8FBE\u4EBA\u8BA4\u8BC1\uFF0C\u8BA4\u8BC1\u540E\u624D\u53EF\u521B\u5EFA\u76F4\u64AD\u8BFE");return}if(!((r=l.user.data)==null?void 0:r.liveFlag)){v.error("\u60A8\u5C1A\u672A\u5F00\u901A\u76F4\u64AD\u670D\u52A1\uFF0C\u5F00\u901A\u540E\u5373\u53EF\u521B\u5EFA\u76F4\u64AD\u8BFE\u7A0B");return}}}},{default:()=>[T("\u65B0\u5EFA\u8BFE\u7A0B")]}),e(P,{modelValue:this.activeName,"onUpdate:modelValue":a=>this.activeName=a},{default:()=>[e(i,{label:"\u8FDB\u884C\u4E2D",name:"ING"},{default:()=>[this.activeName==="ING"&&e(n,{groupStatus:"ING"},null)]}),e(i,{label:"\u672A\u4E0A\u67B6",name:"NOT_SALE"},{default:()=>[this.activeName==="NOT_SALE"&&e(n,{groupStatus:"NOT_SALE"},null)]}),e(i,{label:"\u9500\u552E\u4E2D",name:"APPLY"},{default:()=>[this.activeName==="APPLY"&&e(n,{groupStatus:"APPLY"},null)]}),e(i,{label:"\u5DF2\u5B8C\u6210",name:"COMPLETE"},{default:()=>[this.activeName==="COMPLETE"&&e(n,{groupStatus:"COMPLETE"},null)]}),e(i,{label:"\u5DF2\u53D6\u6D88",name:"CANCEL"},{default:()=>[this.activeName==="CANCEL"&&e(n,{groupStatus:"CANCEL"},null)]}),e(i,{label:"\u5DF2\u4E0B\u67B6",name:"OUT_SALE"},{default:()=>[this.activeName==="OUT_SALE"&&e(n,{groupStatus:"OUT_SALE"},null)]})]})])}});export{B as default};