<template>
	<view class="container">

		<image src="../../../static/images/payresult/pic.png" mode="" class="container-img"></image>

		<view class="container-tip">
			订单已支付成功
		</view>

		<view class="container-lookOrderInfo" @click="go('order')">
			查看订单
		</view>
		<view class="container-goBackHome" @click="go('/')">
			返回首页
		</view>

		<view class="container-warmPrompt">
			温馨提示：<br>
			付款成功后，系统不会以付款异常、卡单、系统升级为由联系
			您。请勿泄露银行卡账号、手机验证码、否则会造成钱款损失！
			谨防电话诈骗！

		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				h5RootPath: this.$store.state.h5RootPath,
				url: ''
			}
		},
		methods: {
			go(url) {
				if (url == '/') { //跳转首页
					// #ifdef H5
					window.location.href = `${this.h5RootPath}h5/`;
					// #endif
					// #ifdef  MP-WEIXIN || APP-PLUS
					uni.switchTab({
						url: '/pages/home/index/index'
					});
					// #endif
				} else {
					// #ifdef H5
					window.location.href = `${this.h5RootPath}h5/#${this.url}`;
					// #endif
					// #ifdef  MP-WEIXIN || APP-PLUS
					console.log('url=', this.url);
					uni.redirectTo({
						url: this.url
					});
					// #endif
				}
			}
		},
		onLoad({
			url
		}) {
			this.url = url;
			// console.log('url=',url);
		}
	}
</script>

<style lang="scss" scoped>
	.conatiner {
		width: 100%;
	}

	.container-img {
		width: 300rpx;
		height: 216rpx;
		display: block;
		margin: 200rpx auto;
	}

	.container-tip {
		color: #333333;
		font-size: 40rpx;
		text-align: center;
		margin-top: -70rpx;
		font-weight: bold;
	}

	.container-lookOrderInfo {
		width: 350rpx;
		height: 88rpx;
		line-height: 88rpx;
		text-align: center;
		background: #008681;
		border-radius: 44rpx;
		font-size: 28rpx;
		color: #ffffff;
		margin: 20rpx auto;
		margin-top: 100rpx;
	}

	.container-goBackHome {
		width: 350rpx;
		height: 88rpx;
		line-height: 88rpx;
		text-align: center;
		border: 1rpx solid #008681;
		border-radius: 44rpx;
		margin: 20rpx auto;
		color: #008681;
		font-size: 28rpx;
	}

	.container-warmPrompt {
		width: 92%;
		margin: 0 auto;
		line-height: 40rpx;
		color: #999999;
		font-size: 24rpx;
		margin-top: 120rpx;
	}
</style>
