|
@@ -29,9 +29,9 @@
|
|
@cutKankan="cutKankan"
|
|
@cutKankan="cutKankan"
|
|
@daoLanCut="daoLanCut"
|
|
@daoLanCut="daoLanCut"
|
|
@stopPlay="stopPlay"
|
|
@stopPlay="stopPlay"
|
|
- :acList="frameId"
|
|
|
|
- :progress="progress"
|
|
|
|
|
|
+ :acList="partId"
|
|
:playing="playing"
|
|
:playing="playing"
|
|
|
|
+ :progressPart="progressPart"
|
|
/>
|
|
/>
|
|
|
|
|
|
<!-- 左上名字和介绍 -->
|
|
<!-- 左上名字和介绍 -->
|
|
@@ -65,10 +65,11 @@ export default {
|
|
loding: true,
|
|
loding: true,
|
|
title: true,
|
|
title: true,
|
|
numSta: 2,
|
|
numSta: 2,
|
|
- // -------
|
|
|
|
|
|
+ // -------自动导览数据
|
|
partId: 0,
|
|
partId: 0,
|
|
frameId: null,
|
|
frameId: null,
|
|
progress: 0,
|
|
progress: 0,
|
|
|
|
+ progressPart: 0,
|
|
disable: false,
|
|
disable: false,
|
|
playing: false,
|
|
playing: false,
|
|
sonInfo: null,
|
|
sonInfo: null,
|
|
@@ -119,14 +120,15 @@ export default {
|
|
if (this.disable) {
|
|
if (this.disable) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
-
|
|
|
|
- this.frameId = index;
|
|
|
|
|
|
+ this.partId = index;
|
|
|
|
+ this.frameId = 0;
|
|
this.disable = true;
|
|
this.disable = true;
|
|
this.progress = 0;
|
|
this.progress = 0;
|
|
|
|
+ this.progressPart = 0;
|
|
|
|
|
|
let player = await this.kankan.TourManager.player;
|
|
let player = await this.kankan.TourManager.player;
|
|
player.pause();
|
|
player.pause();
|
|
- await player.selectFrame(index);
|
|
|
|
|
|
+ await player.selectPart(index);
|
|
this.disable = false;
|
|
this.disable = false;
|
|
},
|
|
},
|
|
|
|
|
|
@@ -181,8 +183,13 @@ export default {
|
|
this.progress = 0;
|
|
this.progress = 0;
|
|
this.frameId = null;
|
|
this.frameId = null;
|
|
this.$refs.RbottomRef.leftCut(-1);
|
|
this.$refs.RbottomRef.leftCut(-1);
|
|
|
|
+ // 兼容最后一个画面没有进度的问题
|
|
|
|
+ this.progressPart = 100;
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ let currPartId;
|
|
|
|
+ let currFrames;
|
|
|
|
+
|
|
player.on("progress", ({ partId, frameId, progress }) => {
|
|
player.on("progress", ({ partId, frameId, progress }) => {
|
|
// 不让自动漫游多次点击
|
|
// 不让自动漫游多次点击
|
|
if (frameId === 0) {
|
|
if (frameId === 0) {
|
|
@@ -194,6 +201,17 @@ export default {
|
|
this.partId = partId;
|
|
this.partId = partId;
|
|
this.frameId = frameId;
|
|
this.frameId = frameId;
|
|
this.progress = Number(progress * 100).toFixed(5);
|
|
this.progress = Number(progress * 100).toFixed(5);
|
|
|
|
+ // 片段进度
|
|
|
|
+ if (this.tours.length == 1) {
|
|
|
|
+ this.progressPart = this.progress;
|
|
|
|
+ } else {
|
|
|
|
+ if (currPartId != partId) {
|
|
|
|
+ currPartId = partId;
|
|
|
|
+ currFrames = this.tours[partId].list.length;
|
|
|
|
+ this.progressPart = 0;
|
|
|
|
+ }
|
|
|
|
+ this.progressPart += progress / currFrames;
|
|
|
|
+ }
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
|
|
@@ -227,20 +245,22 @@ export default {
|
|
|
|
|
|
// 导览数据
|
|
// 导览数据
|
|
kankan.TourManager.on("loaded", (tours) => {
|
|
kankan.TourManager.on("loaded", (tours) => {
|
|
|
|
+ // console.log("--------", tours);
|
|
|
|
+ this.tours = tours;
|
|
this.$refs.RbottomRef.baseSw(tours);
|
|
this.$refs.RbottomRef.baseSw(tours);
|
|
});
|
|
});
|
|
|
|
|
|
// 全部热点数据
|
|
// 全部热点数据
|
|
kankan.store.on("tags", (tags) => {
|
|
kankan.store.on("tags", (tags) => {
|
|
this.baseHotData = tags.tags.reverse();
|
|
this.baseHotData = tags.tags.reverse();
|
|
- let temp = [];
|
|
|
|
- tags.tags.forEach((v) => {
|
|
|
|
- let arrTitle = v.title.split("&");
|
|
|
|
- // 显示在页面的热点图标
|
|
|
|
- if (arrTitle[2]) {
|
|
|
|
- temp.push(v);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ // let temp = [];
|
|
|
|
+ // tags.tags.forEach((v) => {
|
|
|
|
+ // let arrTitle = v.title.split("&");
|
|
|
|
+ // // 显示在页面的热点图标
|
|
|
|
+ // if (arrTitle[2]) {
|
|
|
|
+ // temp.push(v);
|
|
|
|
+ // }
|
|
|
|
+ // });
|
|
});
|
|
});
|
|
|
|
|
|
// 热点
|
|
// 热点
|