|
@@ -65,20 +65,34 @@
|
|
|
@getScrollTop="getScrollTop"
|
|
|
@getMore="getMore"
|
|
|
@getActiveDanmus="getActiveDanmus"></commentBox>
|
|
|
- <view class="title-content" id="title-contentnav" v-show="openCommentStatus!=1">
|
|
|
- <!-- 答题时展示小节课程名,其他展示课程名 -->
|
|
|
- <!-- 小节课程名 -->
|
|
|
- <view class="subtitlebox" v-if="isLogin&&isAddKf==1">
|
|
|
- {{courseInfo.title}}
|
|
|
+ <view id="title-contentnav">
|
|
|
+ <view class="title-content" v-if="openCommentStatus!=1">
|
|
|
+ <!-- 答题时展示小节课程名,其他展示课程名 -->
|
|
|
+ <!-- 小节课程名 -->
|
|
|
+ <view class="subtitlebox" v-if="isLogin&&isAddKf==1">
|
|
|
+ {{courseInfo.title}}
|
|
|
+ </view>
|
|
|
+ <!-- 课程名字 -->
|
|
|
+ <view class="miantitlebox" v-else>
|
|
|
+ {{courseInfo.courseName}}
|
|
|
+ </view>
|
|
|
+ <!-- 投诉 -->
|
|
|
+ <view class="warning" @click="feedback" v-if="isLogin&&videoId">
|
|
|
+ <image src="https://cos.his.cdwjyyh.com/fs/20250606/66a44bedde6c4e9d937f4bf866aace40.png"></image>
|
|
|
+ <text>投诉</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <!-- 课程名字 -->
|
|
|
- <view class="miantitlebox" v-else>
|
|
|
- {{courseInfo.courseName}}
|
|
|
+ <view class="tabbox-bar" v-if="openCommentStatus==1">
|
|
|
+ <view class="tabbox">
|
|
|
+ <view :class="currentTab == nav.id ? 'tabbox-active':''" v-for="nav in navList" :key="nav.id" @click="handleTab(nav.id)">{{nav.name}}</view>
|
|
|
+ </view>
|
|
|
+ <!-- 投诉 -->
|
|
|
+ <view class="warning" @click="feedback">
|
|
|
+ <image src="https://cos.his.cdwjyyh.com/fs/20250606/66a44bedde6c4e9d937f4bf866aace40.png"></image>
|
|
|
+ <text>投诉</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="tabbox" v-if="openCommentStatus==1">
|
|
|
- <view :class="currentTab == nav.id ? 'tabbox-active':''" v-for="nav in navList" :key="nav.id" @click="handleTab(nav.id)">{{nav.name}}</view>
|
|
|
- </view>
|
|
|
<scroll-view
|
|
|
class="scroll-view"
|
|
|
:style="{height: height}"
|
|
@@ -118,7 +132,7 @@
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
<!-- 线路 -->
|
|
|
- <view class="video-line" @click="openPop" v-if="isLogin&&isAddKf==1">
|
|
|
+ <view class="video-line" v-if="isLogin&&isAddKf==1" @click="openPop">
|
|
|
<image :src="baseUrl+'/images/changePlayer-icon.png'"></image>
|
|
|
<text>线路{{numberToChinese(lineIndex + 1)}}</text>
|
|
|
</view>
|
|
@@ -138,7 +152,7 @@
|
|
|
</view>
|
|
|
</uni-popup>
|
|
|
<!-- 发送弹幕 -->
|
|
|
- <view class="video-line danmu-line" @click="openDanmu(0)" v-if="isLogin&&isAddKf==1&&openCommentStatus==2">
|
|
|
+ <view class="video-line danmu-line" v-if="isLogin&&isAddKf==1&&openCommentStatus==2" @click="openDanmu(0)" >
|
|
|
<image class="set_image" src="https://cos.his.cdwjyyh.com/fs/20250418/5e508642737a44169061382566043ac9.png" mode="aspectFill"></image>
|
|
|
<text>发弹幕</text>
|
|
|
</view>
|
|
@@ -147,17 +161,19 @@
|
|
|
<view class="danmuPopup" :style="{marginLeft:isfull ? statusBarHeight+'px': 0,marginBottom: danmuboxHeight+'px'}">
|
|
|
<view class="danmuPopup-head border-line">
|
|
|
<image class="danmu-icon" :src="showDanmu==0?'/static/images/danmu-off.png':'/static/images/danmu-on.png'" mode="heightFix" @click="switchDanmu()"></image>
|
|
|
- <u-input
|
|
|
- class="danmuPopup-input"
|
|
|
- placeholder="发个弹幕吧~"
|
|
|
- border="surround"
|
|
|
- shape="circle"
|
|
|
- :focus="focus"
|
|
|
- :adjustPosition="false"
|
|
|
- :autoBlur="true"
|
|
|
- maxlength="50"
|
|
|
- clearable
|
|
|
- v-model.trim="inputText"></u-input>
|
|
|
+ <view class="u-border">
|
|
|
+ <u-input
|
|
|
+ class="danmuPopup-input"
|
|
|
+ placeholder="发个弹幕吧~"
|
|
|
+ border="border"
|
|
|
+ :focus="focus"
|
|
|
+ :adjustPosition="false"
|
|
|
+ :autoBlur="true"
|
|
|
+ maxlength="50"
|
|
|
+ v-model.trim="inputText">
|
|
|
+ </u-input>
|
|
|
+ <text style="font-size: 24rpx;color: #bbb;margin-left: 10rpx;">{{inputText?inputText.trim().length:0}}/50</text>
|
|
|
+ </view>
|
|
|
<button class="danmuPopup-send" @click="handleChatInput">发送</button>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -213,7 +229,7 @@
|
|
|
<view class="footer-btn" v-if="!isLogin || isAddKf !=1" @click="submit">
|
|
|
<text>立即学习</text>
|
|
|
</view>
|
|
|
- <view v-if="currentTab==1&&isLogin&&isAddKf==1&¤tTab==1&&quesList&&quesList.length>0" class="footer-btn footer-btn-border" @click="submit">
|
|
|
+ <view v-if="isLogin&&isAddKf==1&¤tTab==1&&quesList&&quesList.length>0" class="footer-btn footer-btn-border" @click="submit">
|
|
|
<image class="footer-btn-img" :src="baseUrl+'/images/red_envelope_btnimg.png'" mode="aspectFill"></image>
|
|
|
<text>提交答案领取奖励</text>
|
|
|
</view>
|
|
@@ -226,8 +242,8 @@
|
|
|
<view class="footer-tips">重庆云联融智提供技术支持</view>
|
|
|
</view>
|
|
|
<view v-show="currentTab==2">
|
|
|
- <view class="chatinput">
|
|
|
- <input class="uni-input" v-model.trim="inputText" maxlength="140" placeholder="发消息···" confirm-type="send" @confirm="handleChatInput" />
|
|
|
+ <view class="chatinput" :style="{bottom:danmuboxHeight>0?danmuboxHeight+'px':'calc(var(--window-bottom) + 24rpx)'}">
|
|
|
+ <input class="uni-input" v-model.trim="inputText" :adjustPosition="false" :autoBlur="false" maxlength="140" placeholder="发消息···" confirm-type="send" @confirm="handleChatInput" />
|
|
|
<button class="send" @click="handleChatInput">发送</button>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -253,6 +269,7 @@
|
|
|
sendReward,
|
|
|
loginByMp,
|
|
|
getRealLink,
|
|
|
+ errorLogUpload,
|
|
|
} from "@/api/course.js"
|
|
|
export default {
|
|
|
components: {
|
|
@@ -280,7 +297,7 @@
|
|
|
statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
|
|
|
scrollTop: 0,
|
|
|
height: '0px',
|
|
|
- isLogin: true,
|
|
|
+ isLogin: false,
|
|
|
videoUrl: "",
|
|
|
videoId: "",
|
|
|
//现在的时长
|
|
@@ -389,21 +406,8 @@
|
|
|
openCommentStatus: 3,
|
|
|
showAnswerTip: false,
|
|
|
showDanmu: 1,
|
|
|
- activeDanmus:[]
|
|
|
- }
|
|
|
- },
|
|
|
- computed: {
|
|
|
- isAnswer() {
|
|
|
- return (item, name) => {
|
|
|
- if (item.type == 1) {
|
|
|
- return item.answer == name
|
|
|
- } else if (item.type == 2) {
|
|
|
- const array = item.answer.split(',')
|
|
|
- return array.some(i => i == name)
|
|
|
- } else {
|
|
|
- return false
|
|
|
- }
|
|
|
- }
|
|
|
+ activeDanmus:[],
|
|
|
+ flagTime: 0
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
@@ -453,14 +457,8 @@
|
|
|
if (this.player) {
|
|
|
this.player.pause()
|
|
|
}
|
|
|
- this.$isLoginCourse().then(res => {
|
|
|
- if(res){
|
|
|
- this.getFinishCourseVideo()
|
|
|
- this.getInternetTraffic()
|
|
|
- }
|
|
|
- },
|
|
|
- rej => {}
|
|
|
- );
|
|
|
+ this.getFinishCourseVideo()
|
|
|
+ this.getInternetTraffic()
|
|
|
// if (this.interval != null) {
|
|
|
// clearInterval(this.interval)
|
|
|
// this.interval = null
|
|
@@ -471,14 +469,8 @@
|
|
|
clearInterval(this.interval)
|
|
|
this.interval = null
|
|
|
}
|
|
|
- this.$isLoginCourse().then(res => {
|
|
|
- if(res){
|
|
|
- this.getFinishCourseVideo()
|
|
|
- this.getInternetTraffic()
|
|
|
- }
|
|
|
- },
|
|
|
- rej => {}
|
|
|
- );
|
|
|
+ this.getFinishCourseVideo()
|
|
|
+ this.getInternetTraffic()
|
|
|
this.clearIntegral()
|
|
|
// #ifndef H5
|
|
|
uni.offKeyboardHeightChange(this.keyboardHeightChange);
|
|
@@ -578,7 +570,7 @@
|
|
|
this.getErrMsg('','waiting')
|
|
|
},
|
|
|
fullscreenchange(event) {
|
|
|
- this.isfull = e.detail.fullScreen
|
|
|
+ this.isfull = event.detail.fullScreen
|
|
|
if(this.isfull) {
|
|
|
this.$refs.danmuBox&&this.$refs.danmuBox.initTracks()
|
|
|
}
|
|
@@ -603,7 +595,7 @@
|
|
|
.boundingClientRect((data) => {
|
|
|
if(data) {
|
|
|
this.height =
|
|
|
- `calc(100vh - ${data.height}px - 420rpx - ${this.statusBarHeight}px - 44px - 88rpx)`
|
|
|
+ `calc(100vh - ${data.height}px - 420rpx - ${this.statusBarHeight}px - 100px - 88rpx)`
|
|
|
}
|
|
|
})
|
|
|
.exec();
|
|
@@ -1009,7 +1001,7 @@
|
|
|
this.$refs.kfPopup.close()
|
|
|
},
|
|
|
getFinishCourseVideo() {
|
|
|
- if (!this.playTime || !this.isCheckRealUrl) return
|
|
|
+ if (!this.isLogin||!this.playTime || !this.isCheckRealUrl) return
|
|
|
// {videoId: this.videoId,duration:this.playTime}
|
|
|
const param = {
|
|
|
duration: this.playTime,
|
|
@@ -1019,7 +1011,7 @@
|
|
|
},
|
|
|
// 每十分钟获得积分
|
|
|
getIntegralByH5Video() {
|
|
|
- if(!this.isCheckRealUrl) return
|
|
|
+ if(!this.isLogin||!this.isCheckRealUrl) return
|
|
|
const param = {
|
|
|
duration: this.playTime,
|
|
|
...this.urlOption
|
|
@@ -1038,7 +1030,7 @@
|
|
|
},
|
|
|
// 缓冲
|
|
|
getInternetTraffic() {
|
|
|
- if(!this.isCheckRealUrl) return
|
|
|
+ if(!this.isLogin||!this.isCheckRealUrl) return
|
|
|
const playVideoTime = Math.ceil(this.playTime / this.duration * 100) // 播放百分比
|
|
|
if(this.bufferRate == 0 || this.bufferRate < playVideoTime) {
|
|
|
this.bufferRate = playVideoTime
|
|
@@ -1054,7 +1046,6 @@
|
|
|
getInternetTraffic(param)
|
|
|
},
|
|
|
getErrMsg(err,type) {
|
|
|
- return
|
|
|
let msgerr = {
|
|
|
errType: type || 'error',
|
|
|
videoUrl: this.videoUrl,
|
|
@@ -1191,6 +1182,7 @@
|
|
|
switchDanmu() {
|
|
|
this.showDanmu = this.showDanmu == 1 ? 0:1
|
|
|
if(this.showDanmu == 0&&this.$refs.danmuBox) {
|
|
|
+ this.$refs.danmuPopup.close()
|
|
|
this.activeDanmus = []
|
|
|
this.$refs.danmuBox.activeDanmus = []
|
|
|
this.$refs.danmuBox.initTracks()
|
|
@@ -1263,6 +1255,14 @@
|
|
|
this.$refs.danmuBox&&this.$refs.danmuBox.animationend(moveItem, i)
|
|
|
}
|
|
|
},
|
|
|
+ feedback() {
|
|
|
+ const userId = this.user.userId || ''
|
|
|
+ const courseId = this.urlOption.courseId || ''
|
|
|
+ const videoId = this.urlOption.videoId || ''
|
|
|
+ uni.navigateTo({
|
|
|
+ url: './feedback?userId='+userId+'&courseId='+courseId+'&videoId='+videoId
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -1702,6 +1702,7 @@
|
|
|
font-size: 28rpx;
|
|
|
line-height: 1.6;
|
|
|
box-sizing: border-box;
|
|
|
+ @include u-flex(row, center, space-between);
|
|
|
.title {
|
|
|
font-size: 36rpx;
|
|
|
font-weight: 500;
|
|
@@ -1713,6 +1714,17 @@
|
|
|
color: #666666;
|
|
|
}
|
|
|
}
|
|
|
+ .warning {
|
|
|
+ flex-shrink: 0;
|
|
|
+ color: #888;
|
|
|
+ font-size: 24rpx;
|
|
|
+ @include u-flex(column, center, center);
|
|
|
+ image {
|
|
|
+ flex-shrink: 0;
|
|
|
+ height: 36rpx;
|
|
|
+ width: 36rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
.video-line {
|
|
|
min-width: 140rpx;
|
|
|
max-width: 200rpx;
|
|
@@ -1830,6 +1842,12 @@
|
|
|
.danmuPopup {
|
|
|
background-color: #fff;
|
|
|
padding-bottom: calc(var(--window-bottom) + 10px);
|
|
|
+ .u-border {
|
|
|
+ flex: 1;
|
|
|
+ @include u-flex(row,center,flex-start);
|
|
|
+ padding: 0 6rpx;
|
|
|
+ border-radius: 6px;
|
|
|
+ }
|
|
|
&-head {
|
|
|
width: 100%;
|
|
|
padding: 10px;
|
|
@@ -1839,7 +1857,7 @@
|
|
|
.danmu-icon {
|
|
|
height: 24px;
|
|
|
width: 24px;
|
|
|
- margin-right: 12px;
|
|
|
+ margin-right: 10px;
|
|
|
}
|
|
|
}
|
|
|
&-input {
|
|
@@ -1855,7 +1873,7 @@
|
|
|
padding: 5px 15px;
|
|
|
box-sizing: border-box;
|
|
|
background: #FF5C03 !important;
|
|
|
- border-radius: 22px;
|
|
|
+ border-radius: 6px;
|
|
|
font-family: PingFang SC, PingFang SC;
|
|
|
font-weight: 500;
|
|
|
font-size: 15px;
|
|
@@ -1895,7 +1913,16 @@
|
|
|
pointer-events: none;
|
|
|
object-fit: cover;
|
|
|
}
|
|
|
+ .tabbox-bar {
|
|
|
+ @include u-flex(row, center, flex-start);
|
|
|
+ background-color: #fff;
|
|
|
+ .warning {
|
|
|
+ flex-shrink: 0;
|
|
|
+ padding-right: 20rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
.tabbox {
|
|
|
+ flex: 1;
|
|
|
@include u-flex(row, center, center);
|
|
|
border-bottom: 2rpx solid #F5F7FA;
|
|
|
height: 44px;
|
|
@@ -1924,7 +1951,6 @@
|
|
|
left: 32rpx;
|
|
|
right: 32rpx;
|
|
|
z-index: 999;
|
|
|
- bottom: calc(var(--window-bottom) + 24rpx);
|
|
|
height: 96rpx;
|
|
|
background-color: green;
|
|
|
background: #FFFFFF;
|
|
@@ -1966,7 +1992,7 @@
|
|
|
border-radius: 50%;
|
|
|
height: 100rpx;
|
|
|
width: 100rpx;
|
|
|
- font-size: 30rpx;
|
|
|
+ font-size: 25rpx;
|
|
|
text-align: center;
|
|
|
padding: 10rpx;
|
|
|
@include u-flex(row, center, center);
|