Ver Fonte

fix: 向导

lxf há 2 semanas atrás
pai
commit
82a99b989c

+ 5 - 0
src/api/modules/questionnaire.js

@@ -71,4 +71,9 @@ module.exports = {
         url: config.base_new_url + "report/set_popup_closed",
         type: "post",
     },
+    // 查询物候期
+    getPhenology: {
+        url: config.base_new_url + "report/get_phenophase",
+        type: "get",
+    },
 }

+ 7 - 6
src/components/popup/restorePlantingPopup.vue

@@ -66,7 +66,7 @@
                 <div class="restore-planting-popup__photo restore-planting-popup__photo--guide">
                     <img :src="phenologyImage" alt="" />
                     <photo-provider :photo-closable="true">
-                        <photo-consumer :src="patrolGuideImage" :intro="patrolGuideImage">
+                        <photo-consumer :src="phenologyGuideImage" :intro="phenologyGuideImage">
                             <div class="restore-planting-popup__guide-btn">
                                 {{ t("agriFile.viewPatrolGuide") }}
                             </div>
@@ -154,6 +154,7 @@ const sampleImage = ref(DEFAULT_SAMPLE_IMAGE);
 const phenologyQuestion = ref("");
 const phenologyHighlight = ref("");
 const phenologyImage = ref(DEFAULT_PHENOLOGY_IMAGE);
+const phenologyGuideImage = ref("");
 
 // ---------------------------------------------------------------------------
 // 计算属性
@@ -227,6 +228,7 @@ const applyQuestionData = (data) => {
     const timeQuestion = data.phenophase_question_time || "";
     const phenoQuestion = data.phenophase_question || "";
     const pic = resolveImageUrl(data.phenophase_pic_url);
+    const guidePic = resolveImageUrl(data.interact_pic_url);
 
     questionText.value = timeQuestion;
     highlightWord.value = extractHighlightWord(timeQuestion);
@@ -236,6 +238,7 @@ const applyQuestionData = (data) => {
     phenologyQuestion.value = phenoQuestion;
     phenologyHighlight.value = extractPhenologyHighlight(phenoQuestion);
     phenologyImage.value = pic || DEFAULT_PHENOLOGY_IMAGE;
+    phenologyGuideImage.value = guidePic || "";
 
     // 有时间题先展示问题一,否则直接问题二
     questionType.value = timeQuestion ? "time" : "phenology";
@@ -484,18 +487,16 @@ defineExpose({
         margin: 12px 0;
         border-radius: 8px;
         overflow: hidden;
-        background: #dfeaf5;
+        height: 148px;
+        // background: #dfeaf5;
 
         img {
             display: block;
             width: 100%;
             height: 148px;
+            border-radius: 8px;
             object-fit: cover;
         }
-
-        &--guide img {
-            height: 132px;
-        }
     }
 
     &__guide-btn {