<template>
	<view class="page">
		<view style="position: absolute; top: 0; width: 100%;">
			<image src="../../static/bg.png" class="top-img" mode="aspectFill"></image>
		</view>
		<view class="head" style="margin-top: 0px;" :style="'background-color: rgba(71,126,255,'+(scrollTop/50)+');'">
			<view class="title">
			</view>
			<view class="setting-mess"></view>
		</view>

		<view class="main" style="margin-top: 25px;">
			<!--已登录-->
			<view class="my-top">
				<view class="user-info">
					<view class="portrait">
						<image src='/static/head.png'></image>
					</view>
					<view class="info">
						<view class="nickname">
							<text>{{info.userName}}</text>
						</view>
						<view class="rank">
							<image src="../../static/id.png"></image>
							<text>{{info.userId}}</text>
						</view>
					</view>
				</view>
			</view>
			<!--未登录-->
			<!-- <view class="my-top my-top-wei">
				<view class="user-info">
					<view class="portrait">
						<image :src="info.avatar"></image>
					</view>
					<view class="info">
						<view class="nickname" style="font-size: 10rpx !important;">
							<text>{{info.nickname}}</text>
						</view>
						<view class="" style="font-size: 22rpx !important;">
							<text>{{info.mobile}}</text>
						</view>
					</view>
				</view>
			</view>
			 -->
			<!--互助计划登录后才显示-->
			<!-- <view class="order-content">
				<view class="titleall-box">
					<view class="titleall-left">
						<view class="titleall-left-line"></view>我的互助计划
					</view>
				</view>
				<view class="order-info">
					<view class="list">
						<view class="title">
							<text>有效时间：2024-02-22 至 2025-02-23</text>
						</view>
					</view>
				</view>
			</view> -->

			<view class="message-list" style="background-color: #fff;border-radius: 10px;">
				<view class="titleall-box">
					<view class="titleall-left">
						<view class="titleall-left-line"></view>我的服务
					</view>
				</view>
				<!-- <view class="list" @click="">
					<view class="icon-data">
						<view class="icon">
							<image src="/static/my-icon1.png" mode=""></image>
						</view>
						<view class="data">
							<view class="title">
								<text>我的资料</text>
							</view>
						</view>
					</view>
					<view class="more">
						<image src="/static/right.png"></image>
					</view>
				</view> -->
				<view class="list" @click="applicationStatus">
					<view class="icon-data">
						<view class="icon">
							<image src="/static/my-icon2.png" mode=""></image>
						</view>
						<view class="data">
							<view class="title">
								<text>故障查询次数统计</text>
							</view>
						</view>
					</view>
					<view class="more">
						<image src="/static/right.png"></image>
					</view>
				</view>
				<!-- <view class="list" @click="contract">
					<view class="icon-data">
						<view class="icon">
							<image src="/static/my-icon3.png" mode=""></image>
						</view>
						<view class="data">
							<view class="title">
								<text>合同查看</text>
							</view>
						</view>
					</view>
					<view class="more">
						<image src="/static/right.png"></image>
					</view>
				</view> -->
				
				<!-- <view class="list" @click="">
					<view class="icon-data">
						<view class="icon">
							<image src="/static/my-icon5.png" mode=""></image>
						</view>
						<view class="data">
							<view class="title">
								<text>联系我们</text>
							</view>
						</view>
					</view>
					<view class="more">
						<image src="/static/right.png"></image>
					</view>
				</view> -->
				<view class="list" @click="tclogin">
					<view class="icon-data">
						<view class="icon">
							<image src="/static/my-icon4.png" mode=""></image>
						</view>
						<view class="data">
							<view class="title">
								<text>退出登录</text>
							</view>
						</view>
					</view>
					<view class="more">
						<image src="/static/right.png"></image>
					</view>
				</view>
			</view>
		</view>
		<!-- tabbar -->
		<TabBar :tabBarShow="1"></TabBar>
	</view>
</template>

<script>
	import TabBar from '../../components/TabBar/TabBar.vue';
	export default {
		components: {
			TabBar
		},
		data() {
			return {
				scrollTop: 0,
				info:{},
			};
		},
		onPageScroll(e) {
			this.scrollTop = e.scrollTop;
		},
		onLoad() {
			uni.hideTabBar();
		},
		onShow() {
			this.hquserxx();
		},
		methods: {
			tclogin(){
				uni.reLaunch({
					url:"/pages/login/login"
				})
			},
			hquserxx(){
				this.API.hqdqdlrxx().then(res=>{
					console.log("用户信息",res);
					this.info = res.data.userInfo
					uni.setStorageSync('userinfo',this.info)
				})
			},
			login() {
				uni.navigateTo({
					url: '/pages/login/login'
				})
			},
			myInformation() {
				uni.navigateTo({
					url: '/pages/myInformation/myInformation'
				})
			},
			insureProve() {
				uni.navigateTo({
					url: '/pages/insureProve/insureProve'
				})
			},
			contactUs() {
				uni.navigateTo({
					url: '/pages/contactUs/contactUs'
				})
			},
			applicationStatus() {
				uni.navigateTo({
					url: '/pages/applicationStatus/applicationStatus'
				})
			},
			contract() {
				uni.navigateTo({
					url: '/pages/contract/contract'
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	@import 'my.scss';
</style>