index.92610e7d.js 3.6 KB

1
  1. import{_ as c,b as p}from"./icon-cert.d28b9b30.js";import{_ as m,a as f}from"./wx_bg.a1209e93.js";import{C as g}from"./index.845eb2d1.js";import{S as l}from"./index.4b159732.js";import{U as h}from"./index.07b072c5.js";import{d as _,D as b,a as o,x as w,B as x,j as y}from"./vendor.7fdfd452.js";import{e as i,s as d,p as r,r as v}from"./index.c610da41.js";import{C as j}from"./index.5fcd7421.js";import{s as C}from"./share.34318b57.js";import{q as a}from"./index.339fc024.js";/* empty css *//* empty css */import"./bars.4f1962a6.js";/* empty css *//* empty css */import"./icon_teacher.40b6f077.js";import"./icon_timer2.5fb1750d.js";const I="_introduction_q1sek_1",S="_wxpopup_q1sek_9";var n={"video-detail":"_video-detail_q1sek_1",introduction:I,wxpopup:S};function D(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!w(e)}const U=e=>{const t=`../images/${e}`;return{"../images/icon-cert.png":c,"../images/icon_music.png":p,"../images/music-share-banner.png":m,"../images/wx_bg.png":f}[t].default};var M=_({name:"VideoDetail",data(){const e=this.$route.query;return{userInfo:{},detailList:[],buyUserList:[],dataShow:!0,loading:!1,finished:!1,recomUserId:e.recomUserId,params:{videoLessonGroupId:e.groupId,page:1,rows:20},wxStatus:!1}},created(){if(i().isApp)if(d.platformType==="STUDENT"){window.location.replace(`${location.origin}/student/#/videoDetail?${a.stringify(this.$route.query)}`),i().ios?window.location.replace(`${location.origin}/student/#/videoDetail?${a.stringify(this.$route.query)}`):(r({api:"openWebView",content:{url:`${location.origin}/student/#/videoDetail?${a.stringify(this.$route.query)}`,orientation:1,isHideTitle:!1}}),r({api:"back"}));return}else d.platformType==="TEACHER"&&b.alert({title:"\u63D0\u793A",message:"\u8BF7\u4F7F\u7528\u9177\u4E50\u79C0\u5B66\u751F\u7AEF\u626B\u7801\u6253\u5F00",confirmButtonColor:"#2dc7aa"}).then(()=>{r({api:"back"})});else this.reCall()},async mounted(){try{const t=(await v.post("/api-teacher/open/videoShareProfit",{data:{bizId:this.params.videoLessonGroupId,userId:this.recomUserId}})).data||{},{lessonGroup:s,detailList:u}=t.videoGroup;this.userInfo={username:t.name,headUrl:t.avatar,buyNum:s.countStudent,lessonNum:s.lessonCount,lessonName:s.lessonName,lessonDesc:s.lessonDesc,lessonPrice:s.lessonPrice,lessonCoverUrl:s.lessonCoverUrl},this.detailList=u||[]}catch{}},methods:{locationReplace(e){history.replaceState?(history.replaceState(null,document.title,e),window.location.reload()):location.replace(e)},reCall(){const{origin:e}=location;let t=e+"/student/#/videoDetail";const s=this.$route.query;t+=`?recomUserId=${this.recomUserId}&groupId=${s.groupId}`,console.log(t),C(t,{})},onShare(){if(i().weixin){this.wxStatus=!0;return}this.reCall(),setTimeout(()=>{window.location.href=location.origin+"/student/#/download"},3e3)}},render(){let e;return o("div",{class:[n["video-detail"],"mb12"]},[o(h,{userInfo:this.userInfo,showBuy:!1},null),o(l,{border:!0},{default:()=>[o("p",{class:n.introduction},[this.userInfo.lessonDesc])]}),o(l,{title:"\u8BFE\u7A0B\u5217\u8868",icon:"courseList",contentStyle:{paddingTop:"0"}},D(e=this.detailList.map(t=>o(g,{class:"mb12",detail:{id:t.id,title:t.videoTitle,content:t.videoContent,imgUrl:t.coverUrl}},null)))?e:{default:()=>[e]}),o(j,{position:"bottom"},{default:()=>[o("div",{class:["btnGroup"],style:{paddingTop:"12px"}},[o(x,{block:!0,round:!0,type:"primary",onClick:this.onShare},{default:()=>[y("\u4E0B\u8F7D\u9177\u4E50\u79C0\u8FDB\u5165\u8BFE\u7A0B")]})])]}),this.wxStatus&&o("div",{class:n.wxpopup,onClick:()=>{this.wxStatus=!1}},[o("img",{src:U("wx_bg.png"),alt:""},null)])])}});export{M as default,U as getAssetsHomeFile};