Bladeren bron

fix: 遮罩样式置顶

lxf 2 weken geleden
bovenliggende
commit
ed9f1f5fb3

+ 16 - 2
src/components/chatWindow.vue

@@ -107,7 +107,7 @@
                             </template>
                             <template v-else>
                                 <div class="card-title">{{ msg.title || msg.content.title }}</div>
-                                <img :src="base_img_url2 + (msg.coverUrl || msg.content.coverUrl) + resize" alt="" />
+                                <img :src="handleImgUrl(msg.coverUrl || msg.content.coverUrl)" alt="" />
                             </template>
                         </div>
 
@@ -318,6 +318,14 @@ const userId = ref(null);
 const handleCardClick = (msg) => {
     router.push(msg.linkUrl || msg.content.linkUrl);
 }
+
+const handleImgUrl = (url) => {
+    if (url && url.includes('https://')) {
+        return url;
+    } else {
+        return base_img_url2 + url + resize;
+    }
+}
 watch(
     () => props.userId,
     async (newValue) => {
@@ -340,8 +348,14 @@ watch(
                         const imgArr = JSON.parse(params.executeEvidence);
                         message.coverUrl = imgArr[imgArr.length - 1];
                     }
+                    console.log('params.imageList', params.imageList)
                     if(params.imageList && params.imageList.length) {
-                        message.coverUrl = params.imageList[params.imageList.length - 1].cloudFilename;
+                        const img = params.imageList[params.imageList.length - 1];
+                        if (img.cloudFilename) {
+                            message.coverUrl = img.cloudFilename;
+                        } else {
+                            message.coverUrl = img;
+                        }
                     }
                     
                     if(params.type === 'quotation') {

+ 4 - 2
src/components/taskItem.vue

@@ -84,7 +84,7 @@
                         <photo-provider :photo-closable="true">
                                 <photo-consumer v-for="src in [triggerImg[triggerImg.length - 1].cloudFilename]" intro="农事前照片" :key="src" :src="base_img_url2 + src">
                                     <div class="img-item">
-                                        <img :src="base_img_url2 + src" class="view-box">
+                                        <img :src="base_img_url2 + src + resize" class="view-box">
                                     </div>
                                 </photo-consumer>
                         </photo-provider>
@@ -94,7 +94,7 @@
                         <photo-provider :photo-closable="true">
                                 <photo-consumer v-for="src in [detailItem.reviewImage[detailItem.reviewImage.length - 1]]" intro="农事后照片" :key="src" :src="base_img_url2 + src">
                                     <div class="img-item">
-                                        <img :src="base_img_url2 + src" class="view-box">
+                                        <img :src="base_img_url2 + src + resize" class="view-box">
                                     </div>
                                 </photo-consumer>
                         </photo-provider>
@@ -162,6 +162,8 @@ import uploadExecute from "@/views/old_mini/task_condition/components/uploadExec
 import reviewPopup from "@/views/old_mini/task_condition/components/reviewPopup.vue";
 import reviewUploadPopup from "@/components/popup/reviewUploadPopup.vue";
 
+const resize = "?x-oss-process=image/resize,p_120/format,webp/quality,q_100";
+
 const props = defineProps({
     status: {
         type: Number,

+ 3 - 0
src/styles/common.scss

@@ -159,6 +159,9 @@ div {
         }
     }
 }
+.PhotoSlider__Wrapper {
+    z-index: 9999;
+}
 
 .v-select-group {
     display: flex;

+ 16 - 1
src/styles/index.scss

@@ -6,4 +6,19 @@
 $screenWidth:375;
 @function rpx($value){
   @return  $screenWidth / 750 * $value + px;
-}
+}
+// 图片预览去除下载和翻转
+.PhotoSlider__BannerWrap {
+  .PhotoSlider__BannerRight {
+      svg {
+          &:nth-child(1),
+          &:nth-child(4),
+          &:nth-child(5) {
+              display: none;
+          }
+      }
+  }
+}
+.PhotoSlider__Wrapper {
+  z-index: 9999 !important;
+}

+ 1 - 0
src/views/old_mini/task_condition/components/reviewPopup.vue

@@ -119,6 +119,7 @@ const handleShare = () => {
         farmId: quotationData.value.farmId,
         farmWorkName: quotationData.value.farmWorkName,
         id: quotationData.value.id,
+        imageList: [resImg.value],
         type: "reviewWork",
     };
     if (userId) {