diff --git a/pages/index/massif.vue b/pages/index/massif.vue index 345cd21..38e2ecf 100644 --- a/pages/index/massif.vue +++ b/pages/index/massif.vue @@ -280,7 +280,7 @@ const userInfo = ref({}); onLoad(() => { - uni.hideTabBar() + uni.hideTabBar(); // console.log(store.state.userInfo) if (!store.state.userInfo) { uni.redirectTo({ @@ -330,7 +330,7 @@ const houseInfo = ref({}); onShow(() => { getlist2() - + initFarmLists(); }) const bgc = (icon) => { return `/static/main/index/${icon}.png` @@ -385,6 +385,7 @@ const farm_lists = ref([]); const house_lists = ref([]); const farm_types_lists = ref([]); + const initFarmLists = ()=>{ farmTypeLists().then(res=>{ farm_types_lists.value = res.data @@ -411,6 +412,7 @@ id: step.id, }; })); + if(houseInfo.value.id) return ; //如果已经选择过将不再重新选择 if(res.data.length>0) houseInfo.value = res.data[1]; else houseInfo.value = {}; store.commit('setHouse', houseInfo.value); @@ -419,7 +421,6 @@ console.log(err); }) } - initFarmLists(); const farm_type = computed(()=>{ return farm_types_lists.value.find(item=>item.value==dataobj.value.farm_type)?.name || '' @@ -462,13 +463,11 @@ } const confirm2 = (e) => { showPicker.value = false - uni.navigateTo({ url: e.value[0].route + '?id=' + palntId.value }) } const confirm1 = (e) => { - palntId.value = e.value[0].id showPicker1.value = false if (e.value[0].status == 2) { diff --git a/pages/index/personal.vue b/pages/index/personal.vue index a74e53e..cf2e683 100644 --- a/pages/index/personal.vue +++ b/pages/index/personal.vue @@ -54,7 +54,7 @@ -