|
@@ -1,5 +1,5 @@
|
|
|
<script setup>
|
|
|
-import { ref, computed, inject, nextTick } from "vue"
|
|
|
+import { ref, computed, inject, nextTick, onMounted } from "vue"
|
|
|
import { useRouter } from "vue-router"
|
|
|
import { useStore } from "vuex"
|
|
|
|
|
@@ -129,6 +129,28 @@ function onClickGoNextPage() {
|
|
|
}, 2000)
|
|
|
}
|
|
|
|
|
|
+// 将视频资源转换成blob
|
|
|
+const videoData = ref()
|
|
|
+const initVideoSrc = () => {
|
|
|
+ let xhr = new XMLHttpRequest()
|
|
|
+ /*通过get请求获取项目中的mp4文件流,因为axios修改responseType稍微有点麻烦,所以干脆写原生xhr请求了 */
|
|
|
+ xhr.open('GET', require(`@/assets/videos/fade-from-home-to-more-content${windowWidth >= 600 ? '-768' : ''}.mp4`), true)
|
|
|
+ //设置请求结果类型为blob
|
|
|
+ xhr.responseType = 'blob'
|
|
|
+ //回调
|
|
|
+ xhr.onload = function(e) {
|
|
|
+ if (this.status == 200) {
|
|
|
+ //创建blob对象,并把值赋给video的src
|
|
|
+ videoData.value = URL.createObjectURL(this.response)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ xhr.send()
|
|
|
+}
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ initVideoSrc()
|
|
|
+})
|
|
|
+
|
|
|
const backFu = () => {
|
|
|
if (
|
|
|
curPageIndex.value === 4 ||
|
|
@@ -164,14 +186,15 @@ const backFu = () => {
|
|
|
<!-- 了解更多视频 -->
|
|
|
<Transition name="fade-in">
|
|
|
<video
|
|
|
- v-if="isShowVideoFadeToNextPage"
|
|
|
+ v-show="isShowVideoFadeToNextPage"
|
|
|
ref="videoFadeToNextPageEl"
|
|
|
class="fade-to-next-page"
|
|
|
- :src="require(`@/assets/videos/fade-from-home-to-more-content${windowWidth >= 768 ? '-768' :''}.mp4`)"
|
|
|
+ :src="videoData"
|
|
|
playsinline
|
|
|
webkit-playsinline="true"
|
|
|
x5-video-player-type="h5"
|
|
|
muted
|
|
|
+ :controls="false"
|
|
|
@ended="
|
|
|
router.replace({
|
|
|
name: 'MoreContentChange',
|
|
@@ -201,6 +224,10 @@ const backFu = () => {
|
|
|
v-if="!store.state.haveShownStartup"
|
|
|
class="startup"
|
|
|
/>
|
|
|
+ <!-- <Startup
|
|
|
+ v-if="true"
|
|
|
+ class="startup"
|
|
|
+ /> -->
|
|
|
</Transition>
|
|
|
<!-- 首页标题 -->
|
|
|
<div
|
|
@@ -261,7 +288,7 @@ const backFu = () => {
|
|
|
alt=""
|
|
|
:style="{
|
|
|
opacity: curPageIndex == 4 ? 1 : 0,
|
|
|
- zIndex: 2,
|
|
|
+ zIndex: 3,
|
|
|
}"
|
|
|
draggable="false"
|
|
|
>
|
|
@@ -271,7 +298,7 @@ const backFu = () => {
|
|
|
src="@/assets/images/img_stone_all-min.png"
|
|
|
:style="{
|
|
|
opacity: curPageIndex == 5 ? 1 : 0,
|
|
|
- zIndex: 2,
|
|
|
+ zIndex: 3,
|
|
|
}"
|
|
|
alt=""
|
|
|
draggable="false"
|
|
@@ -571,8 +598,10 @@ img,
|
|
|
div {
|
|
|
-webkit-backface-visibility: hidden;
|
|
|
backface-visibility: hidden;
|
|
|
- // transition: opacity 1.5s, top 1.5s, transform 1.5s;
|
|
|
transition: opacity 1.5s, top 1.5s, width 1.5s, height 1.5s;
|
|
|
+ @media screen and (min-width: 600px) {
|
|
|
+ transition: auto;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
::-webkit-scrollbar {
|
|
@@ -596,6 +625,9 @@ div {
|
|
|
height: 100%;
|
|
|
object-fit: cover;
|
|
|
z-index: 20;
|
|
|
+ &&::-webkit-media-controls{
|
|
|
+ display: none !important;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
> .bg-mask {
|
|
@@ -684,8 +716,6 @@ div {
|
|
|
);
|
|
|
z-index: 7;
|
|
|
pointer-events: none;
|
|
|
- will-change: transform;
|
|
|
- backface-visibility: hidden;
|
|
|
z-index: 10;
|
|
|
|
|
|
& > div {
|
|
@@ -823,9 +853,16 @@ div {
|
|
|
v-bind("windowSizeInCssForRef")
|
|
|
);
|
|
|
// background: green;
|
|
|
+ will-change: translate;
|
|
|
transform: translate(-50%, 0);
|
|
|
z-index: 1;
|
|
|
|
|
|
+ @media screen and (min-width: 600px) {
|
|
|
+ transition: top 1.5s, width 1.5s, height 1.5s;
|
|
|
+ -webkit-backface-visibility: hidden;
|
|
|
+ backface-visibility: hidden;
|
|
|
+ }
|
|
|
+
|
|
|
> .painting-border {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
@@ -844,6 +881,11 @@ div {
|
|
|
position: absolute;
|
|
|
left: 50%;
|
|
|
transform: translate(-50%, 26%);
|
|
|
+ @media screen and (min-width: 600px) {
|
|
|
+ transition: left 1.5s, width 1.5s, height 1.5s;
|
|
|
+ -webkit-backface-visibility: hidden;
|
|
|
+ backface-visibility: hidden;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|