<template>
	<view class="containers">
		<view>
			<img :src="succ" alt="">
			<view>提交成功{{!iscall?'，等待审核':''}}</view>
			<view v-if="!iscall">审核通过后，系统将在第一时间通知你</view>
			<view>
				<button @click="toHistory">我的拜访记录</button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				succ: require('../../static/img/success.png'),
				iscall:false
				
			}
		},
		onLoad(options) {
			this.iscall=options.iscall?true:false
		},
		methods: {
			toHistory() {
				let url = '/pages/visit/visithistory'
				if(this.iscall){
					url = '/pages/bd/record?type=call'
				}
				uni.redirectTo({
					url: url
				})
			}
		}
	}
</script>

<style scoped>
	.containers {
		background-color: #fff;
		min-height: 80vh;
		padding: 20rpx;
		position: relative;
	}

	.containers>view {
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		width: 70%;
		text-align: center;
	}

	.containers>view img {
		width: 200rpx;
		height: 200rpx;
	}

	.containers>view view {
		margin-bottom: 40rpx
	}

	.containers>view view:first-child {
		font-size: 40rpx;
		color: #000
	}

	.containers>view button {
		background-color: #044ed7;
		color: #fff
	}
</style>
