12 changed files with 660 additions and 70 deletions
			
			
		- 
					4App.vue
- 
					4manifest.json
- 
					8pages/bind/bind.vue
- 
					1pages/header.vue
- 
					2pages/index/index.vue
- 
					2pages/login/login.vue
- 
					180pages/show/show.vue
- 
					209pages/show/show2.js
- 
					298pages/show/show2.vue
- 
					BINunpackage/cache/apk/__UNI__487D0A3_cm.apk
- 
					2unpackage/cache/apk/apkurl
- 
					2unpackage/cache/apk/cmManifestCache.json
| @ -0,0 +1,209 @@ | |||
| let data = { | |||
| 	"code": 200, | |||
| 	"msg": "操作成功", | |||
| 	"data": [ | |||
| 		{ | |||
| 			"relaase_id": "4028e3d47fd34b5d017fd34c08e60003", | |||
| 			"relaase_name": "fsfsdf", | |||
| 			"bgm_name": "主-res_01", | |||
| 			"bgm_main": "https://qiniu.aiyxlib.com/yuekan-BGM31.mp3", | |||
| 			"release_start": "2022-03-30 00:00:00.0", | |||
| 			"release_end": "2022-04-24 00:00:00.0", | |||
| 			"show_materials": [ | |||
| 				{ | |||
| 					"release_id": "4028e3d47fd34b5d017fd34c08e60003", | |||
| 					"material_name": "bg-index.jpg", | |||
| 					"material_type": "0", | |||
| 					"deposit_url": "https://qiniu.aiyxlib.com/yuekan-6-shiguangji%402x.png", | |||
| 					"img_path": "https://qiniu.aiyxlib.com/yuekan-6-shiguangji%402x.png", | |||
| 					"device_direction": "1", | |||
| 					"duration": "15", | |||
| 					"effect": "animate__fadeInTopRight", | |||
| 					"bgm_name": "img-1-1", | |||
| 					"bgm_url": '', | |||
| 					"ranking": "1" | |||
| 				}, | |||
| 				{ | |||
| 					"release_id": "4028e3d47fd34b5d017fd34c08e60003", | |||
| 					"material_name": "s-j1.png", | |||
| 					"material_type": "0", | |||
| 					"deposit_url": "https://qiniu.aiyxlib.com/yuekan-4-content-background%402x.png", | |||
| 					"img_path": "https://qiniu.aiyxlib.com/yuekan-4-content-background%402x.png", | |||
| 					"device_direction": "1", | |||
| 					"duration": "15", | |||
| 					"effect": "animate__backInLeft", | |||
| 					"bgm_name": 'img-1-2', | |||
| 					"bgm_url": 'https://qiniu.aiyxlib.com/yuekan-BGM20-Chinap.mp3', | |||
| 					"ranking": "2" | |||
| 				}, | |||
| 				{ | |||
| 					"release_id": "4028e3d47fd34b5d017fd34c08e60003", | |||
| 					"material_name": "Atlas跑酷的成功与失败|2021【Boston Dynamics】.mp4", | |||
| 					"material_type": "1", | |||
| 					"deposit_url": "https://qiniu.aiyxlib.com/1608277325000.mp4", | |||
| 					"img_path": "", | |||
| 					"device_direction": "1", | |||
| 					"duration": "0", | |||
| 					"effect": "false", | |||
| 					"bgm_name": null, | |||
| 					"bgm_url": null, | |||
| 					"ranking": "4" | |||
| 				} | |||
| 			] | |||
| 		}, | |||
| 		{ | |||
| 			"relaase_id": "4028e3d47fcfa36c017fd0063c4d001a", | |||
| 			"relaase_name": "111", | |||
| 			"bgm_name": "主-res_02", | |||
| 			"bgm_main": "https://qiniu.aiyxlib.com/yuekan-BGM27.mp3", | |||
| 			"release_start": "2022-03-28 00:00:00.0", | |||
| 			"release_end": "2022-03-28 00:00:00.0", | |||
| 			"show_materials": [{ | |||
| 					"release_id": "4028e3d47fcfa36c017fd0063c4d001a", | |||
| 					"material_name": "s-j3.png", | |||
| 					"material_type": "0", | |||
| 					"deposit_url": "https://qiniu.aiyxlib.com/bj45_1%402x.png", | |||
| 					"img_path": "https://qiniu.aiyxlib.com/bj45_1%402x.png", | |||
| 					"device_direction": "1", | |||
| 					"duration": "15", | |||
| 					"effect": "animate__flip", | |||
| 					"bgm_name": 'img-2-1', | |||
| 					"bgm_url": null, | |||
| 					"ranking": "1" | |||
| 				}, | |||
| 				{ | |||
| 					"release_id": "4028e3d47fcfa36c017fd0063c4d001a", | |||
| 					"material_name": "s-t3.png", | |||
| 					"material_type": "0", | |||
| 					"deposit_url": "https://qiniu.aiyxlib.com/yuekan-1-read.jpg", | |||
| 					"img_path": "https://qiniu.aiyxlib.com/yuekan-1-read.jpg", | |||
| 					"device_direction": "1", | |||
| 					"duration": "15", | |||
| 					"effect": "animate__rotateInUpRight", | |||
| 					"bgm_name": 'img-2-2', | |||
| 					"bgm_url": null, | |||
| 					"ranking": "2" | |||
| 				}, | |||
| 				{ | |||
| 					"release_id": "4028e3d47fcfa36c017fd0063c4d001a", | |||
| 					"material_name": "s-j1.png", | |||
| 					"material_type": "0", | |||
| 					"deposit_url": "https://qiniu.aiyxlib.com/bj_15%402x.png", | |||
| 					"img_path": "https://qiniu.aiyxlib.com/bj_15%402x.png", | |||
| 					"device_direction": "1", | |||
| 					"duration": "15", | |||
| 					"effect": "animate__jackInTheBox", | |||
| 					"bgm_name": 'img-2-3', | |||
| 					"bgm_url": 'https://qiniu.aiyxlib.com/yuekan-BGM16.mp3', | |||
| 					"ranking": "3" | |||
| 				}, | |||
| 				{ | |||
| 					"release_id": "4028e3d47fd34b5d017fd34c08e60003", | |||
| 					"material_name": "bg-index.jpg", | |||
| 					"material_type": "0", | |||
| 					"deposit_url": "https://qiniu.aiyxlib.com/yuekan-6-shiguangji%402x.png", | |||
| 					"img_path": "https://qiniu.aiyxlib.com/yuekan-6-shiguangji%402x.png", | |||
| 					"device_direction": "1", | |||
| 					"duration": "15", | |||
| 					"effect": "animate__zoomInDown", | |||
| 					"bgm_name": 'img-2-4', | |||
| 					"bgm_url": null, | |||
| 					"ranking": "1" | |||
| 				}, | |||
| 				{ | |||
| 					"release_id": "4028e3d47fd34b5d017fd34c08e60003", | |||
| 					"material_name": "s-j1.png", | |||
| 					"material_type": "0", | |||
| 					"deposit_url": "https://qiniu.aiyxlib.com/yuekan-4-content-background%402x.png", | |||
| 					"img_path": "https://qiniu.aiyxlib.com/yuekan-4-content-background%402x.png", | |||
| 					"device_direction": "1", | |||
| 					"duration": "15", | |||
| 					"effect": "animate__slideInLeft", | |||
| 					"bgm_name": 'img-2-5', | |||
| 					"bgm_url": null, | |||
| 					"ranking": "2" | |||
| 				}, | |||
| 				{ | |||
| 					"release_id": "4028e3d47fcfa36c017fd0063c4d001a", | |||
| 					"material_name": "Atlas跑酷的成功与失败|2021【Boston Dynamics】.mp4", | |||
| 					"material_type": "1", | |||
| 					"deposit_url": "https://qiniu.aiyxlib.com/1634285181000.mp4", | |||
| 					"img_path": "", | |||
| 					"device_direction": "1", | |||
| 					"duration": "0", | |||
| 					"effect": "false", | |||
| 					"bgm_name": null, | |||
| 					"bgm_url": null, | |||
| 					"ranking": "4" | |||
| 				}, | |||
| 				{ | |||
| 					"release_id": "4028e3d47fcfa36c017fd0063c4d001a", | |||
| 					"material_name": "s-j1.png", | |||
| 					"material_type": "0", | |||
| 					"deposit_url": "https://qiniu.aiyxlib.com/bj_15%402x.png", | |||
| 					"img_path": "https://qiniu.aiyxlib.com/bj_15%402x.png", | |||
| 					"device_direction": "1", | |||
| 					"duration": "15", | |||
| 					"effect": "animate__jackInTheBox", | |||
| 					"bgm_name": 'img-2-7', | |||
| 					"bgm_url": 'https://qiniu.aiyxlib.com/yuekan-BGM16.mp3', | |||
| 					"ranking": "3" | |||
| 				} | |||
| 			] | |||
| 		}, | |||
| 		{ | |||
| 			"relaase_id": "4028e3d47fd34b5d017fd34c08e60003", | |||
| 			"relaase_name": "fsfsdf", | |||
| 			"bgm_name": "主-res_03", | |||
| 			"bgm_main": "https://qiniu.aiyxlib.com/yuekan-BGM19.mp3", | |||
| 			"release_start": "2022-03-30 00:00:00.0", | |||
| 			"release_end": "2022-04-24 00:00:00.0", | |||
| 			"show_materials": [ | |||
| 				{ | |||
| 					"release_id": "4028e3d47fd34b5d017fd34c08e60003", | |||
| 					"material_name": "Atlas跑酷的成功与失败|2021【Boston Dynamics】.mp4", | |||
| 					"material_type": "1", | |||
| 					"deposit_url": "https://qiniu.aiyxlib.com/1608277325000.mp4", | |||
| 					"img_path": "", | |||
| 					"device_direction": "1", | |||
| 					"duration": "0", | |||
| 					"effect": "false", | |||
| 					"bgm_name": null, | |||
| 					"bgm_url": null, | |||
| 					"ranking": "4" | |||
| 				}, | |||
| 				{ | |||
| 					"release_id": "4028e3d47fd34b5d017fd34c08e60003", | |||
| 					"material_name": "bg-index.jpg", | |||
| 					"material_type": "0", | |||
| 					"deposit_url": "https://qiniu.aiyxlib.com/yuekan-6-shiguangji%402x.png", | |||
| 					"img_path": "https://qiniu.aiyxlib.com/yuekan-6-shiguangji%402x.png", | |||
| 					"device_direction": "1", | |||
| 					"duration": "15", | |||
| 					"effect": "animate__fadeInTopRight", | |||
| 					"bgm_name": "img-3-1", | |||
| 					"bgm_url": '', | |||
| 					"ranking": "1" | |||
| 				}, | |||
| 				{ | |||
| 					"release_id": "4028e3d47fd34b5d017fd34c08e60003", | |||
| 					"material_name": "s-j1.png", | |||
| 					"material_type": "0", | |||
| 					"deposit_url": "https://qiniu.aiyxlib.com/bj_15%402x.png", | |||
| 					"img_path": "https://qiniu.aiyxlib.com/bj_15%402x.png", | |||
| 					"device_direction": "1", | |||
| 					"duration": "15", | |||
| 					"effect": "animate__backInLeft", | |||
| 					"bgm_name": 'img-3-2', | |||
| 					"bgm_url": 'https://qiniu.aiyxlib.com/yuekan-BGM20-Chinap.mp3', | |||
| 					"ranking": "2" | |||
| 				} | |||
| 			] | |||
| 		}, | |||
| 	] | |||
| } | |||
| 
 | |||
| 
 | |||
| module.exports = { | |||
| 	data | |||
| } | |||
| @ -0,0 +1,298 @@ | |||
| <template> | |||
| 	<view class="main_container"> | |||
| 		<view class="show-content"> | |||
| 			<view v-for="(item, index) in show_materials" :key="index" :class="['show-item', item.material_type == 1 && itemIndex == index ? 'show-video' : '']"> | |||
| 				<!-- <image | |||
| 					:class="['show-img', 'animate__animated', item.material_type == 0 ? item.effect : '']" | |||
| 					v-show="item.material_type == 0 && itemIndex == index" | |||
| 					:src="require('@/static/source/' + linkUrl)" | |||
| 				></image> --> | |||
| 				<image | |||
| 					:class="['show-img', 'animate__animated', item.material_type == 0 ? item.effect : '']" | |||
| 					v-show="item.material_type == 0 && itemIndex == index" | |||
| 					:src="'https://images.weserv.nl/?url=' + linkUrl" | |||
| 					mode="aspectFill" | |||
| 				></image> | |||
| 				<video | |||
| 					v-if="item.material_type == 1 && itemIndex == index" | |||
| 					:src="'../../static/source/' + linkUrl" | |||
| 					:autoplay="autoplay" | |||
| 					controls | |||
| 					object-fit="fill" | |||
| 					@ended="videoPlayEnd"           | |||
| 				></video> | |||
| 				<!-- <iframe v-if="item.material_type == 1 && itemIndex == index" ref="iframe" class="video-iframe" style="z-index:1;" :src="linkUrl"  | |||
| 					    frameborder="0"  scrolling="no" allowfullscreen="true"    | |||
| 				            webkitallowfullscreen="true" mozallowfullscreen="true" @ended="videoPlayEnd"> | |||
| 				    </iframe> --> | |||
| 			</view> | |||
| 		</view> | |||
| 		<view class="show-audio"></view> | |||
| 		<view style="position:absolute; bottom:55.55rpx; left: 69.44rpx; color: #fff; z-index: 99999;">{{infoTxt}}--{{linkUrl}}--{{ audioName }}</view> | |||
| 		 | |||
| 
 | |||
| 		<!-- <view v-if="!deviceInfoShow" class="local-data"> | |||
| 			<text class="title">欢迎使用数字新视窗</text> | |||
| 			<view class="data-info">设备ID : 123456789</view> | |||
| 			<view class="data-info">设备账号 : 123456789</view> | |||
| 			<view class="data-info">设备名称 : CVBBN2</view> | |||
| 			<view class="count-down" @click="deviceInfoShow=true">{{ count }}</view> | |||
| 		</view> --> | |||
| 	</view> | |||
| </template> | |||
| 
 | |||
| <script> | |||
| import utils from '@/utils/common.js'; | |||
| import one from './show2.js'; | |||
| let innerAudioContext = uni.createInnerAudioContext(); | |||
| export default { | |||
| 	components: {}, | |||
| 	data() { | |||
| 		return { | |||
| 			// 已登录情况显示6S得设备信息 | |||
| 			count: 6, | |||
| 			deviceInfoShow: false, | |||
| 			autoplay: false, | |||
| 			// 素材 | |||
| 			materialsCont: [], | |||
| 			show_materials: [], | |||
| 			contentIndex: 0, | |||
| 			itemIndex: 0, | |||
| 			linkUrl: '', | |||
| 			timer: null, | |||
| 			duration: null, | |||
| 			audioSrc: null, | |||
| 			audioName: null, | |||
| 			itemLength: [], | |||
| 			flagIndex: 0, | |||
| 			infoTxt:'', | |||
| 			voicePlayer: null | |||
| 		}; | |||
| 	}, | |||
| 	onLoad() { | |||
| 		const _this = this; | |||
| 		let result = one.data.data; | |||
| 		this.materialsCont = result; | |||
| 		this.materialsCont.map(item => { | |||
| 			this.itemLength = this.itemLength.concat(item.show_materials.length); | |||
| 			this.show_materials = this.show_materials.concat(item.show_materials); | |||
| 		}); | |||
| 		// 初始化 | |||
| 		this.changIndex(); | |||
| 		 | |||
| 		this.voicePlayer = plus.audio.createPlayer({ src: 'https://qiniu.aiyxlib.com/yuekan-BGM27.mp3' }); | |||
| 		this.voicePlayer.setRoute(this.playMode); | |||
| 		// 监听自然播放完成 | |||
| 		this.voicePlayer.addEventListener('ended', () => { | |||
| 			// 销毁正在监听设备距离的监听器 | |||
| 			if (this.watchProximity) { | |||
| 				plus.proximity.clearWatch(this.watchProximity); | |||
| 				this.watchProximity = null; | |||
| 			} | |||
| 			console.log('播放完毕了'); | |||
| 		}); | |||
| 		// 监听音频可以开始播放事件 | |||
| 		this.voicePlayer.addEventListener('play', () => { | |||
| 			// 首次播放时会执行两次回调 | |||
| 			if (this.playState !== 2) { | |||
| 				// plus.audio.ROUTE_SPEAKER:扬声器 0 | |||
| 				// plus.audio.ROUTE_EARPIECE:听筒 1 | |||
| 				this.voicePlayer.setRoute(this.playMode); | |||
| 				this.playState++; | |||
| 			} | |||
| 		}); | |||
| 		// 监听音频播放错误事件 | |||
| 		this.voicePlayer.addEventListener('error', (err) => { | |||
| 			console.log('报错err', err); | |||
| 			// 销毁正在监听设备距离的监听器 | |||
| 			if (this.watchProximity) { | |||
| 				plus.proximity.clearWatch(this.watchProximity); | |||
| 				this.watchProximity = null; | |||
| 			} | |||
| 		}); | |||
| 	}, | |||
| 	created() { | |||
| 		this.atuo(); | |||
| 	}, | |||
| 	mounted() { | |||
| 		// this.countdown(); | |||
| 		this.changeMaterial(); | |||
| 		this.voicePlayer.play(); | |||
| 	}, | |||
| 	methods: { | |||
| 		changeMaterial() { | |||
| 			const _this = this; | |||
| 			clearInterval(_this.timer); | |||
| 			_this.timer = setInterval(() => { | |||
| 				_this.duration -= 1; | |||
| 				if (_this.duration == 0) { | |||
| 					_this.itemIndex++; | |||
| 					_this.flagIndex++; | |||
| 					this.changIndex(); | |||
| 				} | |||
| 			}, 1000); | |||
| 		}, | |||
| 		changIndex() { | |||
| 			const _this = this; | |||
| 			if (_this.itemIndex == this.show_materials.length) { | |||
| 				// clearInterval(_this.timer); | |||
| 				this.itemIndex = 0; | |||
| 				this.flagIndex = 0; | |||
| 				this.contentIndex = 0; | |||
| 				innerAudioContext.stop(); | |||
| 			} | |||
| 			_this.duration = this.show_materials[this.itemIndex].duration; | |||
| 			_this.linkUrl = this.show_materials[this.itemIndex].deposit_url; | |||
| 			if (this.show_materials[this.itemIndex].bgm_url) { | |||
| 				_this.audioSrc = '../../static/source/' + this.show_materials[this.itemIndex].bgm_url; | |||
| 				_this.audioName = this.show_materials[this.itemIndex].bgm_name; | |||
| 			} else { | |||
| 				if (this.contentIndex == this.itemLength.length) { | |||
| 					this.flagIndex = 0; | |||
| 					this.contentIndex = 0; | |||
| 				}else{ | |||
| 					if (this.flagIndex == this.itemLength[this.contentIndex]) { | |||
| 						this.flagIndex = 0; | |||
| 						this.contentIndex++; | |||
| 					} | |||
| 				} | |||
| 				if (this.materialsCont[this.contentIndex].bgm_main) { | |||
| 					this.audioSrc = '../../static/source/' + this.materialsCont[this.contentIndex].bgm_main; | |||
| 					this.audioName = this.materialsCont[this.contentIndex].bgm_name; | |||
| 				} | |||
| 			} | |||
| 			// this.playVoice(this.audioSrc); | |||
| 			if (this.show_materials[this.itemIndex].material_type == 1) { | |||
| 				innerAudioContext.stop(); | |||
| 			} | |||
| 		}, | |||
| 		videoPlayEnd() { | |||
| 			this.itemIndex++; | |||
| 			this.flagIndex++; | |||
| 			this.changIndex(); | |||
| 		}, | |||
| 		playVoice(src) { | |||
| 			if (innerAudioContext != undefined) { | |||
| 				innerAudioContext.stop(); | |||
| 			} | |||
| 			innerAudioContext = uni.createInnerAudioContext(); | |||
| 			innerAudioContext.stop(); | |||
| 			innerAudioContext.src = src; | |||
| 			innerAudioContext.autoplay = true; | |||
| 			innerAudioContext.onPlay(() => { | |||
| 				this.infoTxt = '' | |||
| 				this.infoTxt = '开始播放' | |||
| 				console.log('开始播放'); | |||
| 			}); | |||
| 			innerAudioContext.onError(res => { | |||
| 				console.log(res.errMsg); | |||
| 				console.log(res.errCode); | |||
| 				innerAudioContext.stop(); | |||
| 			}); | |||
| 			innerAudioContext.onPause(() => { | |||
| 				//暂停监听 | |||
| 				this.infoTxt = '暂停' | |||
| 				console.log('暂停'); | |||
| 				// innerAudioContext.stop(); | |||
| 			}); | |||
| 			innerAudioContext.onEnded(() => { | |||
| 				// 自然播放结束监听也需要更改isPause 开关状态 | |||
| 				this.infoTxt = '音频自然播放结束事件' | |||
| 				console.log('音频自然播放结束事件'); | |||
| 				innerAudioContext.stop(); | |||
| 			}); | |||
| 		}, | |||
| 		atuo() { | |||
| 			this.autoplay = true; | |||
| 		}, | |||
| 		countdown() { | |||
| 			this.count = 6; | |||
| 			const timer = setInterval(() => { | |||
| 				this.count -= 1; | |||
| 				if (this.count < 1) { | |||
| 					clearInterval(timer); | |||
| 					this.deviceInfoShow = true; | |||
| 					console.log('倒计时结束'); | |||
| 				} | |||
| 			}, 1000); | |||
| 		} | |||
| 	} | |||
| }; | |||
| </script> | |||
| 
 | |||
| <style scoped> | |||
| .main_container { | |||
| 	position: relative; | |||
| 	overflow: hidden; | |||
| 	background: #000; | |||
| } | |||
| .show-item { | |||
| 	/* width: 100%; | |||
| 	height: 100vh; */ | |||
| 	display: flex; | |||
| 	flex-direction: column; | |||
| 	align-items: center; | |||
| 	justify-content: center; | |||
| } | |||
| .show-item .show-img { | |||
| 	width: 100%; | |||
| 	height: 100vh; | |||
| 	object-fit: cover; | |||
| } | |||
| .show-item uni-video { | |||
| 	width: 100%; | |||
| } | |||
| .show-video { | |||
| 	width: 100%; | |||
| 	height: 100vh; | |||
| } | |||
| .show-audio { | |||
| 	position: fixed; | |||
| 	bottom: 79.16rpx; | |||
| 	right: 46.52rpx; | |||
| 	width: 159.72rpx; | |||
| 	height: 152.08rpx; | |||
| 	background: url(~@/static/images/an-yy.png) no-repeat; | |||
| 	background-size: cover; | |||
| } | |||
| .show-audio uni-image { | |||
| 	width: 159.72rpx; | |||
| 	height: 152.08rpx; | |||
| } | |||
| .local-data { | |||
| 	position: absolute; | |||
| 	left: 50%; | |||
| 	top: 50%; | |||
| 	display: flex; | |||
| 	flex-direction: column; | |||
| 	justify-content: center; | |||
| 	width: 625rpx; | |||
| 	height: 555.55rpx; | |||
| 	transform: translate(-50%, -50%); | |||
| 	font-size: 27.77rpx; | |||
| 	color: #333; | |||
| 	border-radius: 27.77rpx; | |||
| 	background: rgba(255, 255, 255, 0.85); | |||
| } | |||
| .title { | |||
| 	margin-bottom: 32.63rpx; | |||
| 	font-size: 56.94rpx; | |||
| 	text-align: center; | |||
| } | |||
| .data-info { | |||
| 	padding: 0 83.33rpx; | |||
| 	margin-bottom: 32.63rpx; | |||
| } | |||
| .count-down { | |||
| 	position: absolute; | |||
| 	right: 34.72rpx; | |||
| 	top: 27.77rpx; | |||
| 	width: 48.61rpx; | |||
| 	height: 48.61rpx; | |||
| 	font-size: 30.55rpx; | |||
| 	text-align: center; | |||
| 	line-height: 48.61rpx; | |||
| 	border: 1px solid #333; | |||
| 	border-radius: 50%; | |||
| } | |||
| </style> | |||
| @ -1 +1 @@ | |||
| https://ide.dcloud.net.cn/build/download/6e254010-b979-11ec-8bee-47dfbe383b6d | |||
| https://ide.dcloud.net.cn/build/download/f4cdad70-ba2b-11ec-a335-23d69ebb189d | |||
						
							
						
						
							2
	
						
						unpackage/cache/apk/cmManifestCache.json
						
							File diff suppressed because it is too large
							
							
								
									View File
								
							
						
					
				File diff suppressed because it is too large
							
							
								
									View File
								
							
						
						Write
						Preview
					
					
					Loading…
					
					Cancel
						Save
					
		Reference in new issue