<template>
	<view class="main">
		<view class="pr">
			<view class="header-content">
				<image src="http://file.supermm.me/miniProgram/images/personal/bg.png" style="width:100%;height:260rpx;"></image>
			</view>
			<view class="pr" style="z-index:2">
				<view class="plr15">
					<view class="bdr4 pb20">
						<view class="m-dpflex m-justify-start m-align-center" style="height: 165rpx;">
							<image binderror="_binderror" mode="scaleToFill" src="https://ossweb-img.qq.com/images/lol/web201310/skin/big84000.jpg"
							 style="width: 120rpx;height: 120rpx;border-radius: 50%;"></image>
							<text class="line1 f20 fb plr15 text-white">落雨桐</text>
							<navigator hoverClass="none">
								<image class="header-img" src="http://file.supermm.me/miniProgram/images/personal/edit.png"></image>
							</navigator>
							<view class="pr tr m-flex">
								<view class="tip msg" v-if="true"></view>
								<navigator hoverClass="none">
									<image class="header-img" src="http://file.supermm.me/miniProgram/images/personal/info.png"></image>
								</navigator>
							</view>
						</view>
						<view class="pr m-xcenter plr20 header-box" style="padding: 40rpx 40rpx;background-color: #fff;border-radius: 16rpx;">
							<navigator class="m-flex tl f14 m-ycenter dpb" hoverClass="none">
								<view class="m-gray-big f20 fb pr10">0</view>
								<view class="m-gray-letter mt5 f12">代币（个）</view>
							</navigator>
							<view bindtap="" class="m-flex tl f14 m-ycenter">
								<view class="m-gray-big f20 fb">0</view>
								<view class="m-gray-letter mt5 f12">优惠券（张）</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view class="fb f18 plr20">我的订单</view>
			<view class="margin-lr-sm m-dpflex m-justify-start m-align-center overflow bg-white margin-top-sm" style="padding-top: 40rpx;padding-bottom: 40rpx;border-radius: 16rpx;box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);">
				<navigator class="width25 m-ycenter overflow pr" hoverClass="none">
					<image style="width: 76rpx;height: 76rpx;" src="http://file.supermm.me/miniProgram/images/personal/menu_1.png"
					 mode=""></image>
					<view class="tip"></view>
					<view class="f14 m-gray-small mt10 line1">我的咨询</view>
				</navigator>
				<navigator class="width25 m-ycenter overflow pr" hoverClass="none">
					<image style="width: 76rpx;height: 76rpx;" src="http://file.supermm.me/miniProgram/images/personal/menu_2.png"
					 mode=""></image>
					<view class="tip"></view>
					<view class="f14 m-gray-small mt10 line1">我的预约</view>
				</navigator>
				<navigator class="width25 m-ycenter overflow pr" hoverClass="none">
					<image style="width: 76rpx;height: 76rpx;" src="http://file.supermm.me/miniProgram/images/personal/menu_3.png"
					 mode=""></image>
					<view class="tip"></view>
					<view class="f14 m-gray-small mt10 line1">我的意见单</view>
				</navigator>
				<navigator class="width25 m-ycenter overflow pr" hoverClass="none">
					<image style="width: 76rpx;height: 76rpx;" src="http://file.supermm.me/miniProgram/images/personal/menu_4.png"
					 mode=""></image>
					<view class="tip"></view>
					<view class="f14 m-gray-small mt10 line1">服务包订单</view>
				</navigator>
			</view>
			<navigator class="pr m-xcenter plr20 pt20" hoverClass="none">
				<view class="fb f18 pr m-flex tl">健康档案</view>
				<view class="pr m-gray-small">档案列表</view>
				<label class="m-gray-letter iconfont icon-arrow-right f18 dpb"></label>
			</navigator>
			<view class="mt20 pr pb40" style="margin-left: 20rpx;margin-right: 20rpx;">
				<swiper duration="500" @change="swiperChange" :current="itemcurrent" interval="5000" style="height:380rpx;" class="swiper-box">
					<swiper-item class="swiper-wrapper" style="" v-for="(item,index) in 4" :key="index">
						<view class="bg-white" style="border-radius: 16rpx;height: 100%;">
							<navigator class="m-ycenter pt40" hoverClass="none" url="" v-if="false">
								<view class="bdr30 m-theme br-theme tc plr20 pt8 pb8 f14 width40">新增健康档案</view>
								<view class="pt20 f12 m-gray-letter">点击添加新的健康档案</view>
							</navigator>
							<view @click="_goInfo" v-if="true" style="height: 100%;" v-else>
								<view class="fb f18 pt20 margin-left">落雨桐</view>
								<view class="f14 m-gray-letter pt10 margin-left">年龄：<text class="text-black">{{18}}岁</text></view>
								<view class="plr10 m-dpflex m-justify-start m-align-center overflow pb30 pt30" style="margin-top:60rpx;border-top: 2rpx solid rgb(248,248,248);">
									<view class="width33 m-ycenter overflow pr">
										<view class="fb f18">{{1}}</view>
										<view class="f12 m-gray-small mt6 line1">病例信息</view>
									</view>
									<view class="width33 m-ycenter overflow pr">
										<view class="fb f18">{{3}}</view>
										<view class="f12 m-gray-small mt6 line1">就诊记录</view>
									</view>
									<view class="width33 m-ycenter overflow pr">
										<view class="fb f18">{{2}}</view>
										<view class="f12 m-gray-small mt6 line1">个人资料</view>
									</view>
								</view>
							</view>
						</view>
					</swiper-item>
				</swiper>
				<view class="dots">
					<view :class="index==itemcurrent?'dot active':'dot'" v-for="(item,index) in 4" :key="index"></view>
				</view>
			</view>
			<view class="fb f18 plr20 pt40">常用工具</view>
			<view class="bg-white margin-lr-sm margin-top-sm" style="border-radius: 16rpx;box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);">
				<view class="plr10 m-dpflex m-justify-start m-align-center overflow pt30 pb30">
					<navigator class="width25 m-ycenter overflow pr" hoverClass="none">
						<image style="width: 42rpx;height: 42rpx;" src="http://file.supermm.me/miniProgram/images/personal/tool_1.png"></image>
						<view class="f14 m-gray-small mt10 line1">家庭医生</view>
					</navigator>
					<navigator class="width25 m-ycenter overflow pr" hoverClass="none">
						<image style="width: 42rpx;height: 42rpx;" src="http://file.supermm.me/miniProgram/images/personal/tool_2.png"></image>
						<view class="f14 m-gray-small mt10 line1">我的关注</view>
					</navigator>
					<navigator class="width25 m-ycenter overflow pr" hoverClass="none">
						<image style="width: 42rpx;height: 42rpx;" src="http://file.supermm.me/miniProgram/personal/my-class/my_class.png"></image>
						<view class="f14 m-gray-small mt10 line1">收藏文章</view>
					</navigator>
					<navigator class="width25 m-ycenter overflow pr" hoverClass="none">
						<image style="width: 42rpx;height: 42rpx;" src="http://file.supermm.me/miniProgram/personal/my-class/my_class.png"></image>
						<view class="tip"></view>
						<view class="f14 m-gray-small mt10 line1">我的保单</view>
					</navigator>
				</view>
				<view class="plr10 m-dpflex m-justify-start m-align-center overflow pb30">
					<navigator class="width25 m-ycenter overflow pr" hoverClass="none">
						<image style="width: 42rpx;height: 42rpx;" src="http://file.supermm.me/miniProgram/images/personal/tool_5.png"></image>
						<view class="f14 m-gray-small mt10 line1">帮助反馈</view>
					</navigator>
					<view bindtap="" class="width25 m-ycenter overflow pr">
						<image style="width: 42rpx;height: 42rpx;" src="https://file.supermm.me/h5/wechat-h5/personal/kf.png"></image>
						<view class="f14 m-gray-small mt10 line1">客服咨询</view>
					</view>
				</view>
			</view>
		</view>
		<view class="cu-tabbar-height"></view>
		<view class="cu-tabbar-height"></view>
	</view>
</template>

<script>
	export default {
		onLoad(options) {

		},
		mounted() {
			this.getUserInfo()
		},
		data() {
			return {
				itemcurrent: 0
			}
		},
		methods: {
			swiperChange(e) {
				this.itemcurrent = e.detail.current
			},
			getUserInfo: async function() {
				let res = await this.$request.post('/api/v1/user/userInfo')
				console.log(res)
			}
		}
	};
</script>

<style scoped>
	@import url("./mine.css");

	.header-content {
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		width: 100%;
		z-index: -1;
		overflow: hidden;
		box-sizing: border-box;
	}

	.header-box {
		box-shadow: 0px 8rpx 34rpx -6rpx rgba(248, 151, 164, 0.13);
	}

	.header-img {
		width: 36rpx;
		height: 36rpx;
	}

	.tip {
		position: absolute;
		top: 0;
		right: 20%;
		bottom: 0;
		background-color: red;
		width: 12rpx;
		height: 12rpx;
		border-radius: 50%;
	}

	.msg {
		top: -3rpx;
		right: -9rpx;
	}

	swiper {
		height: 320rpx;
	}

	.swiper-wrapper {
		padding: 0 10rpx;
		box-sizing: border-box;
	}

	.swiper-item {
		width: 100%;
		height: 300rpx;
		box-shadow: 0 26rpx 40rpx 0 rgba(255, 255, 255, 0.31);
		background: url("http://file.supermm.me/miniProgram/images/personal/bg_doc.png") no-repeat bottom center;
	}

	.dots {
		position: absolute;
		left: 0;
		right: 0;
		bottom: -40rpx;
		display: flex;
		justify-content: center;
	}

	.dots .dot {
		margin: 0 8rpx;
		width: 14rpx;
		height: 14rpx;
		background: #E4E4E4;
		border-radius: 8rpx;
		transition: all .6s;
	}

	.dots .dot.active {
		width: 24rpx;
		background: rgb(153, 153, 153);
	}

	.game-wrap {
		position: relative;
		width: 100%;
		height: 100%;
		overflow: hidden;
		box-sizing: border-box;
	}

	.game-item {
		height: 100%;
		background: url("https://file.supermm.me/h5/wechat-h5/integral/personeBg001.jpg") no-repeat;
		background-size: 100% 100%;
		background-position: center center;
		border-radius: 100rpx;
	}
</style>
