functionList.vue 1.8 KB
<template>
	<view class="function_card">
		<view class="function_list">
			<view class="function_item" v-for="(item, index) in myMenu" :key="index" @click="goRouter(item.routerPath)">
				<view class="list_img">
					<image class="list_icon" :src="item.icon" mode="widthFix"></image>
				</view>
				<text class="col-3d f-24 l-h-32 m-top10">{{ item.text }}</text>
			</view>
		</view>
	</view>
</template>

<script>
	import Reflects from '@/static/myImg/reflect.png'
	import Recharge from '@/static/myImg/recharge.png'
	import BankCard from '@/static/myImg/bank-card.png'
	export default {
		data(){
			return {
				myMenu: [
					{ text: '提现', icon: Reflects, routerPath: '/pages_my/myReflect/myReflect?type='+ 0 },
					{ text: '充值', icon: Recharge, routerPath: '/pages_my/myReflect/myReflect?type=' + 1 },
					{ text: '银行卡', icon: BankCard, routerPath: '/pages_my/bankCard/bankCard'}
				]
			}
		},
		methods: {
			goRouter(path){
				uni.navigateTo({
					url: path
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.function_card{
		background: #FFFFFF;
		height: 140rpx;
		box-sizing: border-box;
		.function_title{
			line-height: 84rpx;
			height: 84rpx;
			padding-left: 36rpx;
			font-size: 28rpx;
			color: #333;
			border-bottom: 2rpx solid #E1E1E1;
			box-sizing: border-box;
		}
		.function_list{
			display: flex;
			gap: 28rpx;
			flex-wrap: wrap;
			padding: 22rpx 30rpx;
			.function_item{
				width: calc((100% - 90rpx) / 3);
				display: flex;
				flex-direction: column;
				align-items: center;
				font-size: 28rpx;
				line-height: 40rpx;
				color: #3d3d3d;
				.list_img{
					display: flex;
					align-items: center;
					justify-content: center;
					width: 48rpx;
					height: 48rpx;
					margin-bottom: 14rpx;
					.list_icon{
						width: 100%;
					}
				}
			}
		}
	}
</style>