<template>
	<view>
		<u-popup v-model="showDig" :maskCloseAble="false" mode="center" @close="closePopup">
			<view style="margin: 60rpx;">
				<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/coffee/cup3.png"
					mode="widthFix" style="width:546rpx;height:auto;display: block;"></image>
				<view class="viewBox">
					<view class="cup">
						{{dataObj.Number||0}}杯
					</view>
					<view class="successText">
						核销成功
					</view>
					<view class="user">
						<image :src="dataObj.Photo" style="width: 66rpx;height: 66rpx;border-radius: 50%;margin-right: 6rpx;"></image>
						{{dataObj.Name||''}}
					</view>
				</view>
				<view class="closeIcon" @click="closePopup">
					<u-icon name="close" color="#fefefe" size="60"></u-icon>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		props: {
			show:{
				type:Boolean,
				default: false,
			} ,
			dataObj:{
				type:Object,
				default:()=>{
					return {}
				}
			}
		},
		watch:{
			show(val){
				this.showDig=val
			}
		},
		data() {
			return {
				showDig:false
			}
		},
		methods: {
			closePopup() {
				this.showDig=false
				this.$emit("close");
			}
		},
	}
</script>
<style lang="scss" scoped>
	.viewBox {
		width: 546rpx;
		height: 286rpx;
		background-color: #FFFFFF;
		border-radius: 0rpx 0rpx 24rpx 24rpx;
		padding-top: 40rpx;
		.cup{
			font-size: 40rpx;
			font-weight: 800;
			color: #3E766E;
			text-align: center;
			margin-bottom: 6rpx;
		}
		.successText{
			font-size: 32rpx;
			color: #111111;
			font-weight: 700;
			text-align: center;
			margin-bottom: 40rpx;
		}
		.user{
			font-size: 28rpx;
			font-weight: 500;
			color: #888888;
			text-align: center;
			display: flex;
			justify-content: center;
			align-items: center;
		}
		
	}
	.closeIcon{
		margin: 35rpx auto 0;
		display: flex;
		justify-content: center;
	}
</style>
