<template>
	<alert-module :show="showAlert" btnText="去登陆" btnColor="#FF2842" padding="66rpx 24rpx 66rpx 24rpx" @click="goLogin" @cancel="hideAlert">
		<div class="go-login-module">
            <div>您还未登陆，请先登录体验更多功能！</div>
        </div>
	</alert-module>
</template>

<script>
import AlertModule from '@/components/plugin/alert'
export default {
	name: 'go-login-module',
	components: {
		AlertModule
	},
	props: {
		show: {
			type: Boolean,
			default: false
		}
	},
	data() {
		return {
			showAlert: false
		}
	},
	watch: {
		show(val) {
		    console.log('监听')
			this.showAlert = val
		}
	},
	methods: {
		goLogin() {
			this.hideAlert()
			this.$util.getCheckLogin()
		},
		hideAlert() {
			this.$emit('update:show', false)
		}
	}
}
</script>

<style lang="scss" scoped>
</style>
