|
@@ -148,23 +148,15 @@
|
|
>
|
|
>
|
|
</button>
|
|
</button>
|
|
|
|
|
|
- <div
|
|
|
|
|
|
+ <SerialFrames
|
|
v-show="[1].includes(tourState)"
|
|
v-show="[1].includes(tourState)"
|
|
- class="treasure-frames-wrap"
|
|
|
|
- >
|
|
|
|
- <img
|
|
|
|
- v-for="index of treasureFrameTotalNum"
|
|
|
|
- v-show="treasureFrameCurNum === index - 1 ||
|
|
|
|
- treasureFrameCurNum - 1 === index - 1
|
|
|
|
- "
|
|
|
|
- :key="index"
|
|
|
|
- class="treasure-frame"
|
|
|
|
- :src="require(`@/assets/treasure-frames/3_${(index-1).toString().padStart(5, '0')}.jpg`)"
|
|
|
|
- alt=""
|
|
|
|
- @load="onTreasureFrameLoad(index - 1)"
|
|
|
|
- @error="onTreasureFrameError(index - 1)"
|
|
|
|
- >
|
|
|
|
- </div>
|
|
|
|
|
|
+ ref="treasure-serial-frames"
|
|
|
|
+ class="treasure-serial-frames"
|
|
|
|
+ :frame-total-num="treasureFrameTotalNum"
|
|
|
|
+ :frame-interval="40"
|
|
|
|
+ :image-src-func="(index) => require(`@/assets/treasure-frames/3_${(index - 1).toString().padStart(5, '0')}.jpg`)"
|
|
|
|
+ @over="tourState=2"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -240,9 +232,6 @@ export default {
|
|
|
|
|
|
// 文物展示相关
|
|
// 文物展示相关
|
|
treasureFrameTotalNum,
|
|
treasureFrameTotalNum,
|
|
- treasureFrameCurNum: 0,
|
|
|
|
- treasureFrameStateList: new Array(treasureFrameTotalNum),
|
|
|
|
- treasureFrameIntervalId: null,
|
|
|
|
|
|
|
|
// 文物淡出相关
|
|
// 文物淡出相关
|
|
treasureFadeOutProgress: {
|
|
treasureFadeOutProgress: {
|
|
@@ -293,23 +282,7 @@ export default {
|
|
tourState: {
|
|
tourState: {
|
|
handler(vNew, vOld) {
|
|
handler(vNew, vOld) {
|
|
if (vOld === 0 && vNew === 1) {
|
|
if (vOld === 0 && vNew === 1) {
|
|
- this.treasureFrameIntervalId = setInterval(() => {
|
|
|
|
- const frameNumBackup = this.treasureFrameCurNum
|
|
|
|
- this.treasureFrameCurNum++
|
|
|
|
- if (this.treasureFrameCurNum === this.treasureFrameTotalNum) {
|
|
|
|
- clearInterval(this.treasureFrameIntervalId)
|
|
|
|
- this.treasureFrameCurNum = 0
|
|
|
|
- this.tourState = 2
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- while (this.treasureFrameStateList[this.treasureFrameCurNum] === false) {
|
|
|
|
- this.treasureFrameCurNum++
|
|
|
|
- }
|
|
|
|
- if (this.treasureFrameStateList[this.treasureFrameCurNum] === undefined) {
|
|
|
|
- this.treasureFrameCurNum = frameNumBackup
|
|
|
|
- }
|
|
|
|
- }, 40)
|
|
|
|
|
|
+ this.$refs['treasure-serial-frames'].play()
|
|
} else if (vOld === 1 && vNew === 2) {
|
|
} else if (vOld === 1 && vNew === 2) {
|
|
this.treasureFadeOutTween.start()
|
|
this.treasureFadeOutTween.start()
|
|
}
|
|
}
|
|
@@ -484,8 +457,7 @@ export default {
|
|
this.tourState = 3
|
|
this.tourState = 3
|
|
this.treasureFadeInTween.stop()
|
|
this.treasureFadeInTween.stop()
|
|
this.treasureFadeOutTween.stop()
|
|
this.treasureFadeOutTween.stop()
|
|
- clearInterval(this.treasureFrameIntervalId)
|
|
|
|
- this.treasureFrameCurNum = 0
|
|
|
|
|
|
+ this.$refs['treasure-serial-frames'].stop()
|
|
if (this.$refs.treasure) {
|
|
if (this.$refs.treasure) {
|
|
this.$refs.treasure.style.left = this.treasureFadeInInitialLeft + 'px'
|
|
this.$refs.treasure.style.left = this.treasureFadeInInitialLeft + 'px'
|
|
this.$refs.treasure.style.top = this.treasureFadeInInitialTop + 'px'
|
|
this.$refs.treasure.style.top = this.treasureFadeInInitialTop + 'px'
|
|
@@ -614,18 +586,13 @@ export default {
|
|
z-index: 4;
|
|
z-index: 4;
|
|
border: none;
|
|
border: none;
|
|
}
|
|
}
|
|
- .treasure-frames-wrap {
|
|
|
|
|
|
+ .treasure-serial-frames {
|
|
position: absolute;
|
|
position: absolute;
|
|
top: 0;
|
|
top: 0;
|
|
left: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 100%;
|
|
height: 100%;
|
|
z-index: 3;
|
|
z-index: 3;
|
|
- > img {
|
|
|
|
- width: 100%;
|
|
|
|
- height: 100%;
|
|
|
|
- object-fit: contain;
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
@media screen and (max-height: 810px) {
|
|
@media screen and (max-height: 810px) {
|
|
.people-far-wrap {
|
|
.people-far-wrap {
|