dever 5 gadi atpakaļ
vecāks
revīzija
38f6348086

+ 4 - 2
lib/dever/index.js

@@ -779,7 +779,8 @@ var dever = {
 	},
 	//页面跳转
 	location : function(path, go) {
-		var self = this;
+		var self = this;
+		console.info(path);return;
 		if (path.indexOf('http') > -1) {
 			this.debug('http:' + path);
 			this.data('web_view', path);
@@ -809,7 +810,8 @@ var dever = {
 					window.location.href = path + 'refer=' + url;
 				}
 			}
-		} else {
+		} else {
+			console.info(path);return;
 			this.debug('navigateTo:' + go + ':' + path);
 			if (this.switchTab.indexOf(path) != -1) {
 				uni.switchTab({

+ 44 - 0
pages/dream/videoPlay.vue

@@ -0,0 +1,44 @@
+<template>
+	<view>
+		<video
+			:src="video"
+			preload
+			autoplay
+			show-play-btn="true"
+			controls="false"
+			loop="true"
+			ref="video_url"
+			play-btn-position="center"
+			class="video"
+			:poster="pic">
+		</video>
+	</view>
+</template>
+
+<script>
+export default{
+	data() {
+		return {
+			video : '',
+			pic : '',
+		}
+	},
+	onLoad(option) {
+		this.video = option.video;
+		this.pic = option.pic;
+	},
+	methods:{
+		
+	},
+}
+</script>
+
+<style>
+video{
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  top: 0;
+  left: 0;
+}
+</style>

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 5 - 2
pages/dream/view.vue


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 17 - 110
pages/dream/view/dream.vue


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 76 - 12
pages/dream/view/pic.vue


+ 69 - 0
pages/dream/view/picGrid.vue

@@ -0,0 +1,69 @@
+<template name="picGrid">
+	<view class="cover">
+		<block v-for="(v, k) in item.text">
+			<image :class="['abs-tag', config.position_f[v.text-1]]" v-if="v.pic" :src="v.pic" mode="widthFix"></image>
+		</block>
+	</view>
+</template>
+
+<script>
+export default {
+	name: "picGrid",
+	props: {
+		config : {
+			type : Object,
+			value : null
+		},
+		item : {
+			type    : Object,
+			value	: null
+		},
+	},
+	methods:{
+		
+	},
+}
+</script>
+
+<style>
+.abs-tag {
+  position: fixed;
+  color: #fff;
+  display: flex;
+  flex-direction: column;
+}
+.abs-tag view{
+  line-height: 1em;
+  overflow: hidden;
+}
+.abs-tag text {
+  background-color: #000;
+  margin-bottom: 10rpx;
+  font-size: 28rpx;
+  line-height: 1;
+  padding: 0 2rpx;
+}
+
+.abs-tag.tl {
+
+}
+
+.abs-tag.tr {
+  right: 0rpx;
+}
+
+.abs-tag.bl {
+  width: 50%;
+  height:50%;
+  bottom: 125rpx;
+  left: 30rpx;
+}
+
+.abs-tag.br {
+  width: 50%;
+  height:50%;
+  bottom: 125rpx;
+  right: 30rpx;
+  text-align: right;
+}
+</style>

+ 36 - 0
pages/dream/view/vod.vue

@@ -0,0 +1,36 @@
+<template name="vod">
+	<view>
+		<image :src="item.pic" mode='widthFix' class="slide-image" />
+		<view class="ico-video-play" @click="location" data-page="dream/videoPlay" :data-video="item.video" :data-pic="item.pic"></view>
+	</view>
+</template>
+
+<script>
+export default {
+	name: "vod",
+	props: {
+		item : {
+			type    : Object,
+			value	: null
+		},
+	},
+}
+</script>
+
+<style>
+.slide-image {
+  width: 750rpx;
+  height: 100%;
+  display: block;
+}
+.ico-video-play{
+  background: url(../../../static/icon/ico-video-play.png) no-repeat;
+  background-size: cover;
+  width: 100rpx;
+  height: 100rpx;
+  position: absolute;
+  left: 50%;
+  top: 50%;
+  transform: translate3d(-50%,-50%,0);
+}
+</style>

+ 87 - 0
pages/dream/view/vodShort.vue

@@ -0,0 +1,87 @@
+<template name="vodShort">
+	<view class="swiper">
+		<video
+			:src="item.video"
+			preload
+			show-play-btn="true"
+			controls="false"
+			loop="true"
+			:id="`video_${item.id}`"
+			objectFit="fill"
+			:enable-progress-gesture="false"
+			@click="play"
+			ref="video_url"
+			play-btn-position="center"
+			class="video"
+			:poster="item.pic"
+			@timeupdate="timeupdate">
+		</video>
+		
+		<cover-image
+		class="play" 
+		@tap="play"
+		src="../../../static/video/play.png"></cover-image>
+	</view>
+</template>
+
+<script>
+var play = false;
+export default {
+	name: "vodShort",
+	props: {
+		item : {
+			type    : Object,
+			value	: null
+		},
+	},
+	methods:{
+		play() {
+			let video_id = this.video_list[this.current_index].video_id;
+			
+			if (play) {
+				console.log('播放视频',`video_${video_id}`);
+				this.videoCtx = uni.createVideoContext(`video_${video_id}`, this);
+				this.videoCtx.play();
+				this.show_play = false;
+				play = false;
+			} else {
+				console.log('暂停视频',`video_${video_id}`);
+				this.videoCtx = uni.createVideoContext(`video_${video_id}`, this);
+				this.videoCtx.pause();
+				this.show_play = true;
+				play = true;
+			}
+		},
+		pause() {
+			let video_id = this.video_list[this.current_index].video_id;
+			this.videoCtx = uni.createVideoContext(`video_${video_id}`, this);
+			this.videoCtx.pause();
+			this.show_play = true;
+			play = true;
+		},
+	},
+}
+</script>
+
+<style>
+.swiper{
+	width: 100vw;
+	height: 100vh;	
+	position: fixed;
+	top: 0;
+	left: 0;
+}
+.video {
+	width: 100%;
+	height: 100%;
+	position: relative;
+}
+.play{
+	position: absolute;
+	width: 20vw;
+	height: 20vw;
+	left: 40vw;
+	top: 40vh;
+	opacity: 0.5;
+}
+</style>

BIN
static/icon/ico-download.png


BIN
static/icon/ico-video-play.png


BIN
static/video/axc.png


BIN
static/video/ay2.png


BIN
static/video/b6p.png


BIN
static/video/bed.png


BIN
static/video/changpian.png


BIN
static/video/play.png


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels