|
@@ -54,6 +54,7 @@
|
|
|
src="https://cos.his.cdwjyyh.com/fs/20250418/beaf9df1a6204b8babc3e28d9b563c62.png"
|
|
src="https://cos.his.cdwjyyh.com/fs/20250418/beaf9df1a6204b8babc3e28d9b563c62.png"
|
|
|
@click="openDanmu(1)"></cover-image>
|
|
@click="openDanmu(1)"></cover-image>
|
|
|
</cover-view>
|
|
</cover-view>
|
|
|
|
|
+ <treasureChest ref="treasureChest" :isfull="isfull" :onHide="onHide" :boxList="fsUserCourseRewardRoundStatusVO" @claimFun="claimFun"></treasureChest>
|
|
|
</video>
|
|
</video>
|
|
|
</view>
|
|
</view>
|
|
|
<!-- 弹幕方法 -->
|
|
<!-- 弹幕方法 -->
|
|
@@ -219,6 +220,8 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</uni-popup>
|
|
</uni-popup>
|
|
|
|
|
+ <!-- 展示兑换奖品弹窗 -->
|
|
|
|
|
+ <appPopup ref="appPopup"></appPopup>
|
|
|
<!-- 客服二维码弹窗 -->
|
|
<!-- 客服二维码弹窗 -->
|
|
|
<uni-popup ref="kfPopup" type="center" :mask-click="false">
|
|
<uni-popup ref="kfPopup" type="center" :mask-click="false">
|
|
|
<view class="kfqrcode-box">
|
|
<view class="kfqrcode-box">
|
|
@@ -247,7 +250,7 @@
|
|
|
<view>阅读并同意<text style="color: #ff5c03;" @click.stop="goWeb(0)">《用户协议》</text>和<text
|
|
<view>阅读并同意<text style="color: #ff5c03;" @click.stop="goWeb(0)">《用户协议》</text>和<text
|
|
|
style="color: #ff5c03;" @click.stop="goWeb(1)">《隐私协议》</text></view>
|
|
style="color: #ff5c03;" @click.stop="goWeb(1)">《隐私协议》</text></view>
|
|
|
</view> -->
|
|
</view> -->
|
|
|
- <view class="footer-tips">重庆云联融智提供技术支持</view>
|
|
|
|
|
|
|
+ <!-- <view class="footer-tips">重庆云联融智提供技术支持</view> -->
|
|
|
</view>
|
|
</view>
|
|
|
<view v-show="currentTab==2">
|
|
<view v-show="currentTab==2">
|
|
|
<view class="chatinput" :style="{bottom:danmuboxHeight>0?danmuboxHeight+'px':'calc(var(--window-bottom) + 24rpx)'}">
|
|
<view class="chatinput" :style="{bottom:danmuboxHeight>0?danmuboxHeight+'px':'calc(var(--window-bottom) + 24rpx)'}">
|
|
@@ -259,6 +262,8 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+ import appPopup from "./components/appPopup.vue"
|
|
|
|
|
+ import treasureChest from "./components/treasureChest.vue"
|
|
|
import networkError from "./components/networkError.vue"
|
|
import networkError from "./components/networkError.vue"
|
|
|
import ques from "./components/ques.vue"
|
|
import ques from "./components/ques.vue"
|
|
|
import descInfo from "./components/descInfo.vue"
|
|
import descInfo from "./components/descInfo.vue"
|
|
@@ -279,7 +284,10 @@
|
|
|
loginByMp,
|
|
loginByMp,
|
|
|
getRealLink,
|
|
getRealLink,
|
|
|
errorLogUpload,
|
|
errorLogUpload,
|
|
|
- getConfigByKey
|
|
|
|
|
|
|
+ getConfigByKey,
|
|
|
|
|
+ claim,
|
|
|
|
|
+ getVideoRewardTypes,
|
|
|
|
|
+ getVideoRewardRules
|
|
|
} from "@/api/course.js"
|
|
} from "@/api/course.js"
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
@@ -287,20 +295,22 @@
|
|
|
descInfo,
|
|
descInfo,
|
|
|
commentBox,
|
|
commentBox,
|
|
|
ques,
|
|
ques,
|
|
|
- networkError
|
|
|
|
|
|
|
+ networkError,
|
|
|
|
|
+ treasureChest,
|
|
|
|
|
+ appPopup
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
baseUrl:uni.getStorageSync('requestPath'),
|
|
baseUrl:uni.getStorageSync('requestPath'),
|
|
|
- // 1 红包 2 积分
|
|
|
|
|
|
|
+ // 1 红包 2 芳华币
|
|
|
rewardType: [{
|
|
rewardType: [{
|
|
|
name: '红包奖励',
|
|
name: '红包奖励',
|
|
|
value: 1
|
|
value: 1
|
|
|
}, {
|
|
}, {
|
|
|
- name: '积分奖励',
|
|
|
|
|
|
|
+ name: '芳华币奖励',
|
|
|
value: 2
|
|
value: 2
|
|
|
}],
|
|
}],
|
|
|
- currentReward: 1,
|
|
|
|
|
|
|
+ currentReward: 2,
|
|
|
player: null,
|
|
player: null,
|
|
|
loading: true,
|
|
loading: true,
|
|
|
progress: 0,
|
|
progress: 0,
|
|
@@ -352,7 +362,7 @@
|
|
|
checked: true,
|
|
checked: true,
|
|
|
isFinish: 0, // 是否完课
|
|
isFinish: 0, // 是否完课
|
|
|
interval: null,
|
|
interval: null,
|
|
|
- intervalIntegral: null, // 积分定时
|
|
|
|
|
|
|
+ intervalIntegral: null, // 芳华币定时
|
|
|
options: {
|
|
options: {
|
|
|
sources: [{
|
|
sources: [{
|
|
|
src: ""
|
|
src: ""
|
|
@@ -395,7 +405,6 @@
|
|
|
// 是否获取到对应观看者的真实链接
|
|
// 是否获取到对应观看者的真实链接
|
|
|
isCheckRealUrl: false,
|
|
isCheckRealUrl: false,
|
|
|
courseLogo: '',
|
|
courseLogo: '',
|
|
|
- isfull: false,
|
|
|
|
|
navList:[{
|
|
navList:[{
|
|
|
id: 0,
|
|
id: 0,
|
|
|
name: '介绍'
|
|
name: '介绍'
|
|
@@ -419,7 +428,9 @@
|
|
|
showDanmu: 1,
|
|
showDanmu: 1,
|
|
|
activeDanmus:[],
|
|
activeDanmus:[],
|
|
|
flagTime: 0,
|
|
flagTime: 0,
|
|
|
- notice: ''
|
|
|
|
|
|
|
+ notice: '',
|
|
|
|
|
+ fsUserCourseRewardRoundStatusVO: [],
|
|
|
|
|
+ onHide: false
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
@@ -437,6 +448,7 @@
|
|
|
if (this.videoId) {
|
|
if (this.videoId) {
|
|
|
this.getH5CourseByVideo()
|
|
this.getH5CourseByVideo()
|
|
|
this.getConfigByKey()
|
|
this.getConfigByKey()
|
|
|
|
|
+ // this.getVideoRewardTypes()
|
|
|
}
|
|
}
|
|
|
this.sortLink = this.urlOption.link || ''
|
|
this.sortLink = this.urlOption.link || ''
|
|
|
this.getMenuButton()
|
|
this.getMenuButton()
|
|
@@ -445,6 +457,7 @@
|
|
|
// #endif
|
|
// #endif
|
|
|
},
|
|
},
|
|
|
onShow() {
|
|
onShow() {
|
|
|
|
|
+ this.onHide = false
|
|
|
this.tipsOpen = false
|
|
this.tipsOpen = false
|
|
|
// this.isLogin = this.$isLoginCourse()
|
|
// this.isLogin = this.$isLoginCourse()
|
|
|
this.uuId = generateRandomString(16)
|
|
this.uuId = generateRandomString(16)
|
|
@@ -467,6 +480,7 @@
|
|
|
this.getHeight()
|
|
this.getHeight()
|
|
|
},
|
|
},
|
|
|
onHide() {
|
|
onHide() {
|
|
|
|
|
+ this.onHide = true
|
|
|
// this.player = uni.createVideoContext('video-content-box');
|
|
// this.player = uni.createVideoContext('video-content-box');
|
|
|
if (this.player) {
|
|
if (this.player) {
|
|
|
this.player.pause()
|
|
this.player.pause()
|
|
@@ -502,6 +516,13 @@
|
|
|
// #endif
|
|
// #endif
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ getVideoRewardTypes() {
|
|
|
|
|
+ getVideoRewardTypes({...this.urlOption}).then(res=>{
|
|
|
|
|
+ if(res.code == 200) {
|
|
|
|
|
+ this.rewardType = res.data
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
refreshAll() {
|
|
refreshAll() {
|
|
|
if (this.videoId) {
|
|
if (this.videoId) {
|
|
|
this.getH5CourseByVideo()
|
|
this.getH5CourseByVideo()
|
|
@@ -574,9 +595,14 @@
|
|
|
} else {
|
|
} else {
|
|
|
this.showAnswerTip = false
|
|
this.showAnswerTip = false
|
|
|
}
|
|
}
|
|
|
- if (Math.floor(e.detail.currentTime) != this.flagTime &&this.openCommentStatus == 2) {
|
|
|
|
|
|
|
+ if (Math.floor(e.detail.currentTime) != this.flagTime) {
|
|
|
this.flagTime = Math.floor(e.detail.currentTime)
|
|
this.flagTime = Math.floor(e.detail.currentTime)
|
|
|
- this.$refs.danmuBox&&this.$refs.danmuBox.checkDanmu(this.flagTime)
|
|
|
|
|
|
|
+ if(this.fsUserCourseRewardRoundStatusVO&&this.fsUserCourseRewardRoundStatusVO.length>0) {
|
|
|
|
|
+ this.$refs.treasureChest&&this.$refs.treasureChest.showTreasure(this.flagTime)
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this.openCommentStatus == 2) {
|
|
|
|
|
+ this.$refs.danmuBox&&this.$refs.danmuBox.checkDanmu(this.flagTime)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
changeTime(that,e) {
|
|
changeTime(that,e) {
|
|
@@ -637,7 +663,7 @@
|
|
|
.boundingClientRect((data) => {
|
|
.boundingClientRect((data) => {
|
|
|
if(data) {
|
|
if(data) {
|
|
|
this.height =
|
|
this.height =
|
|
|
- `calc(100vh - ${data.height}px - 420rpx - ${this.statusBarHeight}px - 100px - 88rpx)`
|
|
|
|
|
|
|
+ `calc(100vh - ${data.height}px - 420rpx - ${this.statusBarHeight}px - 80px - 88rpx)`
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
.exec();
|
|
.exec();
|
|
@@ -666,7 +692,7 @@
|
|
|
clearInterval(this.intervalIntegral)
|
|
clearInterval(this.intervalIntegral)
|
|
|
this.intervalIntegral = null
|
|
this.intervalIntegral = null
|
|
|
}
|
|
}
|
|
|
- // 观看10分钟获得积分
|
|
|
|
|
|
|
+ // 观看10分钟获得芳华币
|
|
|
this.intervalIntegral = setInterval(function() {
|
|
this.intervalIntegral = setInterval(function() {
|
|
|
that.getIntegralByH5Video()
|
|
that.getIntegralByH5Video()
|
|
|
}, 600000);
|
|
}, 600000);
|
|
@@ -729,18 +755,20 @@
|
|
|
this.lineList = lineList
|
|
this.lineList = lineList
|
|
|
this.courseLogo = res.config&&res.config.courseLogo
|
|
this.courseLogo = res.config&&res.config.courseLogo
|
|
|
this.viewCommentNum = res.config&&res.config.viewCommentNum || 200
|
|
this.viewCommentNum = res.config&&res.config.viewCommentNum || 200
|
|
|
- if(this.openCommentStatus == 3) {
|
|
|
|
|
- this.$refs.commentBox&&this.$refs.commentBox.closeWSocket()
|
|
|
|
|
- this.$refs.danmuBox&&this.$refs.danmuBox.closeWSocket()
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
const status = res.config&&res.config.openCommentStatus || 3
|
|
const status = res.config&&res.config.openCommentStatus || 3
|
|
|
if(status != this.openCommentStatus) {
|
|
if(status != this.openCommentStatus) {
|
|
|
|
|
+ if(this.openCommentStatus != 3&&status==3) {
|
|
|
|
|
+ this.$refs.commentBox&&this.$refs.commentBox.closeWSocket()
|
|
|
|
|
+ this.$refs.danmuBox&&this.$refs.danmuBox.closeWSocket()
|
|
|
|
|
+ }
|
|
|
this.openCommentStatus = status
|
|
this.openCommentStatus = status
|
|
|
}
|
|
}
|
|
|
this.currentTab = 1
|
|
this.currentTab = 1
|
|
|
if(this.openCommentStatus!=2 || this.showDanmu!=1) {
|
|
if(this.openCommentStatus!=2 || this.showDanmu!=1) {
|
|
|
this.activeDanmus = []
|
|
this.activeDanmus = []
|
|
|
}
|
|
}
|
|
|
|
|
+ this.fsUserCourseRewardRoundStatusVO = this.getBox(res)
|
|
|
if (!this.player || type == 'error') {
|
|
if (!this.player || type == 'error') {
|
|
|
this.lineIndex = this.config.defaultLine
|
|
this.lineIndex = this.config.defaultLine
|
|
|
this.videoUrl = lineList[this.lineIndex]
|
|
this.videoUrl = lineList[this.lineIndex]
|
|
@@ -952,6 +980,9 @@
|
|
|
title: res.msg,
|
|
title: res.msg,
|
|
|
icon: 'none'
|
|
icon: 'none'
|
|
|
})
|
|
})
|
|
|
|
|
+ if(res.code == 200) {
|
|
|
|
|
+ this.$refs.appPopup.openPop()
|
|
|
|
|
+ }
|
|
|
// if(res.code == 200) {
|
|
// if(res.code == 200) {
|
|
|
// //重构 发红包,后台通过OPENID发零钱到 账
|
|
// //重构 发红包,后台通过OPENID发零钱到 账
|
|
|
// //this.initWXConfig(res.package)
|
|
// //this.initWXConfig(res.package)
|
|
@@ -1064,7 +1095,7 @@
|
|
|
}
|
|
}
|
|
|
getFinishCourseVideo(param)
|
|
getFinishCourseVideo(param)
|
|
|
},
|
|
},
|
|
|
- // 每十分钟获得积分
|
|
|
|
|
|
|
+ // 每十分钟获得芳华币
|
|
|
getIntegralByH5Video() {
|
|
getIntegralByH5Video() {
|
|
|
if(!this.isLogin||!this.isCheckRealUrl) return
|
|
if(!this.isLogin||!this.isCheckRealUrl) return
|
|
|
const param = {
|
|
const param = {
|
|
@@ -1074,7 +1105,7 @@
|
|
|
getIntegralByH5Video(param).then(res => {
|
|
getIntegralByH5Video(param).then(res => {
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
- title: "积分+10",
|
|
|
|
|
|
|
+ title: "芳华币+10",
|
|
|
icon: "none"
|
|
icon: "none"
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
@@ -1317,6 +1348,38 @@
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
url: './feedback?userId='+userId+'&courseId='+courseId+'&videoId='+videoId
|
|
url: './feedback?userId='+userId+'&courseId='+courseId+'&videoId='+videoId
|
|
|
})
|
|
})
|
|
|
|
|
+ },
|
|
|
|
|
+ getBox(data) {
|
|
|
|
|
+ if(data.fsUserCourseRewardRoundStatusVO&&data.fsUserCourseRewardRoundStatusVO.length>0) {
|
|
|
|
|
+ const list = data.fsUserCourseRewardRoundStatusVO.map(item=>({
|
|
|
|
|
+ ...item,
|
|
|
|
|
+ time: Math.round(this.duration * Number(item.question || 0) * 0.01)
|
|
|
|
|
+ }))
|
|
|
|
|
+ return list
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return []
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ claimFun(val) {
|
|
|
|
|
+ claim({
|
|
|
|
|
+ ...this.urlOption,
|
|
|
|
|
+ second: val.time,
|
|
|
|
|
+ rewardId: val.rewardId,
|
|
|
|
|
+ status: val.status
|
|
|
|
|
+ }).then(res=>{
|
|
|
|
|
+ if(res.code == 200) {
|
|
|
|
|
+ this.$refs.treasureChest.claimSuccess(val.status)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$refs.treasureChest.close()
|
|
|
|
|
+ }
|
|
|
|
|
+ if(res.msg!="success") {
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: res.msg,
|
|
|
|
|
+ icon: 'none',
|
|
|
|
|
+ duration: 3000
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|