<template>
	<view class="wrap">
		<view class="top123">
			<view class="success_logo">
				<image src="https://wx.fujinyangche.com/nvrnetwork/images/card02.png"></image>
			</view>
			<view class="title">支付成功</view>
			<view class="content">
				尊敬的用户您好，您的资料已经提交成功，请等待管 理员审核，我们将于3-5个工作日告知您认证结果。
			</view>
		</view>
		<view class="message">
			<view class="message_item clear">
				<view class="item_lf">订单编号：</view>
				<view class="item_rg">{{allData.orderNumber}}</view>
			</view>
			<view class="message_item clear">
				<view class="item_lf">认证服务期限：</view>
				<view class="item_rg">{{allData.year}}年</view>
			</view>
			<view :class="['message_item', 'clear', allData.serviceTime == '' || allData.serviceTime == null?'hidden':'']">
				<view class="item_lf">服务期限：</view>
				<view class="item_rg">{{allData.serviceTime}}</view>
			</view>
			<view class="line">
				<view class="line_lf"></view>
			</view>
			<view class="message_item fuwu clear">
				<view class="item_lf">认证服务费：</view>
				<view class="item_rg1">¥{{allData.money}}</view>
			</view>
			<view class="message_item clear">
				<view class="item_lf">优惠券抵扣：</view>
				<view class="item_rg1">¥{{allData.discount}}</view>
			</view>
			<view class="message_item clear">
				<view class="item_lf">实付金额：</view>
				<view class="item_rg1">¥{{allData.pay}}</view>
			</view>
			<view class="message_item clear">
				<view class="item_lf">支付时间：</view>
				<view class="item_rg">{{allData.payTime}}</view>
			</view>
		</view>
		<view class="toIndex" @tap="toIndex">返回首页</view>
	</view>
</template>

<script>
	import api from "../../../../api.js";
	let app = getApp();
	export default {
		data() {
			return {
				orderNumber: '',//订单编号
				ids:'',//优惠券集合id
				allData:null,//页面数据
			}
		},
		onLoad(options) {
			console.log(options);
			this.orderNumber = options.orderNumber,
			this.ids = options.ids;
			this.getData();
		},
		methods: {
			//加载订单信息
			getData(){
				let data = {
					orderNumber:this.orderNumber,
					ids:this.ids
				}
				api.getUserOrder(data).then((res)=>{
					console.log(res);
					this.allData = res.data.data;
				})
				
			},
			//返回首页
			toIndex(){
				uni.reLaunch({
					url:'../../service/serviceView/serviceView'
				})
			}
		}
	}
</script>

<style>
	.clear:after{
		content: "";
		display:block;
		clear: both;
	}
	page{
	  width:100%;
	  height:100%;
	  background-color: #f7f7f7;
	}
	.top123{
	  overflow: hidden;
	  padding-bottom: 42rpx;
	  border-bottom:1px solid #f2f2f2;
	  background-color: #ffffff;
	}
	.success_logo{
	  width:112rpx;
	  height:150rpx;
	  margin:60rpx auto 0;
	}
	.success_logo image{
	  display: block;
	  width:100%;
	  height:100%;
	}
	.title{
	  font-size: 32rpx;
	  color:#222222;
	  margin-top:16rpx;
	  text-align: center;
	}
	.content{
	  padding:0 96rpx 0 98rpx;
	  box-sizing: border-box;
	  font-size: 24rpx;
	  color:#999999;
	  line-height: 36rpx;
	  margin-top:14rpx;
	}
	.message{
	  width:100%;
	  padding:38rpx 0 0 30rpx;
	  box-sizing: border-box;
	  overflow: hidden;
	  background-color: #ffffff;
	}
	.message_item{
	  margin-bottom: 20rpx;
	}
	.message_item:nth-child(3){
	  margin-bottom: 0;
	  padding-bottom: 20rpx;
	}
	.fuwu{
	  margin-top:20rpx;
	}
	.item_lf{
	  width:200rpx;
	  color:#999999;
	  font-size: 28rpx;
	  float:left;
	}
	.item_rg{
	  font-size: 28rpx;
	  color:#222222;
	  float:left;
	  margin-left: 68rpx;
	  font-weight: bold;
	}
	.line{
	  border:1rpx solid #f2f2f2;
	  position: relative;
	}
	.line_lf{
	  width:268rpx;
	  height:10rpx;
	  background-color: #ffffff;
	  position: absolute;
	  top:-2rpx;
	  left:0rpx;
	}
	.item_rg1{
	  float:left;
	  margin-left: 68rpx;
	  font-size: 28rpx;
	  font-weight: bold;
	  color:#E11521;
	}
	.money{
	  padding-right: 30rpx;
	  box-sizing: border-box;
	  height:98rpx;
	  line-height: 98rpx;
	  font-size: 28rpx;
	  color:#222222;
	  text-align: right;
	  background-color: #ffffff;
	}
	.money_i{
	  display: inline-block;
	  font-size: 28rpx;
	  color:#E11521;
	  font-weight: bold;
	}
	.money_i2{
	  font-size: 20rpx;
	  display: inline-block;
	}
	.toIndex{
	  width:690rpx;
	  height:90rpx;
	  background:linear-gradient(270deg,rgba(254,107,21,1) 0%,rgba(254,163,48,1) 100%);
	  border-radius:46rpx;
	  text-align: center;
	  line-height: 90rpx;
	  font-size: 32rpx;
	  color:#ffffff;
	  margin:60rpx auto 0;
	}
	.hidden{
	  display: none;
	}
</style>
