lgh 1 年之前
父節點
當前提交
82f7ebd78e
共有 6 個文件被更改,包括 28 次插入10 次删除
  1. 10 1
      components/video-player/video-player.vue
  2. 1 1
      config/modules/mock.js
  3. 1 1
      manifest.json
  4. 2 0
      pages/login/index.vue
  5. 12 7
      pages/play/index.vue
  6. 2 0
      pages/search/index.vue

+ 10 - 1
components/video-player/video-player.vue

@@ -1,6 +1,6 @@
 <template>
     <view class="videoPlayer">
-        <video :id="videoId" ref="myVideo" class="video" height="100%" :autoplay="autoplay" :initial-time="initialTime" :loop="true" :src="videoUrl" :show-center-play-btn="false" :enable-play-gesture="true" :controls="controls" :vslide-gesture="true" :show-play-btn="false" :show-fullscreen-btn="false" @controlstoggle="controlstoggle($event)" @timeupdate="updateProgress" @play="play" @pause="pause" @fullscreenchange="onFullscreenChange" @click="togglePlay"></video>
+        <video :id="videoId" ref="myVideo" class="video" height="100%" :autoplay="autoplay" :initial-time="initialTime" :loop="true" :src="videoUrl" :show-center-play-btn="false" :enable-play-gesture="true" :controls="controls" :vslide-gesture="true" :show-play-btn="false" @controlstoggle="controlstoggle($event)" @timeupdate="updateProgress" @play="play" @pause="pause" @fullscreenchange="onFullscreenChange" @click="togglePlay"></video>
         <view v-if="isPlay" class="play" @click="togglePlay"><image :src="imgsrc"></image></view>
     </view>
 </template>
@@ -18,6 +18,10 @@ export default {
         initialTime:{
             type: [ String,Number ],
             default: ''
+        },
+        selanShow:{
+            type: Boolean,
+            default: true
         }
     },
     data(){
@@ -81,6 +85,11 @@ export default {
         },  
         onFullscreenChange(event){
             this.isFullscreen = event.detail.fullScreen;
+            if(this.isFullscreen){
+                this.$emit('chectSelanShow',false)
+            }else{
+                this.$emit('chectSelanShow',true)
+            }
             console.log(event,this.isFullscreen,'ff你看');
         }
     },

+ 1 - 1
config/modules/mock.js

@@ -1,6 +1,6 @@
 module.exports = {
 	env: 'mock',
-	baseUrl: 'http://10.0.60.46:8989',
+	baseUrl: 'http://10.0.60.55:8989',
 	appid: 'wxd51ce33b1119f45d',
 	wapSrc: 'http://10.0.60.88:80/#/',
 }

+ 1 - 1
manifest.json

@@ -86,7 +86,7 @@
             "https" : false
         },
         "router" : {
-            "base" : "/playVideo/"
+            "base" : "./"
         },
         "title" : "视频"
     }

+ 2 - 0
pages/login/index.vue

@@ -42,6 +42,7 @@ export default {
 
         // 登录
         async toLogin () {
+            uni.showLoading()
             let params = {
                 username: this.username,
                 password: this.password
@@ -50,6 +51,7 @@ export default {
             const { token } = res
             uni.setStorageSync('Authorization',token)
             uni.setStorageSync('username',this.username)
+            uni.hideLoading()
             uni.showToast({
                 title: '登录成功',
                 icon:'none'

+ 12 - 7
pages/play/index.vue

@@ -1,8 +1,8 @@
 <template>
 	<view class="play">
-		<video-player v-if="videoUrl" :videoUrl="videoUrl" :initialTime="durationSeconds" @timeUpdate="handleTimeUpdate"></video-player>
+		<video-player v-if="videoUrl" :videoUrl="videoUrl" :initialTime="durationSeconds" :selanShow="selanShow" @timeUpdate="handleTimeUpdate" @chectSelanShow="chectSelanShow"></video-player>
 		<image v-else :src="videoData.thumbnail" class="cover_img"></image>
-		<view class="anthologys_detail">
+		<view v-if="selanShow" class="anthologys_detail">
 			<view class="anthology" @click="show = true">
 				<view class="ant">
 					<image :src="play_img" class="play"></image>
@@ -92,11 +92,12 @@
 			return {
 				id:'',
 				type: 0,
-				watchVo:{},
-				videoData:{},
-				sort:0,
-				show: false,
-				isPayShow: false,
+				watchVo:{},//点击短剧
+				videoData:{},//传入短剧信息
+				sort:0,//集数
+				show: false,//集数弹窗
+				isPayShow: false,//购买集数弹窗
+				selanShow: true,
 				videoUrl: '', //路径
 				play_img: defaultConfig.ossImgUrl + '/playVideo/video/ic_search.png',
 				coverImg: 'https://obs-fanxing.obs.cn-east-3.myhuaweicloud.com/retail/main/img_bgtop.png',
@@ -190,6 +191,10 @@
 				if(type == this.type) return
 				type?this.type = 1:this.type = 0
 			},
+			//显示剧名集数
+			chectSelanShow(status){
+				this.selanShow = status
+			},
 			open() {
 			},
 			close() {

+ 2 - 0
pages/search/index.vue

@@ -27,6 +27,7 @@ export default {
     methods: {
         // 获取视频节目分页
         async getVideoPage() {
+            uni.showLoading()
             let params = {
                 orderByColumn: "",
                 orderByAsc: true,
@@ -37,6 +38,7 @@ export default {
             }
             const res = await getServerShipProgramPage(params)
             this.list = res.list
+            uni.hideLoading()
             console.log(res);
         },
         search(){