|
@@ -1,11 +1,11 @@
|
|
<template>
|
|
<template>
|
|
<view class="play">
|
|
<view class="play">
|
|
- <video-player :videoUrl="videoUrl"></video-player>
|
|
|
|
|
|
+ <video-player :videoUrl="watchVo.url"></video-player>
|
|
<view class="anthologys_detail">
|
|
<view class="anthologys_detail">
|
|
<view class="anthology" @click="show = true">
|
|
<view class="anthology" @click="show = true">
|
|
<view class="ant">
|
|
<view class="ant">
|
|
<image :src="play_img" class="play"></image>
|
|
<image :src="play_img" class="play"></image>
|
|
- <text class="ant-text">大夏第一赘婿(1/94)</text>
|
|
|
|
|
|
+ <text class="ant-text">{{watchVo.programName}}(1/{{watchVo.programNum}})</text>
|
|
</view>
|
|
</view>
|
|
<view class="ant">
|
|
<view class="ant">
|
|
<text>选集</text>
|
|
<text>选集</text>
|
|
@@ -13,20 +13,20 @@
|
|
:customStyle="{ fontSize: '32rpx',marginLeft:'8rpx'}"></pv-icon>
|
|
:customStyle="{ fontSize: '32rpx',marginLeft:'8rpx'}"></pv-icon>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="hot">
|
|
|
|
|
|
+ <!-- <view class="hot">
|
|
<pv-icon name="icon-huomiao" color='#fff' :customStyle="{ fontSize: '32rpx'}"></pv-icon>
|
|
<pv-icon name="icon-huomiao" color='#fff' :customStyle="{ fontSize: '32rpx'}"></pv-icon>
|
|
<text>12.8W</text>
|
|
<text>12.8W</text>
|
|
- </view>
|
|
|
|
|
|
+ </view> -->
|
|
|
|
|
|
</view>
|
|
</view>
|
|
<u-popup :show="show" @close="close" @open="open" safeAreaInsetBottom :round="15">
|
|
<u-popup :show="show" @close="close" @open="open" safeAreaInsetBottom :round="15">
|
|
<view class="opera">
|
|
<view class="opera">
|
|
<view class="opera-top">
|
|
<view class="opera-top">
|
|
<view class="title">
|
|
<view class="title">
|
|
- <image class="cover" :src="coverImg"></image>
|
|
|
|
|
|
+ <image class="cover" :src="watchVo.thumbnail"></image>
|
|
<view class="name">
|
|
<view class="name">
|
|
- <text>大夏第一赘婿</text>
|
|
|
|
- <text>共94集·已完结</text>
|
|
|
|
|
|
+ <text>{{watchVo.programName}}</text>
|
|
|
|
+ <text>共{{watchVo.programNum}}集·已完结</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view @click="close"><pv-icon name="icon-xiala"
|
|
<view @click="close"><pv-icon name="icon-xiala"
|
|
@@ -34,24 +34,24 @@
|
|
|
|
|
|
</view>
|
|
</view>
|
|
<view class="serice">
|
|
<view class="serice">
|
|
- <u-tabs :list="tabs" lineWidth="0" lineColor="#f56c6c" :activeStyle="{
|
|
|
|
|
|
+ <!-- <u-tabs :list="tabs" lineWidth="0" lineColor="#f56c6c" :activeStyle="{
|
|
color: '#62C5C6',
|
|
color: '#62C5C6',
|
|
transform: 'scale(1)'
|
|
transform: 'scale(1)'
|
|
}" :inactiveStyle="{
|
|
}" :inactiveStyle="{
|
|
color: '#000',
|
|
color: '#000',
|
|
transform: 'scale(1)'
|
|
transform: 'scale(1)'
|
|
}" itemStyle="padding-left: 0px; padding-right: 20px; height: 34px;">
|
|
}" itemStyle="padding-left: 0px; padding-right: 20px; height: 34px;">
|
|
- </u-tabs>
|
|
|
|
|
|
+ </u-tabs> -->
|
|
<view class="numbers">
|
|
<view class="numbers">
|
|
<view class="num">
|
|
<view class="num">
|
|
- <view class="num_item num_item_select" v-for="(item,index) in list" :key="index">
|
|
|
|
- <text class="num_text">{{item}}</text>
|
|
|
|
- <view class="num_play">
|
|
|
|
|
|
+ <view class="num_item" :class="{num_item_select: item.sort == sort}" v-for="(item,index) in list" :key="index" @click="toPlay(item)">
|
|
|
|
+ <text class="num_text">{{item.sort}}</text>
|
|
|
|
+ <view v-if="item.sort === sort" class="num_play">
|
|
<view></view>
|
|
<view></view>
|
|
<view></view>
|
|
<view></view>
|
|
<view></view>
|
|
<view></view>
|
|
</view>
|
|
</view>
|
|
- <view class="lock">
|
|
|
|
|
|
+ <view v-if="!item.isPay" class="lock">
|
|
<pv-icon name="icon-v-locked" color="#A37449"
|
|
<pv-icon name="icon-v-locked" color="#A37449"
|
|
:customStyle="{ fontSize: '20rpx',fontWeight: 'bold'}"></pv-icon>
|
|
:customStyle="{ fontSize: '20rpx',fontWeight: 'bold'}"></pv-icon>
|
|
</view>
|
|
</view>
|
|
@@ -61,16 +61,39 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</u-popup>
|
|
</u-popup>
|
|
|
|
+ <u-popup :show="isPayShow" @open="openPlay" @close="closePlay" safeAreaInsetBottom :round="15">
|
|
|
|
+ <view class="pay_video">
|
|
|
|
+ <view class="tit flex aic">
|
|
|
|
+ <pv-icon name="icon-v-locked" color="#fff" :customStyle="{ fontSize: '30rpx',fontWeight: 'bold'}"></pv-icon>
|
|
|
|
+ <text class="tips">当前视频没有播放权限</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="pays flex jcsa aic">
|
|
|
|
+ <view class="pay_item single" :class="{ pay_item_select: !type }" @click="changeType(type)">
|
|
|
|
+ <text>单集购买</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="pay_item all" :class="{ pay_item_select: type }" @click="changeType(type)">
|
|
|
|
+ <text>整集购买</text>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <u-button class="btn" type="primary" shape="circle" @click="confirm">确认</u-button>
|
|
|
|
+ </view>
|
|
|
|
+ </u-popup>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import defaultConfig from '@/config/default.js'
|
|
import defaultConfig from '@/config/default.js'
|
|
-
|
|
|
|
|
|
+ import { getServerShipVideoUrl,getServerShipVideoList } from '@/apis/index'
|
|
|
|
+ import { buyShipVideo } from '@/apis/video'
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ // id:'',
|
|
|
|
+ type: 0,
|
|
|
|
+ watchVo:{},
|
|
|
|
+ sort:0,
|
|
show: false,
|
|
show: false,
|
|
|
|
+ isPayShow: false,
|
|
videoUrl: '/static/video/luo-sun.mp4', //路径
|
|
videoUrl: '/static/video/luo-sun.mp4', //路径
|
|
play_img: defaultConfig.ossImgUrl + '/playVideo/video/ic_search.png',
|
|
play_img: defaultConfig.ossImgUrl + '/playVideo/video/ic_search.png',
|
|
coverImg: 'https://obs-fanxing.obs.cn-east-3.myhuaweicloud.com/retail/main/img_bgtop.png',
|
|
coverImg: 'https://obs-fanxing.obs.cn-east-3.myhuaweicloud.com/retail/main/img_bgtop.png',
|
|
@@ -79,19 +102,61 @@
|
|
}, {
|
|
}, {
|
|
name: '51-94'
|
|
name: '51-94'
|
|
}],
|
|
}],
|
|
- list: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
|
|
|
|
- 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50
|
|
|
|
- ]
|
|
|
|
|
|
+ list: [],
|
|
|
|
+ shipVideoId:'',
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- onReady:function(){},
|
|
|
|
|
|
+ onLoad(params){
|
|
|
|
+ let id = params.id
|
|
|
|
+ console.log(params,id,'id');
|
|
|
|
+ // this.getVideoUrl(id)
|
|
|
|
+ this.getVideoList(id)
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 获取视频url
|
|
|
|
+ async toPlay(item){
|
|
|
|
+ if(item.sort === this.watchVo.sort) return
|
|
|
|
+ if(!item.isPay){
|
|
|
|
+ this.shipVideoId = item.id
|
|
|
|
+ this.isPayShow = true
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ const res = await getServerShipVideoUrl(item.id)
|
|
|
|
+
|
|
|
|
+ console.log(res);
|
|
|
|
+ },
|
|
|
|
+ // 查看视频列表
|
|
|
|
+ async getVideoList(id){
|
|
|
|
+ const res = await getServerShipVideoList(id)
|
|
|
|
+ this.watchVo = res.serverVideoWatchVo
|
|
|
|
+ this.sort = res.serverVideoWatchVo.sort
|
|
|
|
+ this.list = res.videoVos
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ async confirm(){
|
|
|
|
+ let params = {
|
|
|
|
+ shipVideoId: this.shipVideoId,
|
|
|
|
+ type: this.type
|
|
|
|
+ }
|
|
|
|
+ const res = await buyShipVideo(params)
|
|
|
|
+ console.log(res);
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ changeType(type){
|
|
|
|
+ type?this.type = 0:this.type = 1
|
|
|
|
+ },
|
|
open() {
|
|
open() {
|
|
- // console.log('open');
|
|
|
|
},
|
|
},
|
|
close() {
|
|
close() {
|
|
this.show = false
|
|
this.show = false
|
|
- // console.log('close');
|
|
|
|
|
|
+ },
|
|
|
|
+ closePlay() {
|
|
|
|
+ this.isPayShow = false
|
|
|
|
+ this.show = true
|
|
|
|
+ },
|
|
|
|
+ openPlay(){
|
|
|
|
+ this.show = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -155,7 +220,6 @@
|
|
|
|
|
|
.opera {
|
|
.opera {
|
|
padding: 20rpx 30rpx;
|
|
padding: 20rpx 30rpx;
|
|
-
|
|
|
|
.opera-top {
|
|
.opera-top {
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
@@ -195,14 +259,17 @@
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
|
|
|
|
.numbers {
|
|
.numbers {
|
|
- height: 600rpx;
|
|
|
|
|
|
+ height: 500rpx;
|
|
overflow: scroll;
|
|
overflow: scroll;
|
|
|
|
|
|
.num {
|
|
.num {
|
|
display: flex;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
flex-wrap: wrap;
|
|
-
|
|
|
|
|
|
+ .num_item_select{
|
|
|
|
+ background: #E9F9F9 !important;
|
|
|
|
+ }
|
|
.num_item {
|
|
.num_item {
|
|
|
|
+ position: relative;
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: center;
|
|
justify-content: center;
|
|
align-items: center;
|
|
align-items: center;
|
|
@@ -212,12 +279,6 @@
|
|
background: #FAFAFA;
|
|
background: #FAFAFA;
|
|
color: #000;
|
|
color: #000;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
- }
|
|
|
|
-
|
|
|
|
- .num_item_select {
|
|
|
|
- background: #E9F9F9;
|
|
|
|
- position: relative;
|
|
|
|
-
|
|
|
|
.num_text {
|
|
.num_text {
|
|
color: #62C5C6;
|
|
color: #62C5C6;
|
|
}
|
|
}
|
|
@@ -264,11 +325,41 @@
|
|
align-items: center;
|
|
align-items: center;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .pay_video{
|
|
|
|
+ background: linear-gradient( 180deg, #216CFF 10%, #C7F0FF 50%);
|
|
|
|
+ padding: 30rpx 20rpx;
|
|
|
|
+ // margin-bottom: calc(20rpx + constant(safe-area-inset-bottom)) !important;
|
|
|
|
+ margin-bottom: calc(env(safe-area-inset-bottom)) !important;
|
|
|
|
+ // height: 300rpx;
|
|
|
|
+ .tit{
|
|
|
|
+ color: #fff;
|
|
|
|
+ .tips{
|
|
|
|
+ margin-left: 5rpx;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .pays{
|
|
|
|
+ margin: 30rpx 0;
|
|
|
|
+ .pay_item{
|
|
|
|
+ background: #fff;
|
|
|
|
+ width: 40%;
|
|
|
|
+ height: 100rpx;
|
|
|
|
+ border-radius: 12rpx;
|
|
|
|
+ text-align: center;
|
|
|
|
+ line-height: 100rpx;
|
|
|
|
+ }
|
|
|
|
+ .pay_item_select{
|
|
|
|
+ background: #216CFF;
|
|
|
|
+ color: #fff;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .btn{
|
|
|
|
+ // margin-bottom: 30rpx;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|