<template>
	<view>
		<u-overlay :show="ishow">
			<view class="dialog">
				<view class="dialog-top tooltip1">
					<view class="dialog-title">
						<text>登录提醒</text>
					</view>
				</view>
				<view class="dialog-bottom">
					<view class="textBox">
						<text>您所登录的账号</text>
						<text style="color: #FC5536;">{{$store.state.user.loginName}}</text>
						<!-- <text style="color: #FC5536;">填写不正确，法人联系方式</text>
						<text style="color: #FC5536;">不正确</text> -->
						<text>已重复登录</text>
						<text>是否继续登录</text>
					</view>
					<view class="btn-box">
						<u-button class="dialog-button" @tap="confirm"
							color="linear-gradient(to top, #F59A02, #FFD334 )" shape="circle" type="warning" text="">
							确定
						</u-button>
						<u-button class="dialog-button" @tap="close(true)" color="#ffffff" shape="circle" type="warning"
							text="">
							取消
						</u-button>
					</view>

				</view>
				<view class="update-close" @tap="close(true)">
					<u-icon size="66" color="#ffffff" name="close-circle"></u-icon>
				</view>
			</view>

		</u-overlay>
	</view>
</template>

<script>
	export default {
		name: 'HomeHint',
		props: {
			show: {
				type: Boolean,
				default: "",
			}
		},
		data() {
			return {
				ishow: false
			}
		},
		methods: {
			confirm() {
				this.$emit('confirm')
			},
			close(is) {
				if (is) {
					this.$emit('close', true)
				} else {
					this.$emit('close')
				}

			}
		},
		watch: {
			show: {
				handler(value) {
					this.ishow = value;
				},
				immediate: true, //设置为 true 时，第一次进入页面时即监听
				deep: true, // 深度监听父组件传过来对象变化 
			}
		},
	}
</script>

<style lang="scss" scoped>
	.btn-box {
		display: flex;
	}

	.dialog {
		position: fixed;
		width: 80%;
		/* height: 462rpx; */
		padding: 0 0 20rpx 0;
		background: rgba(255, 255, 255, 0.75);
		border: 2rpx solid #77A8FF;
		box-shadow: 0rpx 0rpx 24rpx 6rpx rgba(109, 160, 251, 0.6);
		border-radius: 28rpx;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
	}

	.dialog-top {
		position: relative;
		height: 299rpx;
		top: -86rpx;
		width: 100%;

	}

	.tooltip1 {
		background: url('@/static/images/tooltip1.png');
		background-size: 100% 100%;
	}

	.dialog-title {
		text-align: center;
		position: absolute;
		bottom: 31rpx;
		left: 50%;
		transform: translate(-50%);
		font-weight: bold;
		color: #2F4173;
		font-size: 34rpx;
	}

	.dialog-bottom {
		/* width: 542rpx; */
		/* height: 200rpx; */
		/* position: absolute; */
		/* bottom: 15rpx; */
		display: flex;
		flex-direction: column;
		align-items: center;
		margin-top: -70rpx;

	}

	.textBox {
		font-size: 30rpx;
		font-weight: bold;
		color: #485B93;
		line-height: 60rpx;
		text-align: center;
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	.dialog-button {
		width: 238rpx;
		height: 75rpx;
		margin-top: 42rpx;
		margin-bottom: 42rpx;
		font-size: 28rpx;
		font-weight: bold;

		&:nth-child(2) {
			margin-left: 20rpx;
			color: #2F4173 !important;
		}
	}


	.update-close {
		position: absolute;
		text-align: center;
		left: 50%;
		transform: translate(-50%);
		bottom: -100rpx;
	}
</style>
