<template>
	<view class="reverse-back-box" @click.stop="reverseBackBtn">
		<!-- <image class="reverse-back-icon" src="../../static/logo.png" mode="aspectFit"></image> -->
		<u-icon name="arrow-leftward" size="20" color="#000"></u-icon>
	</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;
		// .reverse-back-icon {
		// 	width: 100%;
		// 	height: 100%;
		// }
	}
</style>