课程介绍页面调整

This commit is contained in:
@fawn-nine
2024-07-11 16:36:57 +08:00
parent e6411e6661
commit 8d39d98ac4
7 changed files with 2460 additions and 2473 deletions

View File

@@ -56,9 +56,10 @@
// importScripts('@/static/aliplayer/aliplayer-min.js') // importScripts('@/static/aliplayer/aliplayer-min.js')
export default { export default {
props: ["currentVideo", "currentVideoList"], props: ["currentVideo", "currentVideoList",'noRecored'],
data() { data() {
return { return {
// noRecored 为true时候不记录播放时长
//当前是否是全屏模式 //当前是否是全屏模式
isFullScreen: false, isFullScreen: false,
isfresh: false, isfresh: false,
@@ -75,6 +76,7 @@
isSetFirstTime: false, isSetFirstTime: false,
screenType: null, screenType: null,
videoUrl: null, videoUrl: null,
num:0,
}; };
}, },
computed: { computed: {
@@ -98,7 +100,9 @@
// plus.screen.lockOrientation("portrait-primary"); // plus.screen.lockOrientation("portrait-primary");
// #endif // #endif
this.timer = null; this.timer = null;
await this.setVideoTime();
await this.setVideoTime();
this.player.dispose(); this.player.dispose();
}, },
@@ -130,8 +134,8 @@
this.timer = setInterval(() => { this.timer = setInterval(() => {
var that = this; var that = this;
if (this.currentTime) { if (this.currentTime) {
that.setVideoTime();
console.log('我是onload定义的定时'); that.setVideoTime();
} }
}, 60000); }, 60000);
@@ -189,12 +193,12 @@
var that = this; var that = this;
if (this.currentTime) { if (this.currentTime) {
console.log('我是init定义的定时'); console.log('我是init定义的定时');
await that.setVideoTime(); await that.setVideoTime();
} }
}, 60000); }, 60000);
await this.getLive(); await this.getLive();
}, },
async getData(data) { async getData(data) {
if (!this.isSetFirstTime) { if (!this.isSetFirstTime) {
var netWork = this.videoData.userCourseVideoPositionEntity ? var netWork = this.videoData.userCourseVideoPositionEntity ?
this.videoData.userCourseVideoPositionEntity.position : this.videoData.userCourseVideoPositionEntity.position :
@@ -218,8 +222,8 @@
} }
} }
this.currentTime = this.firstTime; this.currentTime = this.firstTime;
console.log(this.firstTime, "这是第一次播放时长222"); console.log(this.firstTime, "这是第一次播放时长222",this.noRecored);
await this.setVideoTime(); await this.setVideoTime();
uni.setStorageSync("videoOssList", JSON.stringify(list)); uni.setStorageSync("videoOssList", JSON.stringify(list));
if (this.currentVideo.type == 0 || this.currentVideo.type == 2) { if (this.currentVideo.type == 0 || this.currentVideo.type == 2) {
@@ -309,10 +313,15 @@
var data = list.find((e) => e.id == this.videoData.id); var data = list.find((e) => e.id == this.videoData.id);
this.currentTime = data.time; this.currentTime = data.time;
console.log('this.currentTime at line 这是结束的时候掉的存储视频:', this.currentTime) console.log('this.currentTime at line 这是结束的时候掉的存储视频:', this.currentTime)
await this.setVideoTime(); await this.setVideoTime();
this.timer = null; this.timer = null;
}, },
setVideoTime(time) { setVideoTime(time) {
let thisBlur = JSON.parse(this.noRecored)
if(thisBlur){
console.log('本条视频不记录播放记录,是未购买且试听章节',thisBlur);
return
}
console.log("是否走了存储视屏," + this.videoData.id, this.currentTime, ); console.log("是否走了存储视屏," + this.videoData.id, this.currentTime, );
var data = { var data = {
videoId: this.videoData.id, videoId: this.videoData.id,
@@ -767,8 +776,10 @@
async receiveIsfresh(newValue) { async receiveIsfresh(newValue) {
if (newValue) { if (newValue) {
if (this.player) { if (this.player) {
this.timer = null; this.timer = null;
await this.setVideoTime();
await this.setVideoTime();
this.player.dispose(); this.player.dispose();
// this.player.seek(newValue); // this.player.seek(newValue);
} }

File diff suppressed because it is too large Load Diff

View File

@@ -360,6 +360,7 @@
} }
.jianjie { .jianjie {
line-height: 30rpx; height: 60rpx; overflow: hidden;
overflow: hidden!important; overflow: hidden!important;
margin-top: 10rpx; margin-top: 10rpx;
font-size: 24rpx; font-size: 24rpx;

View File

@@ -36,14 +36,14 @@
VIP畅学 VIP畅学
</view> </view>
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> --> <!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
<view class="imgcontainer" @click="onPageJump('/pages/course/myCourseLearn',item.id)"> <view class="imgcontainer" @click="onPageJump('/pages/course/courseDetail',item.id)">
<image v-if="item.image && item.image != ''" :src="item.image" mode="aspectFit"></image> <image v-if="item.image && item.image != ''" :src="item.image" mode="aspectFit"></image>
<!-- <image :src="item.image" mode="" @click="goDetail(item.productId)"></image> --> <!-- <image :src="item.image" mode="" @click="goDetail(item.productId)"></image> -->
<!-- <image v-else src="/static/nobg.jpg" mode="widthFix"></image> --> <!-- <image v-else src="/static/nobg.jpg" mode="widthFix"></image> -->
</view> </view>
<view class="buyItems"> <view class="buyItems">
<view class="txt555"> <view class="txt555">
<view class="" @click="onPageJump('/pages/course/myCourseLearn',item.id)"> <view class="" @click="onPageJump('/pages/course/courseDetail',item.id)">
{{item.title}} {{item.title}}
</view> </view>
</view> </view>
@@ -54,7 +54,7 @@
<!-- 收藏状态{{item.isStudying}} --> <!-- 收藏状态{{item.isStudying}} -->
<text class="add citem" v-if="item.isStudying == 0" @click="addCollection(item,index)">加入在学习</text> <text class="add citem" v-if="item.isStudying == 0" @click="addCollection(item,index)">加入在学习</text>
<text class="del citem" v-else @click="delCollection(item,index)">取消在学习</text> <text class="del citem" v-else @click="delCollection(item,index)">取消在学习</text>
<text class="citem btn_box" @click="onPageJump('/pages/course/myCourseLearn',item.id)">去学习</text> <text class="citem btn_box" @click="onPageJump('/pages/course/courseDetail',item.id)">去学习</text>
</view> </view>
</view> </view>
@@ -76,11 +76,11 @@
</view> </view>
<!-- {{userMsg}} --> <!-- {{userMsg}} -->
<!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> --> <!-- <view class="imgcontainer" :style="{backgroundImage:surl(item.image)}"> -->
<view class="imgcontainer" @click="onPageJump('/pages/course/myCourseLearn',item.id)"> <view class="imgcontainer" @click="onPageJump('/pages/course/courseDetail',item.id)">
<image :src="item.image" mode="aspectFit"></image> <image :src="item.image" mode="aspectFit"></image>
</view> </view>
<view class="buyItems"> <view class="buyItems">
<view class="txt555" @click="onPageJump('/pages/course/myCourseLearn',item.id)"> <view class="txt555" @click="onPageJump('/pages/course/courseDetail',item.id)">
{{item.title}} {{item.title}}
</view> </view>
<view class="jianjie" v-html="item.content"> <view class="jianjie" v-html="item.content">
@@ -88,7 +88,7 @@
<view class="collection"> <view class="collection">
<!-- <text class="add citem" v-if="item.isStudying == 0" @click="addCollection(item,index)">加入在学习</text> --> <!-- <text class="add citem" v-if="item.isStudying == 0" @click="addCollection(item,index)">加入在学习</text> -->
<text class="del citem" @click="delCollection(item,index)">取消在学习</text> <text class="del citem" @click="delCollection(item,index)">取消在学习</text>
<text class="citem btn_box" @click="onPageJump('/pages/course/myCourseLearn',item.id)">去学习</text> <text class="citem btn_box" @click="onPageJump('/pages/course/courseDetail',item.id)">去学习</text>
</view> </view>
</view> </view>
@@ -854,6 +854,7 @@
} }
.jianjie { .jianjie {
line-height: 30rpx; height: 60rpx; overflow: hidden;
margin-top: 10rpx; margin-top: 10rpx;
font-size: 24rpx; font-size: 24rpx;
@include bov(); @include bov();

View File

@@ -139,7 +139,7 @@
}, },
], ],
iosPaylist: [{ iosPaylist: [{
title: "apple pay支付", title: "IAP支付",
id: 3, id: 3,
imgUrl: require("@/static/icon/pay_2.png"), imgUrl: require("@/static/icon/pay_2.png"),
}, ], }, ],

View File

@@ -63,7 +63,7 @@
<text>正在学习</text> <text>正在学习</text>
</view> </view>
<view class="learn flexbox"> <view class="learn flexbox">
<view class="item" v-for="(item, index) in learnList" :key="index" @click="onPageJump('/pages/course/myCourseLearn',item.id)"> <view class="item" v-for="(item, index) in learnList" :key="index" @click="onPageJump('/pages/course/courseDetail',item.id)">
<view class="img" style="overflow: hidden;"> <view class="img" style="overflow: hidden;">
<image v-if="item.image && item.image != ''" :src="item.image" mode="aspectFit"></image> <image v-if="item.image && item.image != ''" :src="item.image" mode="aspectFit"></image>
<image v-else src="/static/nobg.jpg" mode="widthFix"></image> <image v-else src="/static/nobg.jpg" mode="widthFix"></image>

View File

@@ -109,7 +109,8 @@ var iap = {
} }
}) })
.catch((e) => { .catch((e) => {
console.log('后台验证失败=>',e); console.log('后台验证失败=>',e);
// that.finishTransaction(result);
}); });
}, },
} }