<template>
	<view>
		<!-- 模态框 -->
		<view class="cu-modal" :class="isShow?'show':''">
			<view class="cu-dialog">
				<view class="padding-xl">
					<view class="cuIcon-profile big-icon padding-tb text-main-color"></view>
					<view>您还未进行认证</view>
				</view>
				<view class="cu-bar bg-white solid-top">
					<view class="action margin-0 flex-sub text-black" data-modal="showTakeCertifiedModal"
						@tap="hideModal">{{text}}</view>
					<view class="action margin-0 flex-sub text-main-color solid-left"
						data-modal="showTakeCertifiedModal" @tap="hideModal" @click="goToCertify">立即认证</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'vertify-certify',
		emits: ['reload', 'stillAcceptOrder'],
		props: {
			text: {
				type: String,
				default: '以后认证'
			}
		},
		data() {
			return {
				isShow: false
			}
		},
		methods: {
			showModal(e) {
				this.isShow = true
			},
			hideModal(e) {
				this.isShow = false;
				if(this.text == '仍然接单') {
					this.$emit('stillAcceptOrder')
				}
			},
			goToCertify() {
				uni.navigateTo({
					url: '/pages/my/certification'
				})
			}
		}
	}
</script>

<style>
</style>
