<template>
	<view class="reverse-back-box" @click.stop="reverseBackBtn">
		<text class="iconfont">&#xe603;</text>
	</view>
</template>

<script>
	export default {
		name: 'reverse-back',
		data() {
			return {

			};
		},
		methods: {
			reverseBackBtn() {
				const pages = getCurrentPages()
				if (pages.length <= 1) {
					uni.reLaunch({
						url: '/pages/index/index'
					});
				} else {
					uni.navigateBack({
						delta: 1,
						fail: err => {}
					})
				}

			}
		}
	}
</script>

<style lang="scss" scoped>
	.reverse-back-box {
		width: 37rpx;
		height: 37rpx;
		display: flex;
		align-items: center;
		height: 100%;
		font-size: 32rpx;
		color: #000;
		// .reverse-back-icon {
		// 	width: 100%;
		// 	height: 100%;
		// }
	}
</style>