tuisong
This commit is contained in:
@@ -3,11 +3,7 @@
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<template v-show="!screenLoading">
|
||||
<z-nav-bar
|
||||
bgColor="#333"
|
||||
fontColor="#fff"
|
||||
:title="options.navTitle"
|
||||
></z-nav-bar>
|
||||
<z-nav-bar bgColor="#333" fontColor="#fff" title="教学内容"></z-nav-bar>
|
||||
|
||||
<view
|
||||
class="contentBox curriculum_box"
|
||||
@@ -19,13 +15,12 @@
|
||||
<common-video
|
||||
@changeScreen="changeScreen"
|
||||
@changeScreenLoading="changeScreenLoading"
|
||||
v-if="isfresh"
|
||||
ref="commonVideo"
|
||||
:currentVideo="currentVideo"
|
||||
:currentVideoList="videoArray"
|
||||
>
|
||||
</common-video>
|
||||
<view style="height: 200px" v-else></view>
|
||||
<!-- <view style="height: 200px" v-else></view> -->
|
||||
</view>
|
||||
|
||||
<!-- <common-sticky
|
||||
@@ -43,15 +38,18 @@
|
||||
class="scroll-Y"
|
||||
style="background-color: #fff"
|
||||
>
|
||||
<view class="" style="padding: 20rpx; font-size: 34rpx; color: #333"
|
||||
>课程:{{ options.navTitle }}
|
||||
</view>
|
||||
<view style="padding: 20rpx; margin-bottom: 40rpx">
|
||||
章节: {{ curriculumData.title }}
|
||||
</view>
|
||||
<view
|
||||
class="PM_font"
|
||||
style="padding: 20rpx; font-size: 40rpx; color: #3ab3ae"
|
||||
>视频教学</view
|
||||
>
|
||||
<view class="scroll-view-item">
|
||||
<view style="padding: 20rpx; margin-bottom: 40rpx">
|
||||
{{ curriculumData.title }}
|
||||
</view>
|
||||
<common-curriculum-video
|
||||
v-if="videoArray.length > 0"
|
||||
:detailInfo="curriculumData"
|
||||
@@ -69,15 +67,13 @@
|
||||
>
|
||||
<view class="scroll-view-item">
|
||||
<common-rich-detail :detailInfo="{ ...curriculumData, title: '' }">
|
||||
<template #richHeadImg>
|
||||
<image
|
||||
:src="curriculumData.imgUrl"
|
||||
mode="widthFix"
|
||||
class="headImage"
|
||||
></image>
|
||||
|
||||
<!-- <image :src="detailInfo.imgUrl" v-if="detailInfo.imgUrl" mode="widthFix" class="headImage"></image> -->
|
||||
</template>
|
||||
<image
|
||||
v-if="curriculumData.imgUrl"
|
||||
@click="previewImage(curriculumData.imgUrl)"
|
||||
:src="curriculumData.imgUrl"
|
||||
mode="widthFix"
|
||||
class="headImage"
|
||||
></image>
|
||||
</common-rich-detail>
|
||||
</view>
|
||||
</scroll-view>
|
||||
@@ -222,7 +218,18 @@
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<view style="background-color: red;position: fixed;top: 0;left: 0;right: 0;bottom: 0;" v-show="screenLoading" > </view>
|
||||
<view
|
||||
style="
|
||||
background-color: red;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
"
|
||||
v-show="screenLoading"
|
||||
>
|
||||
</view>
|
||||
<!-- <u-modal
|
||||
:show="show"
|
||||
:title="modalInfo.title"
|
||||
@@ -232,7 +239,7 @@
|
||||
@cancel="hancleModalCancel"
|
||||
></u-modal> -->
|
||||
|
||||
<z-navigation></z-navigation>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -320,10 +327,16 @@ export default {
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
plus.screen.lockOrientation("default");
|
||||
|
||||
this.options = options;
|
||||
this.options = options;
|
||||
this.getCourseDescriptionData();
|
||||
// plus.screen.lockOrientation("default");
|
||||
this.screenLoading = false;
|
||||
this.currentCateIndex = 0;
|
||||
// #ifdef APP-PLUS
|
||||
// plus.screen.unlockOrientation(); //解除锁定屏幕方向
|
||||
// plus.screen.lockOrientation("portrait-primary");
|
||||
|
||||
|
||||
// this.getUserInfo()
|
||||
// this.getCateList()
|
||||
},
|
||||
@@ -332,11 +345,6 @@ export default {
|
||||
// this.searchList = []
|
||||
},
|
||||
onShow() {
|
||||
this.screenLoading=false
|
||||
this.currentCateIndex = 0;
|
||||
// #ifdef APP-PLUS
|
||||
plus.screen.unlockOrientation(); //解除锁定屏幕方向
|
||||
plus.screen.lockOrientation("portrait-primary");
|
||||
// #endif
|
||||
},
|
||||
computed: {
|
||||
@@ -355,7 +363,7 @@ export default {
|
||||
this.$forceUpdate();
|
||||
},
|
||||
initVideo() {
|
||||
this.screenLoading=false;
|
||||
this.screenLoading = false;
|
||||
this.isfresh = false;
|
||||
this.$nextTick(() => {
|
||||
this.isfresh = true;
|
||||
@@ -368,16 +376,35 @@ export default {
|
||||
});
|
||||
},
|
||||
changeVideo(data) {
|
||||
console.log('data at line 370:', data)
|
||||
this.currentVideo = data;
|
||||
this.initVideo();
|
||||
this.isOpenMp3 = false;
|
||||
if (data.id != this.currentVideo.id) {
|
||||
clearInterval(this.$store.state.videoTimer);
|
||||
console.log(
|
||||
"父页面是否触发了切换视屏呀:",
|
||||
data.id,
|
||||
this.currentVideo.id
|
||||
);
|
||||
this.currentVideo = data;
|
||||
// setTimeout(() => {
|
||||
|
||||
this.$refs.commonVideo.changeVideo({
|
||||
currentVideo: data,
|
||||
currentVideoList: this.videoArray,
|
||||
});
|
||||
// }, 200);
|
||||
// // handleEnd
|
||||
// this.$refs.commonVideo.handleEnd();
|
||||
|
||||
// this.currentVideo = data;
|
||||
// this.initVideo();
|
||||
// this.isOpenMp3 = false;
|
||||
}
|
||||
|
||||
console.log("data at line 380111111111111111111:", data.type);
|
||||
|
||||
// var mynavData = JSON.stringify(data); // 这里转换成 字符串
|
||||
|
||||
// if (data.type == 0 || data.type == 2) {
|
||||
// //1 mp4 2 mp3
|
||||
// //0 mp4 2 mp3
|
||||
// uni.navigateTo({
|
||||
// url: `/pages/curriculum/order/curriculum/videoDetail?data=${mynavData}`,
|
||||
// });
|
||||
@@ -449,12 +476,12 @@ export default {
|
||||
// id: "16457",
|
||||
};
|
||||
var that = this;
|
||||
console.log(this.$store.state, "11111111111");
|
||||
|
||||
|
||||
$http
|
||||
.request({
|
||||
// url: "book/buyOrder/buySave",
|
||||
url: `${this.urlList.detail}`,
|
||||
url:'sociology/course/getCourseCatalogueChapterDetail',
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data,
|
||||
header: {
|
||||
@@ -462,7 +489,9 @@ export default {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
.then(async (res) => {
|
||||
console.log(this.$store.state, "11111111111");
|
||||
console.log('res at line 491:', res)
|
||||
that.curriculumData = res.data.detail;
|
||||
that.videoArray = res.data.videos;
|
||||
if (that.videoArray.length > 0) {
|
||||
@@ -902,6 +931,7 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "@/style/mixin.scss";
|
||||
|
||||
.u-grid-list {
|
||||
// height: 40rpx;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user