<template>
	<view class="app">
		<image src="@/static/pagesB/paysuccess.png" mode=""></image>
		<view class="success">
			评价完成
		</view>
		<view class="goshopping" @tap='gos'>
			返回上一级
		</view>
		<view class="gohomepage" @tap='gohome'>
			去首页
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				delta: null,
			};
		},
		onLoad(options) {
			this.delta = options.delta
		},
		methods: {
			gos() {
				var that = this
				this.delta = Number(this.delta)
				if (this.delta == 4) {
					uni.navigateBack({
						delta: 4
					});
				} else if (this.delta == 3) {
					uni.navigateBack({
						delta: 3
					});
				} else if (this.delta == 2) {
					uni.navigateBack({
						delta: 2
					});
				} else if (this.delta == 1) {
					uni.navigateBack({
						delta: 1
					});
				} else {
					uni.navigateBack({
						delta: 2
					});
				}
			},
			gohome() {
				uni.switchTab({
					url: '/pagesB/homepage/homepage'
				});
			},
		},
	}
</script>

<style lang="scss">
	.app {
		font-size: 30rpx;
		height: 100vh;

		.goshopping,
		.gohomepage {
			padding: 0 30rpx;
			height: 70rpx;
			line-height: 65rpx;
			text-align: center;
			position: absolute;
			top: 50%;
			color: #26A888;
			border: 1rpx solid #26A888;
			border-radius: 30rpx;
		}

		.goshopping {
			left: 10%;
		}

		.gohomepage {
			right: 10%;
		}

		.success {
			font-size: 42rpx;
			position: absolute;
			top: 35%;
			left: 50%;
			transform: translateX(-50%);
		}

		image {
			width: 230rpx;
			height: 230rpx;
			position: absolute;
			top: 8%;
			left: 50%;
			transform: translateX(-50%);
		}
	}
</style>
