import{d as c,x as p,f as i,g as n,D as d,n as r,T as m,j as t,z as s,B as A}from"./index.3bfa6a0e.js";import{C as v}from"./index.aac5e6b2.js";import{i as u}from"./icon_teacher.40b6f077.js";var _="./assets/icon-bg.f56cd6ad.png",h=Object.freeze(Object.defineProperty({__proto__:null,default:_},Symbol.toStringTag,{value:"Module"})),g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAHlJREFUOE/tlcENwCAMA+1B2n06SWfqJOzTDuI+yqMIKQkI8YIPPPApMomhpAPAhW+dJFM+h7ZKL+kGsGX1Q3IPkfKlSi9JfwBJNgJL/XSg53FVkFeh53EP0PR4AcHAoywPy9HsaRszPHqAZrw1A73kmQIcHrBDv4AX9enaHwz5d/YAAAAASUVORK5CYII=",w=Object.freeze(Object.defineProperty({__proto__:null,default:g},Symbol.toStringTag,{value:"Module"}));const f="_container_3down_1",y="_wrap_3down_6",F="_userWrap_3down_13",R="_user_3down_13",S="_avator_3down_23",D="_tips_3down_38",B="_titleWrap_3down_56",E="_liveUser_3down_64",T="_content_3down_67",b="_top_3down_76",x="_comentWrap_3down_93",C="_contentAvator_3down_101",I="_comentTitle_3down_115",W="_comentDes_3down_119",k="_wxpopup_3down_122";var e={container:f,wrap:y,userWrap:F,user:R,avator:S,tips:D,titleWrap:B,liveUser:E,content:T,top:b,comentWrap:x,contentAvator:C,comentTitle:I,comentDes:W,wxpopup:k};const l=o=>{const a=`./images/${o}`;return{"./images/icon-bg.png":h,"./images/icon-live.png":w}[a].default};var q=c({name:"shareLiveRoom",data(){return{query:{...this.$route.query},liveRoom:{},teacher:{},student:{},wxStatus:!1}},async mounted(){await this.getData(),this.openApp()},methods:{async getData(){try{const{data:o}=await p.get(`/api-student/open/liveRoom/detail/${this.query.id}`,{params:{userId:this.query.userId}});this.liveRoom=o,this.teacher=o.teacher||{},this.student=o.student||{}}catch{}},openApp(){if(i().weixin){this.wxStatus=!0;return}if(!i().isApp){this.onWakeApp();return}i().isApp&&(n.platformType==="STUDENT"?this.onJoinLiveRoom():n.platformType==="TEACHER"&&d.alert({title:"\u63D0\u793A",message:"\u8BF7\u4F7F\u7528\u9177\u4E50\u79C0\u5B66\u751F\u7AEF\u626B\u7801\u6253\u5F00",confirmButtonColor:"#2dc7aa"}).then(()=>{r({api:"back"})}))},onJoinLiveRoom(){r({api:"joinLiveRoom",content:{roomId:this.liveRoom.roomUid,teacherId:this.liveRoom.speakerId}})},onWakeApp(){const o={action:"app",pageTag:"liveRoom",params:JSON.stringify({liveRoomId:this.query.id})},a=encodeURIComponent(JSON.stringify(o));/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)?window.location.href=`ColexiuStudent://linkUrl=${a}`:/(Android)/i.test(navigator.userAgent)?window.location.href=`colexiustudent://html:8888/SplashActivity?url=${a}`:m("\u8BF7\u7528\u624B\u673A\u6216\u79FB\u52A8\u8BBE\u5907\u6253\u5F00")}},render(){return t("div",{class:e.container},[t("div",{class:e.wrap},[t("div",{class:e.userWrap},[t("div",{class:e.user},[t("div",{class:e.avator},[t("img",{src:this.teacher.avatar||u},null)]),t("div",{class:e.tips},[t("img",{src:l("icon-live.png")},null),t("span",null,[s("\u76F4\u64AD\u4E2D")])])])]),t("div",{class:e.titleWrap},[t("div",{class:e.title},[this.liveRoom.roomTitle]),t("div",{class:e.liveUser},[s("\u4E3B\u8BB2\u4EBA\uFF1A"),this.teacher.realName||this.teacher.username])]),t("div",{class:e.content},[t("div",{class:e.top},[s("\u76F4\u64AD\u5185\u5BB9")]),t("div",null,[this.liveRoom.liveRemark]),t("div",{class:e.comentWrap},[t("div",{class:e.contentAvator},[t("img",{src:this.student.avatar||u},null)]),t("div",null,[t("div",{class:e.comentTitle},[s("\u5FEB\u8FDB\u5165\u8FBE\u4EBA\u7684\u76F4\u64AD\u95F4\u4E00\u8D77\u56F4\u89C2\uFF5E")]),t("div",{class:e.comentDes},[this.teacher.realName||this.student.username,s(" \u4E3A\u60A8\u63A8\u8350")])])])])]),t(v,{position:"bottom"},{default:()=>[t("div",{class:["btnGroup"],style:{paddingTop:"12px"}},[t(A,{color:"linear-gradient(180deg, #59E5D5 0%, #2DC7AA 100%)",block:!0,round:!0,type:"primary",onClick:this.openApp},{default:()=>[s("\u5F00\u542F\u9177\u4E50\u79C0\u8FDB\u5165\u76F4\u64AD\u95F4\uFF01")]})])]}),this.wxStatus&&t("div",{class:e.wxpopup,onClick:()=>{this.wxStatus=!1}},[t("img",{src:l("wx_bg.png"),alt:""},null)])])}});export{q as default,l as getAssetsHomeFile};
