<template>
	<view class="app">
		<view class="title">
			健康服务产品“五卡套餐”
		</view>
		<u-table>
			<u-tr>
				<u-th>健康积分卡</u-th>
				<u-th>积分分值上限</u-th>
				<u-th>套餐服务</u-th>
				<u-th>备注</u-th>
			</u-tr>
			<u-tr v-for="(item,index) in list" :key='index'>
				<u-td>
					{{item.cardType==1?'普通卡':item.cardType==2?'银卡':item.cardType==3?'金卡':item.cardType==4?'铂金卡':item.cardType==5?'钻石卡':'' }}
				</u-td>
				<u-td>{{item.scoreLimit}}</u-td>
				<u-td>{{item.packageDescribe}}</u-td>
				<u-td>{{item.remark}}</u-td>
			</u-tr>
		</u-table>
	</view>
</template>

<script>
	import {
		cardPackagelist
	} from '@/api/pagesB/FiveCardPackage/index.js'
	export default {
		data() {
			return {
				list: [],
				query: {
					identity: uni.getStorageSync('userinfo').cardNo
				}
			};
		},
		onLoad() {
			this.info();
		},
		methods: {
			info() {
				cardPackagelist(this.query).then(res => {
					res.rows.forEach(e => {
						e.cardType = Number(e.cardType)
					})
					this.list = res.rows
				})
			},
		}
	}
</script>

<style lang="scss">
	.app {
		.title {
			font-weight: 600;
			font-size: 38rpx;
			text-align: center;
			padding: 20rpx 0 50rpx;
		}
	}
</style>