|
|
@@ -227,7 +227,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="lecturer">
|
|
|
+ <div class="lecturer" @click="goUserPage">
|
|
|
<div class="picture">
|
|
|
<img :src="defaultImg" v-real-img="learnDetail.teacher.img" :alt="learnDetail.teacher.name">
|
|
|
<span>讲师</span>
|
|
|
@@ -252,9 +252,9 @@
|
|
|
<!-- 目录 -->
|
|
|
<div class="directory" v-show="tabActive==1">
|
|
|
<van-collapse v-model="activeNames" v-if="learnDetail.video && learnDetail.video.length>0">
|
|
|
- <van-collapse-item :title="`第${index+1}章: ${catalogItem.video_name}`" :name="index+1" v-for="(catalogItem, index) in learnDetail.video" :key="index">
|
|
|
+ <van-collapse-item :title="`第${index+1}章: ${catalogItem.video_name}`" :name="index" v-for="(catalogItem, index) in learnDetail.video" :key="index">
|
|
|
<template v-if="catalogItem.list && catalogItem.list.length>0">
|
|
|
- <div class="item" v-for="(item, i) in catalogItem.list" :key="item.id" @click="handleClickLearnItem(item.id)">
|
|
|
+ <div class="item" v-for="item in catalogItem.list" :key="item.id" @click="handleClickLearnItem(item.id)">
|
|
|
<div class="title">
|
|
|
<span class="text">{{ item.video_name }}</span>
|
|
|
<span class="timer">{{ item.m<10 ? '0'+item.m : item.m }}:{{ item.s<10 ? '0'+item.s : item.s }}</span>
|
|
|
@@ -332,7 +332,7 @@ export default {
|
|
|
collapseName: 1,
|
|
|
tabActive: 0,
|
|
|
defaultImg: require('@/assets/img/common/empty@2x.png'),
|
|
|
- activeNames: ['1'],
|
|
|
+ activeNames: [0],
|
|
|
questionName: [],
|
|
|
isInitPlayer: false, // 是否已初始化播放器
|
|
|
player: null // 播放器对象
|
|
|
@@ -404,11 +404,18 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
|
- // console.log('打印异步数据看看',this)
|
|
|
+ console.log('打印异步数据看看========>',this)
|
|
|
this.baseUrl = this.$store.state.domainConfig.siteUrl
|
|
|
this.isWeixinApp = navigator.userAgent.indexOf("miniProgram") > -1
|
|
|
},
|
|
|
methods: {
|
|
|
+ goUserPage(){
|
|
|
+ if(this.userinfo && this.userinfo.uid){
|
|
|
+ window.location.href = `/wo/${this.userinfo.uid}`
|
|
|
+ }else{
|
|
|
+ window.location.href = 'proginn://login'
|
|
|
+ }
|
|
|
+ },
|
|
|
/**
|
|
|
* 初始化播放器
|
|
|
*/
|
|
|
@@ -549,7 +556,14 @@ export default {
|
|
|
*/
|
|
|
handleClickPlayIcon(){
|
|
|
// 不管购买与否,都播放第一个
|
|
|
- this._getVideoPlayAuth(this.learnDetail.video[0].list[0].id || '')
|
|
|
+ if (!this.userinfo || !this.userinfo.nickname) {
|
|
|
+ // 未登录时 => 去登录
|
|
|
+ if (this.deviceType.ios || this.deviceType.android) {
|
|
|
+ window.location.href = "proginn://login?backToPage=true";
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this._getVideoPlayAuth(this.learnDetail.video[0].list[0].id || '')
|
|
|
+ }
|
|
|
},
|
|
|
/**
|
|
|
* 点击目录的每一集:
|