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