Newer
Older
gdtMimiProgram / pages / index / index.vue
MrTan on 16 Nov 2022 981 bytes 登录注册忘记密码排版
<template>
	<view class="index">
		<view 
			v-for="item in menu" 
			:key="item.id" 
			class="menu-item" 
			@click="handleClick(item.id)"
		>{{item.name}}</view>
	</view>
</template>

<script>
	import { mapMutations } from 'vuex';
	export default {
		data() {
			return {
				menu: [
					{
						id: 'submit',
						name: '访客信息提交'
					},
					{
						id: 'check',
						name: '物联设备状态查看'
					},
				]
			}
		},
		onLoad() {
		},
		methods: {
			...mapMutations(['setNavRect']),
			handleClick(id) {
				if(id=="submit"){
					wx.navigateTo({
						url: `/pages/mine/mine?id=${id}`,
						  
					});
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.index {
		padding-top: 40rpx;
		display: flex;
		justify-content: space-around;
		.menu-item {
			width: 320rpx;
			height: 320rpx;
			text-align: center;
			line-height: 320rpx;
			border-radius: 10rpx;
			color: #000;
			background-color: #eee;
			border: 1px solid gray;
		}
	}
</style>