gemercheung 2 年之前
父节点
当前提交
37a32a2c4b
共有 1 个文件被更改,包括 40 次插入8 次删除
  1. 40 8
      packages/qjkankan-view/src/components/assembly/Opening.vue

+ 40 - 8
packages/qjkankan-view/src/components/assembly/Opening.vue

@@ -41,17 +41,31 @@
   </div>
 
   <!-- 图片 -->
+  <!-- coverImgBac === "colorFill" -->
   <div
     class="imgcon"
     v-if="coverData.coverSelect.toLowerCase().indexOf('img') > -1 && showImg"
-    @click="closeImg"
-    :style="{
-      backgroundImage: `url(${coverData.coverPc})`,
-      backgroundColor: `${coverData.imgColorSelec}`,
-      backgroundSize: coverData.coverPcLoc == 'center' ? 'contain' : 'cover',
-    }"
   >
-    <div @click.stop="closeImg" class="jump">
+    <div
+      @click="closeImg"
+      class="image-front"
+      :style="{
+        backgroundImage: `url(${coverData.coverPc})`,
+        backgroundSize: coverData.coverPcLoc == 'center' ? 'contain' : 'cover',
+      }"
+    ></div>
+    <div
+      class="img-background"
+      v-if="coverData.coverPcLoc !=='full'"
+      :style="{
+        backgroundImage:
+          coverData.coverImgBac == 'imgTile'
+            ? `url(${coverData.coverBac})`
+            : `none`,
+        backgroundColor:  coverData.coverImgBac == 'imgTile' ? `none`:`${coverData.imgColorSelec}`,
+      }"
+    ></div>
+    <div @click.stop="closeImg" class="jump" >
       {{
         countdownImg > 0
           ? $t("common.jumpTips", { second: countdownImg })
@@ -87,6 +101,7 @@ const timer = ref(null);
 
 const showVideo = ref(true);
 const showImg = ref(true);
+// coverImgBac
 
 const currentScene = computed(() => store.getters["scene/currentScene"]);
 
@@ -234,8 +249,25 @@ onMounted(() => {
 }
 
 .imgcon {
-  background-position: center;
   z-index: 10;
+  .image-front,
+  .img-background {
+    background-position: center;
+    width: 100%;
+    height: 100%;
+    position: absolute;
+
+    top: 0;
+    z-index: 1;
+    bottom: 0;
+    left: 0;
+  }
+  .img-background {
+    background-repeat: repeat;
+  }
+  .image-front {
+    z-index: 10;
+  }
 }
 
 .videocon {