cultivationApp/pages/index/index.vue

141 lines
2.4 KiB
Vue
Raw Normal View History

2023-10-17 11:00:41 +08:00
<template>
<view class="">
<view class="content">
2023-11-22 14:28:54 +08:00
<view class="serch">
<u-search bgColor="white" :show-action="false" placeholder="搜索你的土地信息" v-model="keyword"
shape="round"></u-search>
2023-10-20 18:45:15 +08:00
</view>
<view class="card" v-for="(item,index) in [1,1,1]" :key="index" @click="navgo('/pages/landDetail/index')">
<view class="tit card-li">
2023-11-21 18:54:33 +08:00
<view class="">
土地名称
2023-10-20 18:45:15 +08:00
</view>
<view class="" style="color: #00A15E;">
已种植
2023-11-21 18:54:33 +08:00
</view>
<view class="" style="color: #00A15E;">
未种植
2023-11-21 18:54:33 +08:00
</view>
</view>
<view class="card-li">
<view class="">
面积: 20
2023-11-21 18:54:33 +08:00
</view>
</view>
<view class="card-li tit">
<view class="" style="font-weight: normal;">
农作物: 洋芋
2023-11-21 18:54:33 +08:00
</view>
</view>
2023-10-20 18:45:15 +08:00
</view>
<view style="height: 170rpx;">
2023-11-21 18:54:33 +08:00
</view>
</view>
2023-10-23 17:57:19 +08:00
2023-10-17 11:00:41 +08:00
</view>
</template>
2023-10-17 16:02:55 +08:00
<script setup>
import {
ref,
2023-10-20 18:45:15 +08:00
reactive,
onMounted
} from "vue"
2023-10-25 19:55:18 +08:00
2023-10-30 19:09:40 +08:00
const keyword = ref();
2023-11-21 18:54:33 +08:00
const props = defineProps({
userInfo: Object
})
// 获取位置
const getPositionFn = () => {
uni.getLocation({
type: 'gcj02',
geocode: true,
isHighAccuracy: true,
2023-11-22 14:28:54 +08:00
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-11-22 14:28:54 +08:00
}
});
}
const userInfo = reactive(props.userInfo)
2023-11-21 18:54:33 +08:00
const navgo = (url) => {
2023-11-21 18:54:33 +08:00
uni.navigateTo({
url
})
}
2023-11-22 14:08:24 +08:00
onMounted(() => {
console.log('22222222')
})
</script>
2023-11-22 14:08:24 +08:00
<style lang="scss">
2023-11-21 18:54:33 +08:00
.content {
min-height: 100vh;
position: relative;
background-color: #EAF2EF;
padding-top: 180rpx;
2023-11-21 18:54:33 +08:00
2023-10-20 18:45:15 +08:00
2023-11-21 18:54:33 +08:00
.serch {
width: 100%;
height: 100rpx;
background-color: #EAF2EF;
position: absolute;
position: fixed;
top:0;
padding-top: 70rpx;
2023-11-21 18:54:33 +08:00
z-index: 8888 !important;
2023-10-20 18:45:15 +08:00
}
2023-11-21 18:54:33 +08:00
.border-bgc {
height: 200rpx;
background-color: #34D190;
border-radius: 0 0 40rpx 40rpx;
position: absolute;
width: 750rpx;
2023-11-21 18:54:33 +08:00
}
2023-11-21 18:54:33 +08:00
.card {
position: relative;
width: 693.93rpx;
margin: auto;
background-color: #fff;
box-sizing: border-box;
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
margin-bottom: 40rpx;
2023-11-21 18:54:33 +08:00
2023-10-17 11:00:41 +08:00
2023-10-21 18:02:06 +08:00
2023-11-21 18:54:33 +08:00
.tit {
display: flex;
font-size: 33.29rpx;
font-weight: bold;
2023-11-21 18:54:33 +08:00
justify-content: space-between;
2023-11-21 18:54:33 +08:00
}
}
2023-10-21 18:02:06 +08:00
}
</style>