<template>
	<view class="body-container">
		<view class="contaienr">
			<view class="icon" style="width: 96px;height: 96px;"></view>
			<view class="title">交易成功</view>
			<view class="hint">{{hint}}</view>
			<view class="btn" @click="doComplete">完成</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				hint: '支付成功!请前往"我的"页面进行查收.'
			}
		},
		onLoad(options) {
			const type = options.type
			uni.setNavigationBarTitle({
				title: '交易成功',
			})
			if (type == 1) {
				this.hint = '恭喜，支付成功！客服将即刻启动审核流程，待审核无误，您即可前往 “我的” 页面，进行查收。'
			} else {
				this.hint = '支付成功!请前往"我的"页面进行查收.'
			}
		},
		methods: {
			doComplete() {
				uni.navigateBack()
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: white;
	}

	.icon {
		background-image: url('data:image/svg+xml;charset=utf-8;base64,PHN2ZyB0PSIxNzQzNDg5NTM0MzA5IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjI1OTIiIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiI+PHBhdGggZD0iTTUxMiAxMDI0QTUxMiA1MTIgMCAxIDEgNTEyIDBhNTEyIDUxMiAwIDAgMSAwIDEwMjR6IG0tNDkuNTkwODU3LTM3Ny4xOTc3MTRMMzE1Ljk3NzE0MyA0OTguNjE0ODU3IDIxOS40Mjg1NzEgNTkwLjg0OGM3MC4yMTcxNDMgMzcuODE0ODU3IDE2OC41OTQyODYgMTA2Ljc4ODU3MSAyNTIuODU0ODU4IDIxMy43MjM0MjlDNTMxLjgyMTcxNCA2OTIuNjYyODU3IDcxNS4zMzcxNDMgNDYzLjcyNTcxNCA4MDQuNTcxNDI5IDQ0My4yNDU3MTRjLTE0LjQwOTE0My01Ny43MDk3MTQtMjIuNTI4LTE2Ni4wMzQyODYgMC0yMjMuODE3MTQzLTE4My4wMDM0MjkgMTIwLjY4NTcxNC0zNDIuMTYyMjg2IDQyNy4zNzM3MTQtMzQyLjE2MjI4NiA0MjcuMzczNzE1eiIgZmlsbD0iIzAyOUIwMCIgcC1pZD0iMjU5MyI+PC9wYXRoPjwvc3ZnPg==');
		background-size: cover;
		background-repeat: no-repeat;
	}

	.contaienr {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		margin-top: 40px;
	}

	.title {
		font-size: 20px;
		margin-top: 20px;
		font-weight: bold;
	}

	.hint {
		font-size: 14px;
		margin-top: 30px;
		color: gray;
		width: 70vw;
		text-align: center;
	}

	.btn {
		background-color: #37AD46;
		color: white;
		text-align: center;
		height: 42px;
		margin-top: 30px;
		width: 50vw;
		line-height: 42px;
		border-radius: 20rpx;
		margin-bottom: 20px;
	}

	.btn:active {
		background-color: #4eaa5a;
		color: white;
	}
</style>