Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/video_app into test
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
<input type="number" v-model="money" placeholder="请输入金额"
|
<input type="number" v-model="money" placeholder="请输入金额"
|
||||||
style="font-size: 40upx;color: #333333;text-align: left;margin-left: 10upx;width: 80%;" />
|
style="font-size: 40upx;color: #333333;text-align: left;margin-left: 10upx;width: 80%;" />
|
||||||
</view>
|
</view>
|
||||||
<view @click="money = mayMoney" style="font-size: 30rpx;color: #333333;background: #ff7581;color: white;border-radius: 10rpx;padding: 7rpx 15rpx;">全部</view>
|
<view @click="money = mayMoney" style="font-size: 30rpx;color: #333333;background: #ff7581;color: white;border-radius: 10rpx;padding: 7rpx 15rpx;flex-shrink: 0;">全部</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view style="background: #E6E6E6;width: 100%;height: 1upx;"></view>
|
<view style="background: #E6E6E6;width: 100%;height: 1upx;"></view>
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view @click="getOut"
|
<view @click="getOut"
|
||||||
style="margin: 32upx;font-size: 18px;background: #ff7581;color: white;border-radius: 10px;height: 40px;line-height: 40px">
|
style="margin: 32upx;font-size: 18px;background: #ff7581;color: white;border-radius: 10px;height: 40px;line-height: 40px;">
|
||||||
提现
|
提现
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -218,8 +218,11 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let shouxufei = parseFloat(that.money * that.shouxufei).toFixed(2);
|
let shouxufei = parseFloat(that.money * that.shouxufei).toFixed(2);
|
||||||
if (parseFloat(that.mayMoney).toFixed(1) >= parseFloat(that.money) + shouxufei * 1) {
|
console.log(parseFloat(that.mayMoney))
|
||||||
if (parseFloat(that.money).toFixed(1) >= parseFloat(cashMoney)) {
|
console.log(parseFloat(that.money))
|
||||||
|
if (parseFloat(that.mayMoney).toFixed(2) >= parseFloat(that.money)) {
|
||||||
|
// if (parseFloat(that.mayMoney).toFixed(1) >= parseFloat(that.money) + shouxufei * 1) {
|
||||||
|
if (parseFloat(that.money).toFixed(2) >= parseFloat(cashMoney)) {
|
||||||
if (that.shouxufei > 0) {
|
if (that.shouxufei > 0) {
|
||||||
|
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
|
|||||||
@@ -106,7 +106,7 @@
|
|||||||
}
|
}
|
||||||
.tips {
|
.tips {
|
||||||
font-size: 34rpx;
|
font-size: 34rpx;
|
||||||
color: #5074FF;
|
color: #999999;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
}
|
}
|
||||||
.btn {
|
.btn {
|
||||||
|
|||||||
@@ -339,7 +339,7 @@
|
|||||||
{
|
{
|
||||||
"path": "invite/moneyList",
|
"path": "invite/moneyList",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "钱包明细",
|
"navigationBarTitleText": "红包明细",
|
||||||
"h5": {
|
"h5": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"backgroundColor": "#FFFFFF"
|
"backgroundColor": "#FFFFFF"
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
<video :show-fullscreen-btn="false" @controlstoggle="controlstoggles" object-fit="cover"
|
<video :show-fullscreen-btn="false" @controlstoggle="controlstoggles" object-fit="cover"
|
||||||
v-if="isShowVideo == item.courseDetailsId && item.videoUrl" :play-strategy="2"
|
v-if="isShowVideo == item.courseDetailsId && item.videoUrl" :play-strategy="2"
|
||||||
:show-loading="true" codec="software" :muted="false" :show-center-play-btn="true" :loop="true"
|
:show-loading="true" codec="software" :muted="false" :show-center-play-btn="true" :loop="true"
|
||||||
|
@timeupdate="timeupdate"
|
||||||
|
@play="videoPlay('myVideo'+item.courseDetailsId, item.courseDetailsId)"
|
||||||
@ended="ended" :enable-progress-gesture="false" :poster="item.titleImg"
|
@ended="ended" :enable-progress-gesture="false" :poster="item.titleImg"
|
||||||
:ref="'myVideo'+item.courseDetailsId" :id="'myVideo'+item.courseDetailsId" :src="item.videoUrl"
|
:ref="'myVideo'+item.courseDetailsId" :id="'myVideo'+item.courseDetailsId" :src="item.videoUrl"
|
||||||
:autoplay="item.autoPlay" class="swipers-items-video"></video>
|
:autoplay="item.autoPlay" class="swipers-items-video"></video>
|
||||||
@@ -164,6 +166,8 @@
|
|||||||
'width': '750rpx',
|
'width': '750rpx',
|
||||||
},
|
},
|
||||||
isShowVideo: '',
|
isShowVideo: '',
|
||||||
|
playFlag: false
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@@ -204,6 +208,38 @@
|
|||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//播放时的回掉
|
||||||
|
videoPlay(videoId,courseDetailsId) {
|
||||||
|
this.courseDetailsId = courseDetailsId
|
||||||
|
if ( !this.playFlag ) {
|
||||||
|
this.playFlag = true
|
||||||
|
httpsRequest.getT('app/course/viewCourse', {
|
||||||
|
courseId: this.courseId,
|
||||||
|
courseDetailsId: courseDetailsId,
|
||||||
|
type: 'start'
|
||||||
|
}).then(res => {
|
||||||
|
console.log('播放开始')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
//播放进度变化回掉
|
||||||
|
timeupdate(e) {
|
||||||
|
|
||||||
|
if (e.detail.currentTime > e.detail.duration*0.9) {
|
||||||
|
if ( this.playFlag) {
|
||||||
|
this.playFlag = false
|
||||||
|
httpsRequest.getT('app/course/viewCourse', {
|
||||||
|
courseId: this.courseId,
|
||||||
|
courseDetailsId: this.courseDetailsId,
|
||||||
|
type: 'end'
|
||||||
|
}).then(res => {
|
||||||
|
console.log('播放结束')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
appear(e, index) {
|
appear(e, index) {
|
||||||
this.current = index
|
this.current = index
|
||||||
this.showControls = true
|
this.showControls = true
|
||||||
|
|||||||
@@ -202,6 +202,8 @@
|
|||||||
showControls: true, //是否显示控制中心
|
showControls: true, //是否显示控制中心
|
||||||
timerCon: null,
|
timerCon: null,
|
||||||
randomNum: 0,
|
randomNum: 0,
|
||||||
|
playFlag: false,
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -323,6 +325,7 @@
|
|||||||
if (e.id) {
|
if (e.id) {
|
||||||
this.courseId = e.id
|
this.courseId = e.id
|
||||||
}
|
}
|
||||||
|
console.log(e)
|
||||||
if (e.courseDetailsId) {
|
if (e.courseDetailsId) {
|
||||||
this.courseDetailsId = e.courseDetailsId
|
this.courseDetailsId = e.courseDetailsId
|
||||||
}
|
}
|
||||||
@@ -485,6 +488,18 @@
|
|||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
// #endif
|
// #endif
|
||||||
|
if (e.detail.currentTime > e.detail.duration*0.9) {
|
||||||
|
if ( this.playFlag) {
|
||||||
|
this.playFlag = false
|
||||||
|
this.$Request.getT('app/course/viewCourse', {
|
||||||
|
courseId: this.courseId,
|
||||||
|
courseDetailsId: this.courseDetailsId,
|
||||||
|
type: 'end'
|
||||||
|
}).then(res => {
|
||||||
|
console.log('播放结束')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//缓冲中
|
//缓冲中
|
||||||
waiting(e) {
|
waiting(e) {
|
||||||
@@ -681,6 +696,8 @@
|
|||||||
}
|
}
|
||||||
if (this.page == 1) {
|
if (this.page == 1) {
|
||||||
let numIdCurr = this.videoList[0].courseDetailsId;
|
let numIdCurr = this.videoList[0].courseDetailsId;
|
||||||
|
this.courseId = this.videoList[0].courseId
|
||||||
|
this.courseDetailsId = this.videoList[0].courseDetailsId;
|
||||||
this.videoContextId = 'myVideo' + numIdCurr;
|
this.videoContextId = 'myVideo' + numIdCurr;
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@@ -816,6 +833,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.courseId = this.videoList[current].courseId
|
||||||
|
this.courseDetailsId = this.videoList[current].courseDetailsId
|
||||||
//获取当前播放的视频在菜单数组中的位置
|
//获取当前播放的视频在菜单数组中的位置
|
||||||
let scrollIndex = this.meunList.findIndex(ite => ite.courseDetailsId == this.videoList[current]
|
let scrollIndex = this.meunList.findIndex(ite => ite.courseDetailsId == this.videoList[current]
|
||||||
.courseDetailsId);
|
.courseDetailsId);
|
||||||
@@ -860,7 +879,14 @@
|
|||||||
},
|
},
|
||||||
//在播放时候的回调
|
//在播放时候的回调
|
||||||
videoPlay(videoId) {
|
videoPlay(videoId) {
|
||||||
|
this.$Request.getT('app/course/viewCourse', {
|
||||||
|
courseId: this.courseId,
|
||||||
|
courseDetailsId: this.courseDetailsId,
|
||||||
|
type: 'start'
|
||||||
|
}).then(res => {
|
||||||
|
this.playFlag = true
|
||||||
|
console.log('播放开始')
|
||||||
|
})
|
||||||
},
|
},
|
||||||
//监听视频播放完成
|
//监听视频播放完成
|
||||||
ended() {
|
ended() {
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
<video :show-fullscreen-btn="false" @controlstoggle="controlstoggles" object-fit="cover"
|
<video :show-fullscreen-btn="false" @controlstoggle="controlstoggles" object-fit="cover"
|
||||||
v-if="current === index && item.videoUrl" :play-strategy="2" :show-loading="true"
|
v-if="current === index && item.videoUrl" :play-strategy="2" :show-loading="true"
|
||||||
codec="software" :muted="false" :show-center-play-btn="true" :loop="true" @ended="ended"
|
codec="software" :muted="false" :show-center-play-btn="true" :loop="true" @ended="ended"
|
||||||
|
@timeupdate="timeupdate"
|
||||||
|
@play="videoPlay('myVideo'+item.courseDetailsId, item.courseDetailsId)"
|
||||||
:enable-progress-gesture="false" :poster="item.titleImg" :ref="'myVideo'+item.courseDetailsId"
|
:enable-progress-gesture="false" :poster="item.titleImg" :ref="'myVideo'+item.courseDetailsId"
|
||||||
:id="'myVideo'+item.courseDetailsId" :src="item.videoUrl" :autoplay="item.autoPlay"
|
:id="'myVideo'+item.courseDetailsId" :src="item.videoUrl" :autoplay="item.autoPlay"
|
||||||
class="swipers-items-video"></video>
|
class="swipers-items-video"></video>
|
||||||
@@ -154,7 +156,9 @@
|
|||||||
page: 1,
|
page: 1,
|
||||||
pages: 1,
|
pages: 1,
|
||||||
limit: 5,
|
limit: 5,
|
||||||
randomNum: 0
|
randomNum: 0,
|
||||||
|
playFlag: false
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -200,6 +204,38 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//播放时的回掉
|
||||||
|
videoPlay(videoId,courseDetailsId) {
|
||||||
|
this.courseDetailsId = courseDetailsId
|
||||||
|
if ( !this.playFlag ) {
|
||||||
|
this.playFlag = true
|
||||||
|
httpsRequest.getT('app/course/viewCourse', {
|
||||||
|
courseId: this.courseId,
|
||||||
|
courseDetailsId: courseDetailsId,
|
||||||
|
type: 'start'
|
||||||
|
}).then(res => {
|
||||||
|
console.log('播放开始')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
//播放进度变化回掉
|
||||||
|
timeupdate(e) {
|
||||||
|
|
||||||
|
if (e.detail.currentTime > e.detail.duration*0.9) {
|
||||||
|
if ( this.playFlag) {
|
||||||
|
this.playFlag = false
|
||||||
|
httpsRequest.getT('app/course/viewCourse', {
|
||||||
|
courseId: this.courseId,
|
||||||
|
courseDetailsId: this.courseDetailsId,
|
||||||
|
type: 'end'
|
||||||
|
}).then(res => {
|
||||||
|
console.log('播放结束')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
//显示/隐藏适配控制器的回调
|
//显示/隐藏适配控制器的回调
|
||||||
controlstoggles(e) {
|
controlstoggles(e) {
|
||||||
this.showControls = e.detail.show
|
this.showControls = e.detail.show
|
||||||
|
|||||||
Reference in New Issue
Block a user