<template>
	<view class="box">

		<view class="headerBox">
			<view class="headerLeft">
				<image :src="ueserInfo.memberInfo.headUrl" mode="" class="headerImg"
					v-if="ueserInfo.memberInfo.headUrl"></image>
				<image src="../../static/img/pic_def_ava.png" mode="" class="headerImg" v-else></image>

				<view class="nickName">{{ueserInfo.memberInfo.nickName}}</view>
			</view>
			<view>
				<image src="../../static/img/icon_set.png" mode="" class="setImg" @click="goSet()">
				</image>
			</view>
		</view>


		<!-- 我的订单 -->
		<view class="orderBox">
			<view class="orderTitleBg">
				<view class="orderTitle">我的订单</view>
				<view class="orderAll" @click="goorder(6)">
					<view style="color: #999999; font-size: 24rpx; margin-right: 5rpx;">全部订单</view>
					<image src="../../static/img/rightArrow.png" mode="" class="rightArrow"></image>

				</view>
			</view>
			<view class="orderLIneBox">
				<view class="orderLine" @click="goorder(1)">
					<view class="orderImgBox">
						<view class="orderNum" v-show="numList.sheetStateOne>0">{{numList.sheetStateOne}}</view>
						<image src="../../static/img/icon_daifukuan.png" mode="" class="orderLineImg"></image>
					</view>
					<view class="orderLineTxt">待付款</view>
				</view>
				<view class="orderLine" @click="goorder(2)">
					<view class="orderImgBox">
						<view class="orderNum" v-show="numList.sheetStateTwo>0">{{numList.sheetStateTwo}}</view>
						<image src="../../static/img/icon_daiqueren.png" mode="" class="orderLineImg"></image>
					</view>
					<view class="orderLineTxt">待确认</view>
				</view>
				<view class="orderLine" @click="goorder(3)">
					<view class="orderImgBox">
						<view class="orderNum" v-show="numList.sheetStateThree>0">{{numList.sheetStateThree}}</view>
						<image src="../../static/img/icon_daiyuyue.png" mode="" class="orderLineImg"></image>
					</view>
					<view class="orderLineTxt">待收货</view>
				</view>

				<view class="orderLine" @click="goorder(4)">
					<view class="orderImgBox">
						<view class="orderNum" v-show="numList.sheetStateFour>0">{{numList.sheetStateFour}}</view>
						<image src="../../static/img/icon_daifuwu.png" mode="" class="orderLineImg"></image>
					</view>
					<view class="orderLineTxt">待服务</view>
				</view>
				<view class="orderLine" @click="goorder(5)">
					<view class="orderImgBox">
						<view class="orderNum" v-show="numList.sheetEvaluateState>0">{{numList.sheetEvaluateState}}</view>
						<image src="../../static/img/icon_daipingjia.png" mode="" class="orderLineImg"></image>
					</view>
					<view class="orderLineTxt">待评价</view>
				</view>

			</view>
		</view>
		<!-- 售后订单 -->
		<view class="rowBoxBg">
			<view class="rowBox" @click="gonavigateTo('../refundMoney/refundMoneyList')">
				<view class="leftView">
					<image src="../../static/img/icon_tuikuan.png" mode="" class="liftIcon"></image>
					<view class="rowTitle">退款申请记录</view>
				</view>
				<image src="../../static/img/rightArrow.png" mode="" class="rightArrow"></image>
			</view>
			
			<view class="grayline"></view>
			<view class="rowBox" @click="gonavigateTo('../changeStore/changeStoreList')">
				<view class="leftView">
					<image src="../../static/img/icon_tihuan.png" mode="" class="liftIcon"></image>
					<view class="rowTitle">更换门店申请记录</view>
				</view>
				<image src="../../static/img/rightArrow.png" mode="" class="rightArrow"></image>
			</view>
		</view>

		<!-- 我的 相关 -->
		<view class="rowBoxBg">
			<view class="rowBox" @click="gonavigateTo('../index/cailist?fromMe=true')">
				<view class="leftView">
					<image src="../../static/img/icon_car.png" mode="" class="liftIcon"></image>
					<view class="rowTitle">我的车库</view>
				</view>
				<image src="../../static/img/rightArrow.png" mode="" class="rightArrow"></image>
			</view>
			<view class="grayline"></view>
				
			<view class="rowBox" @click="gonavigateTo('discountCard')">
				<view class="leftView">
					<image src="../../static/img/icon_youhuiquan.png" mode="" class="liftIcon"></image>
					<view class="rowTitle">我的优惠券</view>
				</view>
				<image src="../../static/img/rightArrow.png" mode="" class="rightArrow"></image>
			</view>
			<view class="grayline"></view>
			
			<view class="rowBox" @click="gonavigateTo('myAppraise')">
				<view class="leftView">
					<image src="../../static/img/icon_pingjia.png" mode="" class="liftIcon"></image>
					<view class="rowTitle">我的评价</view>
				</view>
				<image src="../../static/img/rightArrow.png" mode="" class="rightArrow"></image>
			</view>
			<!-- <view class="grayline"></view> -->

			<!-- <view class="rowBox">
				<view class="leftView">
					<image src="../../static/img/icon_yaoqing.png" mode="" class="liftIcon"></image>
					<view class="rowTitle">邀请有礼</view>
				</view>
				<image src="../../static/img/rightArrow.png" mode="" class="rightArrow"></image>
			</view> -->

		</view>
		
		<!-- 关于 我们 -->
		<view class="rowBoxBg">
			<view class="rowBox">
				<view class="leftView">
					<image src="../../static/img/icon_dianhua.png" mode="" class="liftIcon"></image>
					<view class="rowTitle">联系我们</view>
				</view>
				<view class="rightView" @click="call(numList.tAbouts.contents)">
					<view style="color: #666666; font-size: 28rpx; margin-right: 20rpx;">{{numList.tAbouts.contents}}</view>
					<image src="../../static/img/rightArrow.png" mode="" class="rightArrow"></image>
				</view>
			</view>
			<view class="grayline"></view>
				
			<view class="rowBox" @click="gonavigateTo('feedBack')">
				<view class="leftView">
					<image src="../../static/img/icon_fankui.png" mode="" class="liftIcon"></image>
					<view class="rowTitle">意见反馈</view>
				</view>
				<image src="../../static/img/rightArrow.png" mode="" class="rightArrow"></image>
			</view>
			<view class="grayline"></view>
			
			<view class="rowBox" @click="gonavigateTo('aboutMe')">
				<view class="leftView">
					<image src="../../static/img/icon_guanyu.png" mode="" class="liftIcon"></image>
					<view class="rowTitle">关于我们</view>
				</view>
				<image src="../../static/img/rightArrow.png" mode="" class="rightArrow"></image>
			</view>
			
		
		</view>
		
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				ueserInfo: '',
				shopData: '',
				numList: '',
				uid:'',
				
			}
		},
		onLoad() {

		},
		onShow() {
			this.$common.isUserId()
			this.ueserInfo = uni.getStorageSync("logodata");
			this.shopData = uni.getStorageSync("shopData");
			this.uid = uni.getStorageSync("logodata").uid;
			if (this.uid) {
				this.queryMyDetail();
			}
		},
		methods: {
			goSet(){
				uni.navigateTo({
					url:'setup?phone='+this.numList.tMember.phone +'&nickName='+this.numList.tMember.nickName+'&name='+this.numList.tMember.name
				})
			},
			call(e) {
				// console.log(e);
				uni.makePhoneCall({
					phoneNumber: e
				});
			},
			goorder(num) {
				uni.navigateTo({
					url: '../order/myorder?num=' + num
				})
			},
			login() {
				uni.navigateTo({
					url: '../login/login'
				})
			},
			queryMyDetail() {
				uni.showLoading({
					title: '加载中'
				})
				this.$http('worldKeepCar/keepCarMy/queryMyDetail', {

				}, 'GET').then(res => {
					uni.hideLoading();
					this.numList = res.data
					
				})
			},
			gonavigateTo(url) {
				
				uni.navigateTo({
					url: url
				})
			}
		}
	}
</script>

<style scoped>
	.box {
		min-height: 100vh;

		background: linear-gradient(180deg, #FFEDEA 0%, #F4F5F7 100%);
		padding: 0 24rpx 60rpx;
	}

	.flex {
		display: flex;
	}

	.headerBox {
		padding-top: 14rpx;
	}

	.headerImg {
		width: 90rpx;
		height: 90rpx;
		border-radius: 50%;
	}

	.setImg {
		width: 38rpx;
		height: 38rpx;
		margin-top: 25rpx;
	}

	.headerBox {
		display: flex;
		justify-content: space-between;
	}

	.headerLeft {
		display: flex;
	}

	.nickName {
		padding-left: 20rpx;
		line-height: 90rpx;
		color: #3C3C3C;
		font-size: 32rpx;
	}


	.orderBox {
		margin-top: 30rpx;
		background: #FFFFFF;
		padding: 30rpx 0rpx;
		border-radius: 10rpx;
	}

	.orderTitleBg {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.orderTitle {
		font-size: 30rpx;
		color: #333333;
		font-weight: bold;
		padding-left: 20rpx;
	}

	.orderAll {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.orderLine {
		width: 25%;
		text-align: center;
	}

	.orderLineImg {
		width: 44rpx;
		height: 44rpx;
	}

	.orderLineTxt {
		font-size: 24rpx;
		color: #333333;
	}

	.orderImgBox {
		text-align: center;
		position: relative;
	}

	.orderLIneBox {
		display: flex;
		justify-content: space-between;
		padding-top: 30rpx;
	}

	.orderNum {
		line-height: 26rpx;
		background: #FF4F00;
		padding: 0 8rpx;
		border-radius: 13rpx;
		color: #FFFFFF;
		font-size: 20rpx;
		position: absolute;
		top: -5rpx;
		right: 38rpx;
		z-index: 11;
	}

	.rightArrow {
		margin-right: 20rpx;
		width: 12rpx;
		height: 20rpx;

	}

	.rowBoxBg {
		margin-top: 30rpx;
		background: #FFFFFF;
		/* padding: 30rpx 0rpx; */
		border-radius: 10rpx;
	}

	.rowBox {
		display: flex;
		justify-content: space-between;
		background: #FFFFFF;
		padding: 30rpx 0rpx;
		border-radius: 10rpx;
		align-items: center;

	}

	.leftView {
		display: flex;
		align-items: center;

	}
	.rightView{
		display: flex;
		align-items: center;
		
	}
	.liftIcon {
		width: 38rpx;
		height: 38rpx;
		margin: 0rpx 20rpx;
	}

	.rowTitle {
		color: #3C3C3C;
		font-size: 28rpx;
	}
	.grayline{
		margin-left: 77rpx;
		margin-right: 20rpx;
		background-color: #F4F5F7;
		height: 2rpx;
	}
</style>
