<template>
	<view>
		<view class="item-box" v-for="(item, index) in listData" :key="index">
			<view class=" d-b-c mb20">
				<view class="label-name">{{$t('MN_T_1')}}</view>
				<view class="item-content f26 gray3">{{item.memberCode}}</view>
			</view>
			<view class=" d-b-c mb20">
				<view class="label-name">{{$t('CK_KS_14')}}</view>
				<view class="item-content f26 gray3">{{item.memberName}}</view>
			</view>

			<view class=" d-b-c mb20">
				<view class="label-name">{{$t('ENU_NOTICE_GRADE_2')}}</view>
				<view class="item-content f26 gray3">{{item.awardsName}}</view>
			</view>
			<view class=" d-b-c mb20">
				<view class="label-name">{{$t('MY_TH_2')}}</view>
				<view class="item-content f26 gray3">{{item.buyNum}}</view>
			</view>
			<view class=" d-b-c mb20">
				<view class="label-name">{{$t('CK_KS_8')}}</view>
				<view class="item-content f26 gray3">{{item.giftBuyNum}}</view>
			</view>
			<view class=" d-b-c mb20">
				<view class="label-name">{{$t('MY_ORD_3')}}</view>
				<view class="item-content f26 gray3">{{item.buyDate}}</view>
			</view>
		</view>
		<view class="d-c-c p30" v-if="listData.length == 0 && !loading">
			<text class="iconfont icon-wushuju"></text>
			<text class="cont">{{$t('w_0405')}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				/*是否正在加载*/
				loading: true,
				pkId: '',
				listData: []
			};
		},
		onLoad(e) {
			this.pkId = e.pkId;
			this.getData();
		},
		methods: {
			getData() {
				let self = this;
				self.loading = true;
				var pkId = self.pkId;
				self._post(
					'member/api/silo/detail', {
						pkId: pkId
					},
					function(res) {
						self.listData = res.rows;
					}, {},
					() => {
						self.loading = false;
					}
				);
			},
		}
	};
</script>

<style lang="scss">
	.label-name {
		font-size: 26rpx;
		color: #999;
		word-break: break-all;
		width: 40%;
		flex-shrink: 0;
		line-height: 1.5;
	}

	.item-content {
		flex-shrink: 0;
		width: 60%;
		word-break: break-all;
		line-height: 1.5;
		text-align: right;
	}

	.item-box {
		width: 750rpx;
		box-sizing: border-box;
		margin-bottom: 20rpx;
		padding: 32rpx 26rpx;
		background: #ffffff;
	}
</style>