解決衝突
This commit is contained in:
@@ -132,9 +132,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
// #ifdef H5
|
||||||
getElRect('myCanvas').then(res => {
|
getElRect('myCanvas').then(res => {
|
||||||
Object.assign(posterData, res)
|
Object.assign(posterData, res)
|
||||||
})
|
})
|
||||||
|
// #endif
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
function hide() {
|
function hide() {
|
||||||
|
|||||||
@@ -411,7 +411,7 @@
|
|||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
transition: all .3s ease-in-out;
|
transition: transform .3s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.u-flex-y-center {
|
.u-flex-y-center {
|
||||||
@@ -426,7 +426,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
transition: all .3s ease-in-out;
|
transition: transform .3s ease-in-out;
|
||||||
position: absolute !important;
|
position: absolute !important;
|
||||||
right: 20rpx;
|
right: 20rpx;
|
||||||
/* #ifdef H5 */
|
/* #ifdef H5 */
|
||||||
|
|||||||
@@ -67,6 +67,10 @@ let loop=ref(false)
|
|||||||
loop.value=true
|
loop.value=true
|
||||||
// #endif
|
// #endif
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
height:{
|
||||||
|
type:Number,
|
||||||
|
default:0
|
||||||
|
},
|
||||||
item: {
|
item: {
|
||||||
type: Object,
|
type: Object,
|
||||||
defaulr: () => {
|
defaulr: () => {
|
||||||
@@ -435,7 +439,7 @@ let loop=ref(false)
|
|||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
transition: all .3s ease-in-out;
|
transition: transform .3s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.u-flex-y-center {
|
.u-flex-y-center {
|
||||||
@@ -450,7 +454,7 @@ let loop=ref(false)
|
|||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
transition: all .3s ease-in-out;
|
transition: transform .3s ease-in-out;
|
||||||
position: absolute !important;
|
position: absolute !important;
|
||||||
right: 20rpx;
|
right: 20rpx;
|
||||||
/* #ifdef H5 */
|
/* #ifdef H5 */
|
||||||
|
|||||||
@@ -1,22 +1,31 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="item" @appear="appear" @disappear="disappear" @click.stop :style="{height:height+'px'}">
|
<view class="item" @appear="appear" @disappear="disappear" @click.stop :style="{height:height+'px'}" :key="index">
|
||||||
|
|
||||||
<video class="u-flex-1 video" :show-fullscreen-btn="false" @controlstoggle="controlstoggles" v-if="showVideo"
|
<video class="u-flex-1 video" :show-fullscreen-btn="false" @controlstoggle="controlstoggles" v-if="showVideo"
|
||||||
|
play-btn-position="center"
|
||||||
@timeupdate="timeupdate" @waiting="waiting()" object-fit="cover" @pause="onpause" @click="videoClick()"
|
:show-center-play-btn="false"
|
||||||
|
:show-play-btn="false"
|
||||||
|
:controls="true"
|
||||||
|
@click.stop="videoClick()"
|
||||||
|
@loadedmetadata="loadedmetadata"
|
||||||
|
@timeupdate="timeupdate" @waiting="waiting()" object-fit="cover" @pause="onpause"
|
||||||
@play="videoPlay('myVideo'+item.courseDetailsId,item.courseDetailsId)" :play-strategy="2"
|
@play="videoPlay('myVideo'+item.courseDetailsId,item.courseDetailsId)" :play-strategy="2"
|
||||||
:show-loading="true" codec="software" :muted="false" :show-center-play-btn="true" :loop="loop"
|
:show-loading="true" codec="software" :muted="false" :loop="loop"
|
||||||
:enable-progress-gesture="false" :poster="item.titleImg" :ref="'myVideo'+item.courseDetailsId"
|
:enable-progress-gesture="false" :poster="item.titleImg" :ref="'myVideo'+item.courseDetailsId"
|
||||||
:autoplay="autoplay" @ended="ended" :id="'myVideo'+item.courseDetailsId" :src="item.videoUrl"></video>
|
:autoplay="autoplay" @ended="ended" :id="'myVideo'+item.courseDetailsId" :src="item.videoUrl"></video>
|
||||||
|
|
||||||
<image class="poster" v-else @click="!item.videoUrl?popupShow('pay',item):''" :src="item.titleImg"
|
<image class="poster" v-else @click.stop="posterClick" :src="item.titleImg"
|
||||||
mode="aspectFill">
|
mode="aspectFill">
|
||||||
</image>
|
</image>
|
||||||
|
|
||||||
|
<view class="play-icon" v-if="videoIsLoadedmetadata&&showVideo&&!isPlying" @click.stop="videoClick()" :style="playStyle">
|
||||||
|
<image class="icon" src="@/static/images/play.png" mode=""></image>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="info" v-if="!isCommand" :style="infoStyle">
|
<view class="info" v-if="!isCommand" :style="infoStyle">
|
||||||
<text class="color-fff" v-if="item.courseDetailsName">{{item.courseDetailsName}}</text>
|
<text class="color-fff" v-if="item.courseDetailsName">{{item.courseDetailsName}}</text>
|
||||||
<view v-if="item.content" v-html="item.content"></view>
|
<view v-if="item.content" v-html="item.content"></view>
|
||||||
<view class="u-m-t-20 color-fff" @click="popupShow('show')">
|
<view class="u-m-t-20 color-fff" @click.stop="popupShow('show')">
|
||||||
<text class="color-fff">
|
<text class="color-fff">
|
||||||
{{item.courseDetailsName}}(共{{total}}集)选集 >
|
{{item.courseDetailsName}}(共{{total}}集)选集 >
|
||||||
</text>
|
</text>
|
||||||
@@ -26,7 +35,7 @@
|
|||||||
<view class="info" v-if="isCommand" :style="infoStyle">
|
<view class="info" v-if="isCommand" :style="infoStyle">
|
||||||
<text class="color-fff" v-if="item.courseDetailsName">{{item.courseDetailsName}}</text>
|
<text class="color-fff" v-if="item.courseDetailsName">{{item.courseDetailsName}}</text>
|
||||||
<view v-if="item.content" v-html="item.content"></view>
|
<view v-if="item.content" v-html="item.content"></view>
|
||||||
<view class="u-m-t-20 color-fff" @click="toDetail">
|
<view class="u-m-t-20 color-fff" @click.stop="toDetail">
|
||||||
<text class="color-fff">
|
<text class="color-fff">
|
||||||
查看更多续集 >
|
查看更多续集 >
|
||||||
</text>
|
</text>
|
||||||
@@ -70,6 +79,10 @@
|
|||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
isAndriod:{
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
height:{
|
height:{
|
||||||
type:Number,
|
type:Number,
|
||||||
default:0
|
default:0
|
||||||
@@ -98,6 +111,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
isTabbar:{
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
isCommand: {
|
isCommand: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
@@ -146,7 +163,11 @@
|
|||||||
const emits = defineEmits(['controlstoggles', 'disappear', 'appear', 'waiting', 'videoPlay', 'ended', 'dianzanClick',
|
const emits = defineEmits(['controlstoggles', 'disappear', 'appear', 'waiting', 'videoPlay', 'ended', 'dianzanClick',
|
||||||
'share', 'zhuijuClick', 'popupShow', 'itemMounted', 'toDetail', 'showInfo', 'playStatusChange'
|
'share', 'zhuijuClick', 'popupShow', 'itemMounted', 'toDetail', 'showInfo', 'playStatusChange'
|
||||||
])
|
])
|
||||||
|
function posterClick(){
|
||||||
|
if(!props.item.videoUrl){
|
||||||
|
popupShow('pay',props.item)
|
||||||
|
}
|
||||||
|
}
|
||||||
function controlstoggles(e) {
|
function controlstoggles(e) {
|
||||||
emits('controlstoggles', e)
|
emits('controlstoggles', e)
|
||||||
}
|
}
|
||||||
@@ -162,6 +183,11 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let videoIsLoadedmetadata=ref(false)
|
||||||
|
function loadedmetadata(){
|
||||||
|
videoIsLoadedmetadata.value=true
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
let isPlying = ref(false)
|
let isPlying = ref(false)
|
||||||
watch(() => isPlying.value, (newval) => {
|
watch(() => isPlying.value, (newval) => {
|
||||||
@@ -191,9 +217,7 @@
|
|||||||
|
|
||||||
function timeupdate(e) {
|
function timeupdate(e) {
|
||||||
//隐藏loding
|
//隐藏loding
|
||||||
// #ifdef H5
|
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
// #endif
|
|
||||||
if (isPlayFinish) {
|
if (isPlayFinish) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -280,19 +304,20 @@
|
|||||||
|
|
||||||
let video = null
|
let video = null
|
||||||
|
|
||||||
function disappear() {
|
function disappear(e) {
|
||||||
|
emits('disappear',e)
|
||||||
if (video) {
|
if (video) {
|
||||||
video.pause()
|
video.pause()
|
||||||
}
|
}
|
||||||
emits('disappear')
|
|
||||||
}
|
}
|
||||||
const showVideo = computed(() => {
|
const showVideo = computed(() => {
|
||||||
// #ifdef H5
|
if(props.isAndriod){
|
||||||
return props.current === props.index && props.item.videoUrl
|
console.log('props.nowIndex === props.index ');
|
||||||
// #endif
|
console.log(props.nowIndex,props.index );
|
||||||
// #ifdef APP
|
return (props.nowIndex === props.index && props.item.videoUrl) ?true :false
|
||||||
return props.nowIndex === props.index && props.item.videoUrl
|
}else{
|
||||||
// #endif
|
return props.current === props.index && props.item.videoUrl
|
||||||
|
}
|
||||||
})
|
})
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
init()
|
init()
|
||||||
@@ -331,10 +356,29 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const customStyle = computed(() => {
|
||||||
|
// #ifdef H5
|
||||||
|
return {
|
||||||
|
bottom: props.isTabbar ? '50px' : '0'
|
||||||
|
}
|
||||||
|
// #endif
|
||||||
|
// #ifndef H5
|
||||||
|
return {}
|
||||||
|
// #endif
|
||||||
|
})
|
||||||
|
const playStyle=computed(()=>{
|
||||||
|
if(isPlying.value){
|
||||||
|
return {
|
||||||
|
bottom:'0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
bottom: props.isTabbar ? (50+44 +'px') : '44px'
|
||||||
|
}
|
||||||
|
})
|
||||||
const infoStyle = computed(() => {
|
const infoStyle = computed(() => {
|
||||||
return {
|
return {
|
||||||
transform: `translateX(${(!isPlying.value||!props.item.videoUrl)?0:'-110%'})`
|
transform: `translateX(${(!isPlying.value||!props.item.videoUrl)?0:'-750rpx'})`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -411,7 +455,7 @@
|
|||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
transition: all .3s ease-in-out;
|
transition: transform .3s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.u-flex-y-center {
|
.u-flex-y-center {
|
||||||
@@ -426,7 +470,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
transition: all .3s ease-in-out;
|
transition: transform .3s ease-in-out;
|
||||||
position: absolute !important;
|
position: absolute !important;
|
||||||
right: 20rpx;
|
right: 20rpx;
|
||||||
/* #ifdef H5 */
|
/* #ifdef H5 */
|
||||||
@@ -434,7 +478,7 @@
|
|||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
/* #endif */
|
/* #endif */
|
||||||
/* #ifdef APP */
|
/* #ifdef APP */
|
||||||
top: 500px;
|
bottom: 100px;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
@@ -465,45 +509,20 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
.play-icon{
|
||||||
.ji-list {
|
position: absolute;
|
||||||
.ji-item {
|
left: 0;
|
||||||
width: 210rpx;
|
right: 0;
|
||||||
margin-bottom: 20rpx;
|
top: 0;
|
||||||
margin-right: 30rpx;
|
bottom: 0;
|
||||||
height: 88rpx;
|
justify-content: center;
|
||||||
font-size: 28rpx;
|
align-items: center;
|
||||||
color: #333;
|
$icon-size:80rpx;
|
||||||
border-radius: 12rpx;
|
.icon{
|
||||||
background-color: #F5F7FF;
|
width: $icon-size;
|
||||||
position: relative;
|
height: $icon-size;
|
||||||
|
|
||||||
&.active {
|
|
||||||
background-color: $my-main-color;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lock {
|
|
||||||
position: absolute;
|
|
||||||
border-radius: 0px 6px 0px 6px;
|
|
||||||
background-color: #ccc;
|
|
||||||
padding: 2rpx 4rpx;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.playing {
|
|
||||||
position: absolute;
|
|
||||||
width: 32rpx;
|
|
||||||
height: 24rpx;
|
|
||||||
bottom: 5px;
|
|
||||||
right: 7px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.ji-item:nth-of-type(3n) {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot {
|
.hot {
|
||||||
|
|||||||
@@ -1,46 +1,109 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- #ifdef H5 -->
|
<list v-if="showAndriod" :bounce="false" :loadmoreoffset="wHeight*3" :show-scrollbar="false" ref="listBox"
|
||||||
<view class=" w-full box" style="width: 100vw;">
|
:pagingEnabled="true" @loadmore="loadmore" :scrollable="true">
|
||||||
|
<cell v-for="(item,index) in list" :key="item.courseDetailsId" :ref="setRefList(index)">
|
||||||
|
<view class="swipers-items" :style="boxStyle" @longpress="popupShow('speed')">
|
||||||
|
<list-item-vue :total="list.length" :item="item" :current="current" :isCollect="isCollect"
|
||||||
|
:isAndriod="isAndriod" :isTabbar="isTabbar" @playStatusChange="playStatusChange" :height="wHeight"
|
||||||
|
:isCommand="isCommand" :showControls="control.showControls" @toDetail="toDetail(item,index)"
|
||||||
|
@itemMounted="itemMounted" @controlstoggles="controlstoggles" :index="index" :instance="instance"
|
||||||
|
:nowIndex="nowIndex" @appear="appear($event,item,index)" :playSpeeds="playSpeeds"
|
||||||
|
@disappear="disappear($event, item,index)" @dianzanClick="dianzanClick(item,index)"
|
||||||
|
@share="share(item)" @zhuijuClick="zhuijuClick(item)"
|
||||||
|
@popupShow="popupShow($event,item,index)"></list-item-vue>
|
||||||
|
</view>
|
||||||
|
</cell>
|
||||||
|
</list>
|
||||||
|
<view v-if="isH5||isIos" class=" w-full box" style="width: 100vw;">
|
||||||
<swiper @longpress="popupShow('speed')" :style="{height:wHeight+'px'}" v-if="videoList.length"
|
<swiper @longpress="popupShow('speed')" :style="{height:wHeight+'px'}" v-if="videoList.length"
|
||||||
@change="swiperChange" :current="current" :circular="true" vertical class="u-flex-1"
|
@change="swiperChange" :current="current" :circular="true" vertical class="u-flex-1"
|
||||||
@transition="transition" :indicator-dots="false" :autoplay="false" :interval="0" :duration="200">
|
@transition="transition" :indicator-dots="false" :autoplay="false" :interval="0" :duration="200">
|
||||||
<swiper-item v-for="(item,index) in videoList" :key="index">
|
<swiper-item v-for="(item,index) in videoList" :key="index">
|
||||||
<list-item-vue :total="list.length" :item="item" :isCommand="isCommand" :height="wHeight"
|
<list-item-vue :total="list.length" :item="item" :isCommand="isCommand" :height="wHeight"
|
||||||
@playStatusChange="playStatusChange" :showControls="control.showControls" :current="current"
|
:isAndriod="isAndriod" :isTabbar="isTabbar" @playStatusChange="playStatusChange"
|
||||||
:isCollect="isCollect" @toDetail="toDetail(item,index)" @controlstoggles="controlstoggles"
|
:showControls="control.showControls" :current="current" :isCollect="isCollect"
|
||||||
:playSpeeds="playSpeeds" :index="index" :nowIndex="nowIndex"
|
@toDetail="toDetail(item,index)" @controlstoggles="controlstoggles" :playSpeeds="playSpeeds"
|
||||||
@dianzanClick="dianzanClick(item,index)" @share="share(item)" @zhuijuClick="zhuijuClick(item)"
|
:index="index" :nowIndex="nowIndex" @dianzanClick="dianzanClick(item,index)" @share="share(item)"
|
||||||
@popupShow="popupShow($event,item,index)"></list-item-vue>
|
@zhuijuClick="zhuijuClick(item)" @popupShow="popupShow($event,item,index)"></list-item-vue>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
<!-- #endif -->
|
|
||||||
|
|
||||||
<!-- #ifdef APP -->
|
|
||||||
<list :bounce="false" :loadmoreoffset="wHeight*3" :show-scrollbar="false" ref="listBox" :pagingEnabled="true"
|
|
||||||
@loadmore="loadmore" :scrollable="true">
|
|
||||||
<cell v-for="(item,index) in list" :key="item.courseDetailsId" :ref="setRefList(index)">
|
|
||||||
<view class="swipers-items" :style="boxStyle" @longpress="popupShow('speed')">
|
|
||||||
<list-item-vue :total="list.length" :item="item" :current="current" :isCollect="isCollect"
|
|
||||||
@playStatusChange="playStatusChange" :height="wHeight" :isCommand="isCommand"
|
|
||||||
:showControls="control.showControls" @toDetail="toDetail(item,index)" @itemMounted="itemMounted"
|
|
||||||
@controlstoggles="controlstoggles" :index="index" :instance="instance" :nowIndex="nowIndex"
|
|
||||||
@appear="appear($event,item,index)" :playSpeeds="playSpeeds" @disappear="disappear(item,index)"
|
|
||||||
@dianzanClick="dianzanClick(item,index)" @share="share(item)" @zhuijuClick="zhuijuClick(item)"
|
|
||||||
@popupShow="popupShow($event,item,index)"></list-item-vue>
|
|
||||||
</view>
|
|
||||||
</cell>
|
|
||||||
</list>
|
|
||||||
|
|
||||||
<!-- #endif -->
|
|
||||||
|
|
||||||
<!-- 返回按钮 -->
|
<!-- 返回按钮 -->
|
||||||
<view class="back-icon" v-if="!isTabbar&&control.showBack">
|
<view class="back-icon" v-if="!isTabbar&&control.showBack">
|
||||||
<u-icon name="arrow-left" color="#fff" :size="28" @click="back"></u-icon>
|
<u-icon name="arrow-left" color="#fff" :size="28" @click="back"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<!-- 选集 -->
|
<!-- 选集 -->
|
||||||
<up-popup :show="popup.show" :round="10" @close="popupClose('show')" :customStyle="customStyle">
|
<up-overlay :show="popup.show" @click="popupClose('show')">
|
||||||
|
<view class="u-p-30 bg-fff xuanji-box">
|
||||||
|
<view class="u-flex u-flex-row u-row-between">
|
||||||
|
<view class="u-flex u-flex-row" style="align-items: baseline;">
|
||||||
|
<text class="color-333 u-font-32 ">{{info.title}}</text>
|
||||||
|
<text class="u-font-28 color-666 u-m-l-20">共{{list.length}}集</text>
|
||||||
|
</view>
|
||||||
|
<up-icon name="close" :size="16" color="#333" bold @click="popupClose('show')"></up-icon>
|
||||||
|
</view>
|
||||||
|
<scroll-view scroll-y="true" class="u-m-t-30 xuanji-scroll" :style="{height:xuanjiData.height+'px'}"
|
||||||
|
:scroll-top="xuanjiData.scrollTop" :show-scrollbar="false">
|
||||||
|
<view class="ji-list u-flex u-flex-row u-flex-wrap">
|
||||||
|
<view class="ji-item u-flex-xy-center u-text-center" @click="jiClick(item,index)"
|
||||||
|
:class="[nowIndex==index?'active':'',(index+1)%3==0?'mr-0':'','ji-item'+index]"
|
||||||
|
v-for="(item,index) in list" :key="index">
|
||||||
|
<text class="u-font-28" :class="{'color-fff':nowIndex==index}">第{{index+1}}集</text>
|
||||||
|
<view class="lock u-flex-xy-center" v-if="!item.videoUrl">
|
||||||
|
<up-icon name="lock" :size="14" color="#fff"></up-icon>
|
||||||
|
<!-- <image class="lock-icon" src="@/static/images/lock.png" mode=""></image> -->
|
||||||
|
</view>
|
||||||
|
<image v-if="nowIndex==index" class="playing" src="@/static/images/playIng.png" mode="">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</scroll-view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</up-overlay>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 暂时舍弃,因为在ios上会有奇怪问题导致经常不出现 -->
|
||||||
|
<!-- 选集-->
|
||||||
|
<!-- <view class="mask" :class="{'mask-show':popup.show}">
|
||||||
|
<view class="u-p-30 bg-fff box">
|
||||||
|
<view class="u-flex u-flex-row u-row-between">
|
||||||
|
<view class="u-flex u-flex-row" style="align-items: baseline;">
|
||||||
|
<text class="color-333 u-font-32 ">{{info.title}}</text>
|
||||||
|
<text class="u-font-28 color-666 u-m-l-20">共{{list.length}}集</text>
|
||||||
|
</view>
|
||||||
|
<up-icon name="close" :size="16" color="#333" bold @click="popupClose('show')"></up-icon>
|
||||||
|
</view>
|
||||||
|
<view :style="{height:xuanjiData.height+'px',overflow:'hidden'}">
|
||||||
|
<scroll-view scroll-y="true" class="u-m-t-30 xuanji-scroll" :style="{height:xuanjiData.height+'px'}"
|
||||||
|
:scroll-top="xuanjiData.scrollTop" :show-scrollbar="false">
|
||||||
|
<view class="ji-list u-flex u-flex-row u-flex-wrap">
|
||||||
|
<view class="ji-item u-flex-xy-center u-text-center" @click="jiClick(item,index)"
|
||||||
|
:class="[nowIndex==index?'active':'',(index+1)%3==0?'mr-0':'','ji-item'+index]"
|
||||||
|
v-for="(item,index) in list" :key="index">
|
||||||
|
<text class="u-font-28" :class="{'color-fff':nowIndex==index}">第{{index+1}}集</text>
|
||||||
|
<view class="lock u-flex-xy-center" v-if="!item.videoUrl">
|
||||||
|
<up-icon name="lock" :size="14" color="#fff"></up-icon>
|
||||||
|
</view>
|
||||||
|
<image v-if="nowIndex==index" class="playing" src="@/static/images/playIng.png" mode="">
|
||||||
|
</image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
|
<up-popup :show="popup.show1" :round="10" @close="popupClose('show')" :customStyle="customStyle">
|
||||||
<view class="u-p-30">
|
<view class="u-p-30">
|
||||||
<view class="u-flex u-flex-row u-row-between">
|
<view class="u-flex u-flex-row u-row-between">
|
||||||
<view class="u-flex u-flex-row" style="align-items: baseline;">
|
<view class="u-flex u-flex-row" style="align-items: baseline;">
|
||||||
@@ -49,25 +112,30 @@
|
|||||||
</view>
|
</view>
|
||||||
<up-icon name="close" :size="16" color="#333" bold @click="popupClose('show')"></up-icon>
|
<up-icon name="close" :size="16" color="#333" bold @click="popupClose('show')"></up-icon>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view scroll-y="true" class="u-m-t-30 xuanji-scroll" ref="refXuanjiList"
|
<view :style="{height:xuanjiData.height+'px',overflow:'hidden'}">
|
||||||
:style="{height:xuanjiData.height+'px'}" @scroll="xuanjiScroll" :scroll-top="xuanjiData.scrollTop"
|
<scroll-view scroll-y="true" class="u-m-t-30 xuanji-scroll" :style="{height:xuanjiData.height+'px'}"
|
||||||
scroll-with-animation :show-scrollbar="false">
|
:scroll-top="xuanjiData.scrollTop" :show-scrollbar="false">
|
||||||
<view class="ji-list u-flex u-flex-row u-flex-wrap">
|
<view class="ji-list u-flex u-flex-row u-flex-wrap">
|
||||||
<view class="ji-item u-flex-xy-center u-text-center" @click="jiClick(item,index)"
|
<view class="ji-item u-flex-xy-center u-text-center" @click="jiClick(item,index)"
|
||||||
:class="[nowIndex==index?'active':'',(index+1)%3==0?'mr-0':'','ji-item'+index]"
|
:class="[nowIndex==index?'active':'',(index+1)%3==0?'mr-0':'','ji-item'+index]"
|
||||||
v-for="(item,index) in list" :key="index">
|
v-for="(item,index) in list" :key="index">
|
||||||
<text class="u-font-28" :class="{'color-fff':nowIndex==index}">第{{index+1}}集</text>
|
<text class="u-font-28" :class="{'color-fff':nowIndex==index}">第{{index+1}}集</text>
|
||||||
<view class="lock u-flex-xy-center" v-if="!item.videoUrl">
|
<view class="lock u-flex-xy-center" v-if="!item.videoUrl">
|
||||||
<up-icon name="lock" :size="14" color="#fff"></up-icon>
|
<up-icon name="lock" :size="14" color="#fff"></up-icon>
|
||||||
|
<!-- <image class="lock-icon" src="@/static/images/lock.png" mode=""></image> -->
|
||||||
|
</view>
|
||||||
|
<image v-if="nowIndex==index" class="playing" src="@/static/images/playIng.png" mode="">
|
||||||
|
</image>
|
||||||
</view>
|
</view>
|
||||||
<image v-if="nowIndex==index" class="playing" src="@/static/images/playIng.png" mode="">
|
|
||||||
</image>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
|
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</up-popup>
|
</up-popup>
|
||||||
|
|
||||||
|
|
||||||
<!-- 支付 -->
|
<!-- 支付 -->
|
||||||
<up-popup :show="popup.pay" :round="10" @close="popupClose('pay')" :customStyle="customStyle">
|
<up-popup :show="popup.pay" :round="10" @close="popupClose('pay')" :customStyle="customStyle">
|
||||||
<view class="u-p-30">
|
<view class="u-p-30">
|
||||||
@@ -155,7 +223,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</up-popup>
|
</up-popup>
|
||||||
|
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
<my-poster ref="refPoster"></my-poster>
|
<my-poster ref="refPoster"></my-poster>
|
||||||
|
<!-- #endif -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
@@ -187,11 +257,18 @@
|
|||||||
watch,
|
watch,
|
||||||
nextTick,
|
nextTick,
|
||||||
onMounted,
|
onMounted,
|
||||||
getCurrentInstance
|
getCurrentInstance,
|
||||||
|
onUnmounted
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import {
|
|
||||||
onShow
|
let isH5 = false
|
||||||
} from '@dcloudio/uni-app'
|
// #ifdef H5
|
||||||
|
isH5 = true
|
||||||
|
// #endif
|
||||||
|
const sysinfo = uni.getSystemInfoSync()
|
||||||
|
const isIos = sysinfo.platform == 'ios' ? true : false
|
||||||
|
const isAndriod = sysinfo.platform == 'android' ? true : false
|
||||||
|
const showAndriod = !isH5 && isAndriod ? true : false
|
||||||
let initing = true
|
let initing = true
|
||||||
const refPoster = ref(null)
|
const refPoster = ref(null)
|
||||||
|
|
||||||
@@ -239,10 +316,6 @@
|
|||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
control.showControls = false
|
control.showControls = false
|
||||||
// #endif
|
// #endif
|
||||||
let isExamine = ref()
|
|
||||||
onShow(() => {
|
|
||||||
$common.init()
|
|
||||||
})
|
|
||||||
const customStyle = computed(() => {
|
const customStyle = computed(() => {
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
return {
|
return {
|
||||||
@@ -327,7 +400,7 @@
|
|||||||
scrollTop: 0,
|
scrollTop: 0,
|
||||||
items: [],
|
items: [],
|
||||||
scrollHeight: 0,
|
scrollHeight: 0,
|
||||||
height: 400
|
height: 300
|
||||||
})
|
})
|
||||||
const refXuanjiList = ref(null)
|
const refXuanjiList = ref(null)
|
||||||
|
|
||||||
@@ -335,15 +408,19 @@
|
|||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
async function xuanjiInit() {
|
async function xuanjiInit() {
|
||||||
// #ifdef APP
|
|
||||||
const height = 44
|
const height = 44
|
||||||
const marginBottom = 10
|
const marginBottom = 10
|
||||||
const oneItemHeight = height + marginBottom
|
const oneItemHeight = height + marginBottom
|
||||||
xuanjiData.scrollTop = Math.ceil((nowIndex.value + 1) / 3) * oneItemHeight - (xuanjiData.height) / 2 +
|
const scrollTop = Math.ceil((nowIndex.value + 1) / 3) * oneItemHeight - (xuanjiData.height) / 2 +
|
||||||
oneItemHeight / 2
|
oneItemHeight / 2
|
||||||
return
|
if (props.list.length <= 15) {
|
||||||
// #endif
|
xuanjiData.scrollTop = 0
|
||||||
|
return
|
||||||
|
}
|
||||||
|
xuanjiData.scrollTop = scrollTop * 1 < 0 ? 0 : scrollTop
|
||||||
|
|
||||||
|
// #ifdef H5
|
||||||
if (!xuanjiData.items[props.list.length - 1]) {
|
if (!xuanjiData.items[props.list.length - 1]) {
|
||||||
const res = await getElRect('ji-list', instance, {
|
const res = await getElRect('ji-list', instance, {
|
||||||
rect: true
|
rect: true
|
||||||
@@ -366,6 +443,9 @@
|
|||||||
xuanjiData.scrollTop = xuanjiData.items[nowIndex.value].top - (xuanjiData.height) / 2 + (xuanjiData.items[
|
xuanjiData.scrollTop = xuanjiData.items[nowIndex.value].top - (xuanjiData.height) / 2 + (xuanjiData.items[
|
||||||
nowIndex.value].height) / 2
|
nowIndex.value].height) / 2
|
||||||
console.log(xuanjiData);
|
console.log(xuanjiData);
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -379,14 +459,15 @@
|
|||||||
if (isFirst) {
|
if (isFirst) {
|
||||||
$mountedComponents[index] = true
|
$mountedComponents[index] = true
|
||||||
}
|
}
|
||||||
|
console.log('appear:' + index);
|
||||||
if (!initing) {
|
if (!initing) {
|
||||||
cacheIndex = index
|
cacheIndex = index
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function disappear(item, index) {
|
function disappear(e, item, index) {
|
||||||
|
if (index == nowIndex.value && cacheIndex !== null && !initing) {
|
||||||
if (index == nowIndex.value && cacheIndex != null && !initing) {
|
|
||||||
console.log('disappear' + index);
|
console.log('disappear' + index);
|
||||||
console.log('disappear nowIndex' + nowIndex.value);
|
console.log('disappear nowIndex' + nowIndex.value);
|
||||||
console.log('cacheIndex' + cacheIndex);
|
console.log('cacheIndex' + cacheIndex);
|
||||||
@@ -493,9 +574,9 @@
|
|||||||
videoList.value[newCurrent] = item;
|
videoList.value[newCurrent] = item;
|
||||||
current.value = newCurrent;
|
current.value = newCurrent;
|
||||||
popupClose('show')
|
popupClose('show')
|
||||||
// #ifdef APP
|
if (showAndriod) {
|
||||||
goListPosition(index)
|
goListPosition(index)
|
||||||
// #endif
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let refList = ref([])
|
let refList = ref([])
|
||||||
@@ -538,17 +619,25 @@
|
|||||||
|
|
||||||
|
|
||||||
function popupClose(key) {
|
function popupClose(key) {
|
||||||
|
console.log('popupClose:' + key);
|
||||||
|
if (key == 'show') {
|
||||||
|
// xuanjiData.scrollTop = 0
|
||||||
|
}
|
||||||
if (key) {
|
if (key) {
|
||||||
popup[key] = false
|
popup[key] = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for (let i in popup) {
|
for (let i in popup) {
|
||||||
popup[i] = false
|
if (!i.includes(['data', 'payType'])) {
|
||||||
|
popup[i] = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function popupShow(key = 'show', item, index) {
|
function popupShow(key = 'show', item, index) {
|
||||||
console.log(key, item, 'debug');
|
console.log(key, item, 'debug');
|
||||||
|
console.log('key' + popup[key]);
|
||||||
|
console.log('popupShow');
|
||||||
if (key == 'show') {
|
if (key == 'show') {
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
@@ -558,7 +647,6 @@
|
|||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
xuanjiInit()
|
xuanjiInit()
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
}
|
}
|
||||||
popup[key] = true
|
popup[key] = true
|
||||||
if (item) {
|
if (item) {
|
||||||
@@ -609,15 +697,14 @@
|
|||||||
let item = props.list.find(v => props.options.courseDetailsId == v.courseDetailsId)
|
let item = props.list.find(v => props.options.courseDetailsId == v.courseDetailsId)
|
||||||
item = item ? item : props.info.current;
|
item = item ? item : props.info.current;
|
||||||
if (JSON.stringify(item) !== '{}') {
|
if (JSON.stringify(item) !== '{}') {
|
||||||
// #ifdef H5
|
if (showAndriod) {
|
||||||
setVideoList(item)
|
nextTick(() => {
|
||||||
// #endif
|
const index = props.list.findIndex(v => v.courseDetailsId == item.courseDetailsId)
|
||||||
// #ifdef APP
|
goListPosition(index)
|
||||||
nextTick(() => {
|
})
|
||||||
const index = props.list.findIndex(v => v.courseDetailsId == item.courseDetailsId)
|
} else {
|
||||||
goListPosition(index)
|
setVideoList(item)
|
||||||
})
|
}
|
||||||
// #endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -777,8 +864,11 @@
|
|||||||
}
|
}
|
||||||
console.log(videoList.value, 'debug');
|
console.log(videoList.value, 'debug');
|
||||||
if (!item.videoUrl) {
|
if (!item.videoUrl) {
|
||||||
popupShow('pay', item, index)
|
nextTick(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
popupShow('pay', item, index)
|
||||||
|
}, 100)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -801,9 +891,9 @@
|
|||||||
})
|
})
|
||||||
watch(() => props.list.length, (newval) => {
|
watch(() => props.list.length, (newval) => {
|
||||||
console.log('props.list.length change' + newval);
|
console.log('props.list.length change' + newval);
|
||||||
// #ifdef H5
|
if (!showAndriod) {
|
||||||
init()
|
init()
|
||||||
// #endif
|
}
|
||||||
})
|
})
|
||||||
watch(() => nowIndex.value, (newval) => {})
|
watch(() => nowIndex.value, (newval) => {})
|
||||||
const nowDanjiPrice = computed(() => {
|
const nowDanjiPrice = computed(() => {
|
||||||
@@ -953,7 +1043,7 @@
|
|||||||
|
|
||||||
.ji-list {
|
.ji-list {
|
||||||
.ji-item {
|
.ji-item {
|
||||||
width: 210rpx;
|
width: 208rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
margin-right: 30rpx;
|
margin-right: 30rpx;
|
||||||
height: 88rpx;
|
height: 88rpx;
|
||||||
@@ -979,6 +1069,11 @@
|
|||||||
padding: 2rpx 4rpx;
|
padding: 2rpx 4rpx;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|
||||||
|
.lock-icon {
|
||||||
|
width: 24rpx;
|
||||||
|
height: 24rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.playing {
|
.playing {
|
||||||
@@ -991,6 +1086,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.ji-item:nth-of-type(3n) {
|
.ji-item:nth-of-type(3n) {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
@@ -1053,9 +1149,48 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
|
.playing {}
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
|
|
||||||
|
.playing {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mask {
|
||||||
|
position: fixed;
|
||||||
|
z-index: 2000;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background-color: rgba(0, 0, 0, .5);
|
||||||
|
justify-content: end;
|
||||||
|
transition: transform .3s ease-in-out;
|
||||||
|
transform: translateY(100vh);
|
||||||
|
|
||||||
|
&.mask-show {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.box {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
border-radius: 10px 10px 0 0;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.xuanji-box {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
border-radius: 10px 10px 0 0;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
"unipush" : {}
|
"unipush" : {}
|
||||||
},
|
},
|
||||||
"ad" : {
|
"ad" : {
|
||||||
"gdt" : {}
|
"ks" : {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
|
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<view class="input" style="">
|
<view class="input" style="">
|
||||||
<view style="display: flex;align-items: center;">
|
<view style="display: flex;align-items: center;">
|
||||||
<view style="font-size: 40upx;color: #333333;">¥</view>
|
<view style="font-size: 40upx;color: #333333;">¥</view>
|
||||||
<input type="number" v-model="data.money" placeholder="请输入金额" @input="moneyInput" style="font-size: 32rpx;color: #333333;text-align: left;margin-left: 10rpx;width: 80%;" />
|
<input type="digit" v-model="data.money" placeholder="请输入金额" @input="moneyInput" style="font-size: 32rpx;color: #333333;text-align: left;margin-left: 10rpx;width: 80%;" />
|
||||||
</view>
|
</view>
|
||||||
<view class="allbtn" @click="setAllMoney">
|
<view class="allbtn" @click="setAllMoney">
|
||||||
全部
|
全部
|
||||||
|
|||||||
BIN
static/images/lock.png
Normal file
BIN
static/images/lock.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
BIN
static/images/pause.png
Normal file
BIN
static/images/pause.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
BIN
static/images/play.png
Normal file
BIN
static/images/play.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
Reference in New Issue
Block a user