This commit is contained in:
parent
12b274b8b5
commit
f6bd08cd31
|
@ -280,7 +280,7 @@
|
||||||
|
|
||||||
const userInfo = ref({});
|
const userInfo = ref({});
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
uni.hideTabBar()
|
uni.hideTabBar();
|
||||||
// console.log(store.state.userInfo)
|
// console.log(store.state.userInfo)
|
||||||
if (!store.state.userInfo) {
|
if (!store.state.userInfo) {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
|
@ -330,7 +330,7 @@
|
||||||
const houseInfo = ref({});
|
const houseInfo = ref({});
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
getlist2()
|
getlist2()
|
||||||
|
initFarmLists();
|
||||||
})
|
})
|
||||||
const bgc = (icon) => {
|
const bgc = (icon) => {
|
||||||
return `/static/main/index/${icon}.png`
|
return `/static/main/index/${icon}.png`
|
||||||
|
@ -385,6 +385,7 @@
|
||||||
const farm_lists = ref([]);
|
const farm_lists = ref([]);
|
||||||
const house_lists = ref([]);
|
const house_lists = ref([]);
|
||||||
const farm_types_lists = ref([]);
|
const farm_types_lists = ref([]);
|
||||||
|
|
||||||
const initFarmLists = ()=>{
|
const initFarmLists = ()=>{
|
||||||
farmTypeLists().then(res=>{
|
farmTypeLists().then(res=>{
|
||||||
farm_types_lists.value = res.data
|
farm_types_lists.value = res.data
|
||||||
|
@ -411,6 +412,7 @@
|
||||||
id: step.id,
|
id: step.id,
|
||||||
};
|
};
|
||||||
}));
|
}));
|
||||||
|
if(houseInfo.value.id) return ; //如果已经选择过将不再重新选择
|
||||||
if(res.data.length>0) houseInfo.value = res.data[1];
|
if(res.data.length>0) houseInfo.value = res.data[1];
|
||||||
else houseInfo.value = {};
|
else houseInfo.value = {};
|
||||||
store.commit('setHouse', houseInfo.value);
|
store.commit('setHouse', houseInfo.value);
|
||||||
|
@ -419,7 +421,6 @@
|
||||||
console.log(err);
|
console.log(err);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
initFarmLists();
|
|
||||||
|
|
||||||
const farm_type = computed(()=>{
|
const farm_type = computed(()=>{
|
||||||
return farm_types_lists.value.find(item=>item.value==dataobj.value.farm_type)?.name || ''
|
return farm_types_lists.value.find(item=>item.value==dataobj.value.farm_type)?.name || ''
|
||||||
|
@ -462,13 +463,11 @@
|
||||||
}
|
}
|
||||||
const confirm2 = (e) => {
|
const confirm2 = (e) => {
|
||||||
showPicker.value = false
|
showPicker.value = false
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: e.value[0].route + '?id=' + palntId.value
|
url: e.value[0].route + '?id=' + palntId.value
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const confirm1 = (e) => {
|
const confirm1 = (e) => {
|
||||||
|
|
||||||
palntId.value = e.value[0].id
|
palntId.value = e.value[0].id
|
||||||
showPicker1.value = false
|
showPicker1.value = false
|
||||||
if (e.value[0].status == 2) {
|
if (e.value[0].status == 2) {
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup>
|
||||||
import Myindex from '@/components/return/index.vue';
|
import Myindex from '@/components/return/index.vue';
|
||||||
import MyTabbar from "@/components/customTabbar/tabbar.vue"
|
import MyTabbar from "@/components/customTabbar/tabbar.vue"
|
||||||
import {
|
import {
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue