<template>
	<view>
		<view class="card" v-for="(item,index) in menuList" :key="index" @click="jump(item.path)">
			<view style="display: flex;">
				<image style="width: 40rpx;height: 40rpx;" :src="item.icon" ></image>
				<view class="center">
					<text class="padding-left-10">{{item.name}}</text>
				</view>
			</view>
			<view class="">
				<text class="cuIcon-right"></text>
			</view>
			<button class="cu-btn" style="border-radius: 0;border: none;" v-if="item.name=='官方客服'" hover-class="none" open-type="contact" show-message-card="true"></button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				menuList:[
					{
						icon:'/pagesA/static/setting/info.png',
						name:'个人资料',
						path:'/pagesA/pages/myInfo'
					},
					{
						icon:'/pagesA/static/setting/kefu.png',
						name:'官方客服',
						path:''
					},
					{
						icon:'/pagesA/static/setting/tousu.png',
						name:'投诉及反馈',
						path:'/pagesA/pages/setting/question'
					}
				]
			}
		},
		methods: {
			jump(url){
				uni.navigateTo({
					url
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.card{
		display: flex;
		justify-content: space-between;
		margin: 20rpx 0;
		padding: 30rpx;
		background-color: #FFFFFF;
		position: relative;
		button{
			position: absolute;
			top: 0;
			right: 0;
			bottom: 0;
			left: 0;
			background-color: transparent;
		}
	}
</style>
