Commit 05bfcf63 authored by Xuguangxing's avatar Xuguangxing

feat: 修复视频播放问题

parent cd4b0f09
...@@ -8,6 +8,7 @@ import { resizeDiv } from '@/service/utils.service'; ...@@ -8,6 +8,7 @@ import { resizeDiv } from '@/service/utils.service';
export default class FreedomContainer extends Mixins(TransformStyleMixin, SaMixin) { export default class FreedomContainer extends Mixins(TransformStyleMixin, SaMixin) {
@Getter('pageData') pageData; @Getter('pageData') pageData;
@State(state => state.activity.curChildIndex) curChildIndex; @State(state => state.activity.curChildIndex) curChildIndex;
showVideo = false;
@Mutation('UPDATE_PAGE_INFO') updatePageInfo; @Mutation('UPDATE_PAGE_INFO') updatePageInfo;
@Prop({type: Object, default: () => ({ child: [] })}) childItem; @Prop({type: Object, default: () => ({ child: [] })}) childItem;
...@@ -16,6 +17,7 @@ export default class FreedomContainer extends Mixins(TransformStyleMixin, SaMixi ...@@ -16,6 +17,7 @@ export default class FreedomContainer extends Mixins(TransformStyleMixin, SaMixi
@Prop(String) backgroundImage; @Prop(String) backgroundImage;
mounted() { mounted() {
this.showVideo = true;
// 根据背景图设置元素高度 // 根据背景图设置元素高度
// const index = this.pageData?.elements?.findIndex(v => v.point?.responsive); // const index = this.pageData?.elements?.findIndex(v => v.point?.responsive);
// const { props: { backgroundImage }, point } = this.pageData?.elements[index] || { props: {}}; // const { props: { backgroundImage }, point } = this.pageData?.elements[index] || { props: {}};
......
<template> <template>
<div class="freedom" v-track="{ link }"> <div class="freedom" v-track="{ link }">
<div class="freedom-body"> <div class="freedom-body">
<video width="100%" ref="videoBackground" height="auto" style="z-index: -10; osition: absolute; top: 0; left: 0" v-if="childItem.props.freedomVideo" :src="childItem.props.freedomVideo" playsinline autoplay loop muted /> <video width="100%" ref="videoBackground" height="auto" style="z-index: -10; osition: absolute; top: 0; left: 0" v-if="showVideo && childItem.props.freedomVideo" :src="childItem.props.freedomVideo" playsinline autoplay loop muted />
<component :class="['freedom-body-item', { 'Fb-item_selected': curChildIndex === index }]" v-for="(item, index) in childItem.child" :style="transformStyle(item.commonStyle, 'container')" :is="item.name" :key="index" :sa-info="getSaInfo(item)" v-bind="item.props"></component> <component :class="['freedom-body-item', { 'Fb-item_selected': curChildIndex === index }]" v-for="(item, index) in childItem.child" :style="transformStyle(item.commonStyle, 'container')" :is="item.name" :key="index" :sa-info="getSaInfo(item)" v-bind="item.props"></component>
</div> </div>
</div> </div>
......
{ {
"api": { "api": {
"apiHost": "https://quantum-blocks-undefined.liangkebang.net", "apiHost": "https://quantum-blocks-yxm.liangkebang.net",
"h5Host": "https://quantum-h5-undefined.liangkebang.net", "h5Host": "https://quantum-h5-yxm.liangkebang.net",
"opapiHost": "https://opapi-undefined.liangkebang.net", "opapiHost": "https://opapi-yxm.liangkebang.net",
"passportHost": "https://passportapi-undefined.liangkebang.net", "passportHost": "https://passportapi-yxm.liangkebang.net",
"talosHost": "https://talos-undefined.liangkebang.net", "talosHost": "https://talos-yxm.liangkebang.net",
"kdspHost": "https://kdsp-api-undefined.liangkebang.net", "kdspHost": "https://kdsp-api-yxm.liangkebang.net",
"loginUrl": "", "loginUrl": "",
"newApolloFlag": true, "newApolloFlag": true,
"h5ShopHost": "https://tenet-undefined.liangkebang.net/#", "h5ShopHost": "https://tenet-yxm.liangkebang.net/#",
"mallHost": "https://mall-undefined.liangkebang.net", "mallHost": "https://mall-yxm.liangkebang.net",
"xyqbH5Host": "https://mapi-undefined.liangkebang.net", "xyqbH5Host": "https://mapi-yxm.liangkebang.net",
"yxmTenantId": 560761, "yxmTenantId": 560761,
"appIdMap": { "appIdMap": {
"560761": "wxe16bf9293671506c", "560761": "wxe16bf9293671506c",
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
} }
}, },
"redis": { "redis": {
"port": "undefined", "port": "30835",
"host": "undefined", "host": "172.16.4.6",
"password": "", "password": "",
"db": 0 "db": 0
}, },
......
{"apiHost":"https://quantum-blocks-undefined.liangkebang.net","h5Host":"https://quantum-h5-undefined.liangkebang.net","opapiHost":"https://opapi-undefined.liangkebang.net","passportHost":"https://passportapi-undefined.liangkebang.net","talosHost":"https://talos-undefined.liangkebang.net","kdspHost":"https://kdsp-api-undefined.liangkebang.net","loginUrl":"","newApolloFlag":true,"h5ShopHost":"https://tenet-undefined.liangkebang.net/#","mallHost":"https://mall-undefined.liangkebang.net","xyqbH5Host":"https://mapi-undefined.liangkebang.net","yxmTenantId":560761,"appIdMap":{"560761":"wxe16bf9293671506c","560867":"wxccb8435d68e8c7d6"},"qiniuUpHost":"https://up-z0.qiniup.com","qiniuHost":"https://appsync.lkbang.net"} {"apiHost":"https://quantum-blocks-yxm.liangkebang.net","h5Host":"https://quantum-h5-yxm.liangkebang.net","opapiHost":"https://opapi-yxm.liangkebang.net","passportHost":"https://passportapi-yxm.liangkebang.net","talosHost":"https://talos-yxm.liangkebang.net","kdspHost":"https://kdsp-api-yxm.liangkebang.net","loginUrl":"","newApolloFlag":true,"h5ShopHost":"https://tenet-yxm.liangkebang.net/#","mallHost":"https://mall-yxm.liangkebang.net","xyqbH5Host":"https://mapi-yxm.liangkebang.net","yxmTenantId":560761,"appIdMap":{"560761":"wxe16bf9293671506c","560867":"wxccb8435d68e8c7d6"},"qiniuUpHost":"https://up-z0.qiniup.com","qiniuHost":"https://appsync.lkbang.net"}
\ No newline at end of file \ No newline at end of file
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"test": "cross-env NODE_ENV=production EGG_SERVER_ENV=sit egg-scripts start --port 80 --workers 1", "test": "cross-env NODE_ENV=production EGG_SERVER_ENV=sit egg-scripts start --port 80 --workers 1",
"stop": "egg-scripts stop", "stop": "egg-scripts stop",
"backend": "nohup egg-scripts start --port 7001 --workers 4", "backend": "nohup egg-scripts start --port 7001 --workers 4",
"dev": "cross-env NODE_ENV=test APOLLO_CLUSTER=k8s NAMESPACE=test1 npm run apollo && egg-bin dev -r egg-ts-helper/register", "dev": "cross-env NODE_ENV=test APOLLO_CLUSTER=k8s NAMESPACE=yxm npm run apollo && egg-bin dev -r egg-ts-helper/register",
"debug": "egg-bin debug -r egg-ts-helper/register", "debug": "egg-bin debug -r egg-ts-helper/register",
"apollo": "node bin/apollo.js", "apollo": "node bin/apollo.js",
"build": "cross-env NODE_ENV=production APOLLO_CLUSTER=3C npm run apollo && cross-env COS_ENV=production easy build --devtool", "build": "cross-env NODE_ENV=production APOLLO_CLUSTER=3C npm run apollo && cross-env COS_ENV=production easy build --devtool",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment