yanzhiAPP/components/index/planting.vue

75 lines
1.3 KiB
Vue
Raw Normal View History

2023-10-20 18:45:15 +08:00
<template>
<view class="">
<view class="content">
</view>
2023-11-21 18:54:33 +08:00
2023-10-20 18:45:15 +08:00
</view>
</template>
<script setup>
import {
reactive
} from "vue"
2023-10-25 19:55:18 +08:00
const props = defineProps({
userInfo: Object
})
2023-11-21 18:54:33 +08:00
// 获取位置
const getPositionFn = () => {
uni.getLocation({
type: 'gcj02',
geocode: true,
isHighAccuracy: true,
success: function(res) {
uni.request({
url: `https://restapi.amap.com/v3/geocode/regeo?output=JSON&location=${res.longitude},${res.latitude}&key=b0c21bc6b220aa882bad8ffb6bce8829&radius=1000&extensions=all`,
success: (res) => {
console.log(res)
}
})
}
});
}
2023-10-25 19:55:18 +08:00
const userInfo = reactive(props.userInfo)
2023-10-26 19:02:26 +08:00
2023-10-23 09:00:12 +08:00
const navgo = (url) => {
uni.navigateTo({
url
})
}
2023-10-26 19:02:26 +08:00
const navgoFn = (is_cropped, land_id) => {
2023-10-23 09:00:12 +08:00
2023-10-26 19:02:26 +08:00
if (!is_cropped) {
navgo(`/pages/InformationAdd/index?land_id=${land_id}`)
} else if (is_cropped) {
navgo(`/pages/detail/plant?land_id=${land_id}`)
2023-10-23 09:00:12 +08:00
}
2023-10-26 19:02:26 +08:00
if (is_cropped == 2) {
2023-10-23 09:00:12 +08:00
navgo('/pages/detail/plant')
}
}
2023-10-20 18:45:15 +08:00
</script>
<style lang="scss">
.content {
min-height: 90vh;
position: relative;
// padding: 0 20rpx;
// padding-top: 50rpx;
background-color: #EAF2EF;
2023-10-23 09:00:12 +08:00
padding: 0;
2023-10-20 18:45:15 +08:00
.border-bgc {
height: 200rpx;
background-color: #34D190;
2023-10-23 09:00:12 +08:00
border-radius: 0 0 40rpx 40rpx;
2023-10-20 18:45:15 +08:00
position: absolute;
width: 750rpx;
}
}
</style>