Browse Source

fix: 分区提示

lxf 2 days ago
parent
commit
f762998a25
2 changed files with 3 additions and 1 deletions
  1. 2 0
      src/components/weatherInfo.vue
  2. 1 1
      src/views/old_mini/growth_report/index.vue

+ 2 - 0
src/components/weatherInfo.vue

@@ -133,6 +133,7 @@ async function setFarmByGardenId(gardenIdValue) {
             const fullData = data;
             farmList.value = fullData || [];
             if (fullData && fullData.length > 0) {
+                hasFarm.value = true;
                 const targetFarm = fullData.find(farm => farm.id == gardenIdValue);
                 if (targetFarm) {
                     farmName.value = targetFarm.name;
@@ -216,6 +217,7 @@ function getFarmListWithoutGardenId() {
         const fullData = data;
         farmList.value = fullData || [];
         if (fullData && fullData.length > 0) {
+            hasFarm.value = true;
             selectFarmFromList(fullData);
         } else {
             farmList.value = [];

+ 1 - 1
src/views/old_mini/growth_report/index.vue

@@ -306,7 +306,7 @@ const getRegions = async () => {
         regionsData.value = data || [];
         if(regionsData.value.length > 0) {
             const guideKey = "GROWTH_REPORT_SWIPE_GUIDE_SHOWN";
-            if (!localStorage.getItem(guideKey)) {
+            if (!localStorage.getItem(guideKey) && regionsData.value.length > 1) {
                 showSwipeGuide.value = true;
                 localStorage.setItem(guideKey, "1");
             }