realtimeData.vue 1.61 KB
<template>
	<view class="realtime-page">
		<!-- 公共组件-每个页面必须引入 -->
		<public-module></public-module>
		<view class="u-flex" style="margin-top: -44rpx;flex-direction: column;justify-content: space-between; align-content: space-between;">
			<view
				class="u-flex"
				v-for="(item, index) in list"
				:key="index"
				style="border-radius: 20px;flex-direction: row;justify-content: space-between;margin: 15rpx;
				background-color: #fff;height: 200rpx;width: 698rpx;"
			>
				<view style="margin: 20rpx;">
					<view style="margin-top: 4rpx;">
						<text style="color:#333333;font-size: 16px;">{{ item.name }}</text>
					</view>
					<view style="margin-top: 14rpx;">
						<text style="color:#999999;font-size: 13px;">{{ item.time }}</text>
					</view>
				</view>
				<view style="margin-right: 30rpx;margin-top: -58rpx;">
					<text style="color:#333333;font-size: 17px;">{{ item.value }}</text>
				</view>
			</view>
		</view>
		<f-tabbar></f-tabbar>
	</view>
</template>

<script>
import fTabbar from '@/components/module/f-tabbar/f-tabbar';
export default {
	components: {
		fTabbar
	},
	data() {
		return {
			list: [
				{
					name: 'CO2',
					time: '2021-12-25 14:25:52',
					value: '85.6'
				},
				{
					name: 'PH',
					time: '2021-12-25 14:25:52',
					value: '10'
				},
				{
					name: 'NH3',
					time: '2021-12-25 14:25:52',
					value: '635'
				},
				{
					name: '水深',
					time: '2021-12-25 14:25:52',
					value: '2.21'
				}
			]
		};
	},
	onLoad(e) {
		// 隐藏原生的tabbar
		uni.hideTabBar();
	}
};
</script>

<style lang="scss" scoped>
.realtime-page {
	padding: 20rpx;
}
</style>