<template>
	<view class="content">
		<view class="success-title">合同签订成功</view>
		<view class="success-icon">
			<u-icon name="checkmark-circle-fill" color="#19be6b" size="156" ></u-icon>
		</view>
		<view class="success-text">{{'请联系管理员帮你，开通会员！'}}</view>
		<view class="success-text">订单号：{{orderId}}</view>
		<view class="handle-fix-box">
			<u-button type="warning" shape="circle" :ripple="true" :custom-style="customStyle" @click="goBack()">返回</u-button>
		</view>
		<u-top-tips ref="uTips"></u-top-tips>
	</view>
</template>

<script>
	import {
		mapGetters
	} from 'vuex'
	const NET = require('@/utils/request')
	const API = require('@/config/api')
	export default {
		computed: {
			...mapGetters([
				'mainColor',
				'customStyle',
			])
		},
		data() {
			return {
				orderId: '',
				payResult: '0',
			}
		},
		onLoad(options) {
			this.orderId = options.id
			NET.request(API.getPayResult, {
				oderNo: this.orderId
			}, 'POST').then(res => {
				this.payResult = res.data.status
			}).catch(error => {
				this.$refs.uTips.show({
						title: error.message,
					type: 'warning',
				})
			})
		},
		onReady() {},
		methods: {
			//  返回
			goBack() {
				uni.navigateBack()
			},
		},
	}
</script>

<style>
	page {
		width: 100%;
		height: 100%;
		position: relative;
	}
</style>
<style lang="scss" scoped>
	@import "@/static/css/themes.scss";
	.content {
		width: 100%;
		float: left;
		padding: 0 15px 60px 15px;
		box-sizing: border-box;

		.success-title {
			width: 100%;
			height: 64px;
			float: left;
			line-height: 48px;
			font-size: 28px;
			text-align: center;
		}

		.success-icon {
			width: 100%;
			float: left;
			text-align: center;
			margin-bottom: 20px;
		}

		.success-text {
			width: 100%;
			height: 20px;
			float: left;
			line-height: 20px;
			font-size: 12px;
			text-align: center;
		}
	}
</style>
