Browse Source

动画bug

dev
xuhuajiao 3 years ago
parent
commit
454bfc3606
  1. 5
      manifest.json
  2. 4
      pages/index/index.vue
  3. 49
      pages/show/show.vue
  4. 446
      pages/show/show2.js
  5. BIN
      unpackage/cache/apk/__UNI__487D0A3_cm.apk
  6. 2
      unpackage/cache/apk/apkurl
  7. 2
      unpackage/cache/apk/cmManifestCache.json

5
manifest.json

@ -7,7 +7,7 @@
"transformPx" : false,
/* 5+App */
"app-plus" : {
"runmode" : "liberate",
// "runmode" : "liberate",
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
@ -22,8 +22,7 @@
},
/* */
"modules" : {
"VideoPlayer" : {},
"Webview-x5" : {}
"VideoPlayer" : {}
},
/* */
"distribute" : {

4
pages/index/index.vue

@ -4,9 +4,9 @@
<view class="text-area" @tap="to()">
<text class="title">{{title}}</text>
</view>
<view class="text-area" @tap="to2()">
<!-- <view class="text-area" @tap="to2()">
<text class="title">swiper</text>
</view>
</view> -->
</view>
</template>

49
pages/show/show.vue

@ -8,7 +8,6 @@
:src="linkUrl"
mode="aspectFill"
></image>
<!-- :autoplay="autoplay" -->
<video
:id="'video' + index"
v-if="item.material_type == 1 && itemIndex == index"
@ -87,15 +86,8 @@ export default {
infoTxt: '',
video_real_time: 0,
nitial_time: '',
//
startTime: 0,
//
startPosition: 0,
//
endPosition: 0,
startY: 0,
startX: 0,
elePosition: null,
isAutoSwitch: true,
moveX: 0, //x
moveY: 0, //y
@ -198,13 +190,14 @@ export default {
if (_this.duration == 0) {
_this.itemIndex++;
_this.flagIndex++;
this.isAutoSwitch = true;
this.changIndex();
}
}, 1000);
},
changIndex() {
const _this = this;
_this.linkUrl = ''
innerAudioContext.destroy();
if (_this.itemIndex == this.show_materials.length) {
// clearInterval(_this.timer);
this.itemIndex = 0;
@ -240,15 +233,14 @@ export default {
if (this.materialsCont[this.contentIndex].bgm_main) {
this.audioSrc = this.materialsCont[this.contentIndex].bgm_main;
this.audioName = this.materialsCont[this.contentIndex].bgm_name;
console.log('audioSrc', this.audioSrc);
console.log('audioName', this.audioName);
}
}
innerAudioContext = uni.getBackgroundAudioManager();
this.playVoice(this.audioSrc);
if (this.show_materials[this.itemIndex].material_type == 1) {
innerAudioContext.destroy()
innerAudioContext.src = ''
}
innerAudioContext = uni.createInnerAudioContext();
this.playVoice(this.audioSrc);
},
//
videoPlayEnd() {
@ -264,13 +256,9 @@ export default {
},
playEvent(e) {
console.log("play_video")
console.log(e);
let currentId = e.target.id; // id
console.log('currentId', currentId);
this.videoCtx = uni.createVideoContext(currentId);
// innerAudioContext.destroy()
// innerAudioContext.stop();
// innerAudioContext.src = ''
innerAudioContext.destroy()
},
loading(){
console.log('play_loading')
@ -280,12 +268,10 @@ export default {
this.videoCtx.pause()
},
timeupdateEvent(event) {
// this.currentTime = event.detail.currentTime;
console.log('timeupdateEvent')
},
//
timeUpdate(e) {
console.log(e)
var isReady = 1; // 1
// initial-time
let that = this;
@ -302,15 +288,14 @@ export default {
}
if (isReady == 1) {
if (currentTime > jump_time && currentTime - jump_time > 3) {
// let videoContext = uni.createVideoContext(e.target.id);
this.videoCtx.pause()
this.videoCtx.seek(0);
let videoContext = uni.createVideoContext(e.target.id);
uni.showToast({
title: '未完整看完该视频,不能快进',
icon: 'none',
duration: 2000
});
return;
videoContext.stop()
videoContext.seek(0);
}
}
that.video_real_time = currentTime; //
@ -320,25 +305,20 @@ export default {
if (innerAudioContext != undefined) {
innerAudioContext.stop();
}
innerAudioContext = uni.getBackgroundAudioManager();
innerAudioContext = uni.createInnerAudioContext();
// #ifdef APP-PLUS
innerAudioContext.stop();
innerAudioContext.src = src;
console.log('src',src)
innerAudioContext.autoplay = true;
innerAudioContext.loop = true;
innerAudioContext.onPlay(() => {
this.infoTxt = '';
this.infoTxt = '开始播放';
console.log('开始播放');
innerAudioContext.src = this.audioSrc
innerAudioContext.seek(0)
console.log(plus.device.getVolume())
});
innerAudioContext.onError(res => {
console.log(res.errMsg);
console.log(res.errCode);
innerAudioContext.src = ''
// innerAudioContext.stop();
});
innerAudioContext.onPause(function() {
@ -348,19 +328,10 @@ export default {
//
this.infoTxt = '停止';
console.log('停止');
innerAudioContext.src = ''
// innerAudioContext.stop();
});
innerAudioContext.onEnded(() => {
this.infoTxt = '音频自然播放结束事件';
console.log('音频自然播放结束事件');
// innerAudioContext.src = ''
// innerAudioContext.destroy()
console.log(this.itemIndex)
console.log(this.audioSrc)
innerAudioContext.src = this.audioSrc
innerAudioContext.seek(0)
innerAudioContext.play()
});
// #endif
},

446
pages/show/show2.js

@ -1,209 +1,271 @@
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"
'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/QQ%E8%A7%86%E9%A2%9120220414085212.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': '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"
'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'
}
]
},
{
'relaase_id': '4028e3d47fd34b5d017fd34c08e60003',
'relaase_name': 'fsfsdf',
'bgm_name': '主-res_04',
'bgm_main': 'https://qiniu.aiyxlib.com/yuekan-BGM20-Chinap.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__zoomInDown',
'bgm_name': 'img-4-1',
'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-4-2',
'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-4-3',
'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-4-5',
'bgm_url': '',
'ranking': '3'
}
]
}
]
}
};
module.exports = {
data
}
};

BIN
unpackage/cache/apk/__UNI__487D0A3_cm.apk

2
unpackage/cache/apk/apkurl

@ -1 +1 @@
https://ide.dcloud.net.cn/build/download/f4cdad70-ba2b-11ec-a335-23d69ebb189d
https://ide.dcloud.net.cn/build/download/b96ebc00-bba2-11ec-a6af-133fb8fdcf40

2
unpackage/cache/apk/cmManifestCache.json
File diff suppressed because it is too large
View File

Loading…
Cancel
Save