<template>
	<view class="page">
		<navBar title="兑奖信息" :back="true" color="black" background="white" />

		<view class="content">
			<view class="item" v-for="(item,index) in list">
				<view class="line">
					<view class="left">
						姓名
					</view>
					<view class="right">
						{{item.name}}
					</view>
				</view>
				<view class="line">
					<view class="left">
						手机号
					</view>
					<view class="right">
						{{item.phone}}
					</view>
				</view>
				<view class="line">
					<view class="left">
						兑奖信息
					</view>
					<view class="right">
						{{item.award_content}}
					</view>
				</view>
				<view class="line">
					<view class="left">
						联系电话
					</view>
					<view class="right">
						{{item.phone}}
					</view>
				</view>
				<view class="line">
					<view class="left">
						是否邀约成功
					</view>
					<view class="right">
						{{item.state}}
					</view>
				</view>
				<view class="line">
					<view class="left">
						时间
					</view>
					<view class="right">
						{{item.created_at}}
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		getAwardDataReq,
	} from '@/api/test/index.js'
	export default {
		components: {

		},
		data() {
			return {
				list: []
			}
		},
		async onLoad(options) {
			let res = await getAwardDataReq()
			if (res.code == 0) {
				console.log('获取我的兑奖信息返回值: ', res);
				this.list = res.data
			} else {
				uni.showToast({
					title: res.message,
					icon: 'none'
				})
			}
		},
		methods: {

		}
	}
</script>

<style lang="scss" scoped>
	@import "./index.scss";
</style>