音频
This commit is contained in:
@@ -18,11 +18,14 @@
|
||||
<common-video
|
||||
:isfresh="isfresh"
|
||||
v-if="isfresh"
|
||||
:secondCountDown="secondCountDown"
|
||||
@handleFresh="handleFresh"
|
||||
@changeScreen="changeScreen"
|
||||
@changeScreenLoading="changeScreenLoading"
|
||||
ref="commonVideo"
|
||||
:currentVideoId="currentVideoId"
|
||||
:currentVideoIndex="currentVideoIndex"
|
||||
:curriculumData="curriculumData"
|
||||
>
|
||||
</common-video>
|
||||
<view style="color: #fff"></view>
|
||||
@@ -246,6 +249,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
secondCountDown: 10,
|
||||
isFullScreen: false,
|
||||
screenLoading: false,
|
||||
isfresh: false,
|
||||
@@ -315,6 +319,7 @@ export default {
|
||||
curriculumInfo: "app/phone.do?getCourseInfo",
|
||||
},
|
||||
currentVideoId: null,
|
||||
currentVideoIndex: null,
|
||||
currentSelectVideoId: null,
|
||||
currentSelectVideo: {},
|
||||
};
|
||||
@@ -331,6 +336,14 @@ export default {
|
||||
computed: {
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
watch: {
|
||||
currentVideoId() {
|
||||
this.currentVideoIndex = this.videoArray.findIndex(
|
||||
|
||||
(e) => e.id == this.currentVideoId
|
||||
); console.log('that.currentVideoIndex at line 3401111111111111:', this.currentVideoIndex)
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
changeScreenLoading(status) {
|
||||
this.screenLoading = status;
|
||||
@@ -355,9 +368,9 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
// this.$refs.commonVideo.destory();
|
||||
// if (data.id != this.currentVideoId) {
|
||||
this.currentVideo = data;
|
||||
this.currentVideo = data;
|
||||
this.currentVideoId = data.id;
|
||||
|
||||
|
||||
this.isfresh = true;
|
||||
// }
|
||||
});
|
||||
@@ -411,10 +424,10 @@ export default {
|
||||
.then(async (res) => {
|
||||
that.curriculumData = res.data.detail;
|
||||
that.videoArray = res.data.videos;
|
||||
if (that.videoArray.length > 0) {that.currentVideo = that.videoArray[0];
|
||||
if (that.videoArray.length > 0) {
|
||||
that.currentVideo = that.videoArray[0];
|
||||
that.currentVideoId = that.videoArray[0].id;
|
||||
|
||||
|
||||
that.isfresh = true;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user