<template>
	<view>
		<login-pop-up ref='loginpopup' :content='"手机登录后才能查看我的哦~"'></login-pop-up>
	</view>
</template>
<script>
	export default {

		onLaunch: function() {
			console.warn('当前组件仅支持 uni_modules 目录结构 ，请升级 HBuilderX 到 3.1.0 版本以上！')
			console.log('App Launch')
		uni.addInterceptor('switchTab', {
				invoke(e) {
					console.log(e,1111111)
					if(e.url == '/pages/my/my'){
						if(!uni.getStorageSync("userInfo").phone){
							this.$refs.loginpopup.open()
							return false;
						}else{
						return false;
						}
					}
				},
				success: (e) => {
					console.log('OK',e)
				}
			})
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import "@/uni_modules/uview-ui/index.scss";
	@import '@/uni_modules/uni-scss/index.scss';
	@import "colorui/main.css";
	@import '@/static/styles/index.scss';
	@import '@/style/icons/iconfont.css';
	@import '@/style/icons/iconfont-colors.css';
	@import '@/style/mercharts_icon/iconfont.css';
	@import '@/style/mercharts_icon/iconfont_colors.css';
	// 设置整个项目的背景色
	page {
		background-color: #F2F6F9;
	}
	.content{
		// padding-bottom:0rpx;
	}
	.wrap{
		background:#fff;
		border-radius:20rpx;
		margin:20rpx;
		padding:20rpx;
	}
	.caution{
		color:red;
	}
	.footer,.mercharts_footer{
		position:fixed;
		bottom:0;
		left:0;
		background:#fff;
		width:100%;
		z-index:10;
		padding:30rpx 0;
		.submit{
			background:#f8bc31;
			color:#fff;
			width:90%;
		}
	}
	.mercharts_footer{
			.submit{
				background:#5F7DE9;
			}
		}
	.flex{
		display:flex;
	}
	.justify-space-between{
		justify-content: space-between;
	}
	.align-item-center{
		align-items: center;
	}
	.detailedAddress{
		width:600rpx;
		text-align:center;
	}
	.merchants_button,.merchants_unable_button,.merchants_default_button,.merchants_caution_button{
		background:#5F7DE9;
		color:#fff;
		padding:5rpx 20rpx;
		border-radius: 10rpx;
	}
	.merchants_default_button{
		background:#fff;
		color:#000;
		border:2rpx solid #5F7DE9;
	}
	.merchants_default_button_text,
	.merchants_caution_button_text,
	.merchants_unable_button_text{
		padding:5rpx 10rpx;
	}
	.merchants_default_button_text{
		color:#5F7DE9;
	}
	.merchants_caution_button_text{
		color:red;
	}
	.merchants_unable_button_text{
		color:#999;
	}
	.merchants_caution_button{
		background:red;
	}
	.merchants_unable_button{
		background:#999;
	}
</style>
