| 1 |
- import{_ as l}from"./wx_bg.97f694a9.js";import{C as u}from"./index.34e13dc3.js";import{S as i}from"./index.93b8dae9.js";import{U as p}from"./index.426f79cf.js";import{d as c,D as m,a as t,x as f,B as h,j as g}from"./vendor.75c233d7.js";import{e as a,s as n,p as x,r as b}from"./index.99ecdf56.js";import{C as v}from"./index.f85989e5.js";import{s as I}from"./share.5861ce84.js";/* empty css *//* empty css */import"./bars.4f1962a6.js";/* empty css *//* empty css */import"./icon_teacher.40b6f077.js";import"./icon_timer2.5fb1750d.js";const _="_introduction_q1sek_1",j="_wxpopup_q1sek_9";var r={"video-detail":"_video-detail_q1sek_1",introduction:_,wxpopup:j};function w(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!f(e)}const C=e=>{const s=`../images/${e}`;return{"../images/wx_bg.png":l}[s].default};var F=c({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?recomUserId=${this.recomUserId}&groupId=${this.params.videoLessonGroupId}`):n.platformType==="TEACHER"&&m.alert({title:"\u63D0\u793A",message:"\u8BF7\u4F7F\u7528\u9177\u4E50\u79C0\u5B66\u751F\u7AEF\u626B\u7801\u6253\u5F00",confirmButtonColor:"#2dc7aa"}).then(()=>{x({api:"back"})}):this.reCall();const s=(await b.post("/api-teacher/open/videoShareProfit",{data:{bizId:this.params.videoLessonGroupId,userId:this.recomUserId}})).data||{},{lessonGroup:o,detailList:d}=s.videoGroup;this.userInfo={username:s.name,headUrl:s.avatar,buyNum:o.countStudent,lessonNum:o.lessonCount,lessonName:o.lessonName,lessonDesc:o.lessonDesc,lessonPrice:o.lessonPrice,lessonCoverUrl:o.lessonCoverUrl},this.detailList=d||[]}catch{}},methods:{reCall(){const{origin:e}=location;let s=e+"/student/#/videoDetail";const o=this.$route.query;s+=`?recomUserId=${this.recomUserId}&groupId=${o.groupId}`,console.log(s),I(s,{})},onShare(){if(a().weixin){this.wxStatus=!0;return}this.reCall(),setTimeout(()=>{this.$router.push("/download")},3e3)}},render(){let e;return t("div",{class:[r["video-detail"],"mb12"]},[t(p,{userInfo:this.userInfo},null),t(i,{border:!0},{default:()=>[t("p",{class:r.introduction},[this.userInfo.lessonDesc])]}),t(i,{title:"\u8BFE\u7A0B\u5217\u8868",icon:"courseList",contentStyle:{paddingTop:"0"}},w(e=this.detailList.map(s=>t(u,{class:"mb12",detail:{id:s.id,title:s.videoTitle,content:s.videoContent,imgUrl:s.coverUrl}},null)))?e:{default:()=>[e]}),t(v,{position:"bottom"},{default:()=>[t("div",{class:["btnGroup"],style:{paddingTop:"12px"}},[t(h,{block:!0,round:!0,type:"primary",onClick:this.onShare},{default:()=>[g("\u4E0B\u8F7D\u9177\u4E50\u79C0\u8FDB\u5165\u8BFE\u7A0B")]})])]}),this.wxStatus&&t("div",{class:r.wxpopup,onClick:()=>{this.wxStatus=!1}},[t("img",{src:C("wx_bg.png"),alt:""},null)])])}});export{F as default,C as getAssetsHomeFile};
|