Parcourir la source

Merge branch 'farmer' of http://www.sysuimars.cn:3000/feiniao/feiniao-farm-h5 into farmer

wangsisi il y a 1 jour
Parent
commit
5377a054bd
2 fichiers modifiés avec 5 ajouts et 3 suppressions
  1. 2 0
      src/components/weatherInfo.vue
  2. 3 3
      src/views/old_mini/growth_report/index.vue

+ 2 - 0
src/components/weatherInfo.vue

@@ -137,6 +137,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;
@@ -220,6 +221,7 @@ function getFarmListWithoutGardenId() {
         const fullData = data;
         farmList.value = fullData || [];
         if (fullData && fullData.length > 0) {
+            hasFarm.value = true;
             selectFarmFromList(fullData);
         } else {
             farmList.value = [];

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

@@ -60,7 +60,7 @@
                                         <!-- <badge class="status-badge" dot 
                                             :offset="[80, -10]">
                                         </badge> -->
-                                        <div class="tag-name" :style="{ borderColor: card.purposeColor, color: card.purposeColor }">限时 3 天</div>
+                                        <!-- <div class="tag-name" :style="{ borderColor: card.purposeColor, color: card.purposeColor }">限时 3 天</div> -->
                                         <div class="status-title">
                                             {{ card.name }}
                                         </div>
@@ -240,7 +240,7 @@ const userInfoObj = userInfo ? JSON.parse(userInfo) : {};
 
 const handleLockClick = () => {
     if (userInfoObj.tel) {
-        router.push(`/create_farm?from=growth_report`);
+        router.push(`/create_farm?from=growth_report&isReload=true`);
         return;
     }
     wx.miniProgram.navigateTo({
@@ -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");
             }