SmartBeehive/pages/Apiary.vue
2024-06-14 18:00:24 +08:00

248 lines
4.8 KiB
Vue

<template>
<view class="page">
<u-navbar :is-back="false" title="蜂场" :border-bottom="false" :background="bgc" title-color='#3D3D3D '
title-size='36' height='45' id="navbar">
</u-navbar>
<view class="top_box">
<view class="search">
<image src="https://api.ccttiot.com/smartmeter/img/static/um5GxgXufKY8IK2qkaWR" mode=""></image>
<view class="search_center">
<input type="text" class="ips" v-model="code" placeholder="编码/报修单号"
placeholder-class="my-placeholder" />
</view>
</view>
<view class="add" @click="addApiary()">
<image src="https://api.ccttiot.com/smartmeter/img/static/uR30yYn3IsHDu5qWV0ML" mode=""></image>
</view>
</view>
<view class="no_cont" v-if="false">
<view class="img">
<image src="https://api.ccttiot.com/smartmeter/img/static/uUZ3MF84e3bKgwAei8Rz" mode=""></image>
</view>
<view class="txt">
当前还没有添加蜂场哦
</view>
</view>
<view class="Apiary_box">
<view class="Apiary_card">
<image src="https://api.ccttiot.com/smartmeter/img/static/ug4ZIzZSC0XAiRelaIfp" mode=""></image>
<view class="weather">
<image src="https://api.ccttiot.com/smartmeter/img/static/u6wWpgZOuId6JSX8LGmz" mode=""></image>
<view class="txt1">
多云
</view>
<view class="txt2">
温度舒适,湿润,光照强,空气优
</view>
</view>
<view class="info">
<view class="left">
福鼎蜂场
</view>
<view class="right">
8箱
</view>
</view>
<view class="address">
福建省宁德市福鼎市太姥山镇秦屿大道2号 福建省宁德市福鼎市太姥山镇秦屿大道2号
</view>
</view>
</view>
<tab-bar :indexs='1' style=""></tab-bar>
</view>
</template>
<script>
export default {
data() {
return {
bgc: {
backgroundColor: " #FAFDFD",
},
}
},
onLoad() {
},
onShow() {
},
methods: {
addApiary(){
uni.navigateTo({
url:'/pages/Apiary/AddApiary'
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #FAFDFD;
}
.page {
// position: relative;
width: 750rpx;
.Apiary_box {
display: flex;
justify-content: center;
.Apiary_card {
position: relative;
width: 674rpx;
height: 512rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.15);
border-radius: 20rpx 20rpx 20rpx 20rpx;
image {
width: 674rpx;
height: 360rpx;
}
.address{
margin-top: 18rpx;
padding: 0 24rpx;
font-weight: 500;
font-size: 28rpx;
color: #50565A;
white-space: nowrap;
/* 禁止换行 */
overflow: hidden;
/* 超出部分隐藏 */
text-overflow: ellipsis;
}
.info{
margin-top: 18rpx;
padding: 0 24rpx;
display: flex;
align-items: center;
flex-wrap: nowrap;
justify-content: space-between;
.left{
font-weight: 600;
font-size: 36rpx;
color: #3D3D3D;
}
.right{
font-weight: 600;
font-size: 32rpx;
color: #50565A;
}
}
.weather {
padding: 20rpx 24rpx;
position: absolute;
display: flex;
align-items: center;
flex-wrap: nowrap;
left: 0;
top: 0;
width: 674rpx;
height: 70rpx;
background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), transparent);
image{
width: 44rpx;
height: 44rpx;
}
.txt1{
margin-left: 16rpx;
font-weight: 600;
font-size: 32rpx;
color: #3D3D3D;
}
.txt2{
margin-left: 28rpx;
font-weight: 600;
font-size: 28rpx;
color: #3D3D3D;
}
}
}
}
.top_box {
margin: 42rpx auto;
display: flex;
flex-wrap: nowrap;
width: 664rpx;
.search {
display: flex;
flex-wrap: nowrap;
align-items: center;
padding: 20rpx 26rpx;
width: 566rpx;
height: 82rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0, 0, 0, 0.15);
border-radius: 20rpx 20rpx 20rpx 20rpx;
image {
width: 35.97rpx;
height: 35.97rpx;
}
.search_center {
margin-left: 34rpx;
width: 480rpx;
.ips {
// 基本样式设置
width: 100%; // 根据需要调整
// border: 1px solid #ccc; // 根据需要调整
// 设置 placeholder 样式
}
.my-placeholder {
font-weight: 400;
font-size: 32rpx;
color: #808080;
}
}
}
.add {
margin-left: 30rpx;
width: 66rpx;
height: 66rpx;
}
}
.no_cont {
margin: 152rpx auto 0;
width: 432rpx;
.img {
image {
width: 432rpx;
height: 432rpx;
}
}
.txt {
margin-top: 50rpx;
width: 100%;
text-align: center;
font-weight: 500;
font-size: 32rpx;
color: #808080;
}
}
}
</style>