<template>
	<view class="contain">
		<!-- 头部 -->
		<view class="header">
		    <view class="header_top">
				<view class="header_top_wrap clear">
					<!-- logo -->
					<view class="header_top_logo" v-if="token"><image :src="userInfo.avatarUrl"></image></view>
					<view class="header_top_logo" v-else><image></image></view>
					<view class="header_top_middle">
					  <view class="header_top_middle_title" v-if="token == ''" @tap="toLogin">注册/登录</view>
					  <view class="header_top_middle_title" v-else>{{userInfo.nickName}}</view>
					  <view class="header_top_middle_small">服务商</view><view class="header_top_middle_ren">认证用户</view>
					</view>
				</view>
				<view class="iconfont set" @tap="to_userSet"></view>
		    </view>
		    <view class="header_bom">
				<navigator hover-class="none" url="" class="discount"><view class="discount_i">{{couponNum}}</view>优惠券</navigator>
				<view class="discount dingdan"><view class="discount_i">0</view>采购订单</view>
				  <!-- <navigator hover-class="none" url="" class="discount dingdan"><view class="discount_i">{{cgNumber}}</view>采购订单</navigator> -->
		    </view>
		</view>
		<!-- 我的店铺 -->
		<view class="my_shop">
		    <view class="my_shop_wrap">
				<view class="my_shop_wrap_top clear">
					<view class="my_shop_title">我的店铺</view>
					<view class="join_shop" @tap="toDetail">进入店铺<view class="iconfont shuang_you"></view></view>
				</view>
				<view class="my_shop_wrap_bottom">
					<view class="my_shop_wrap_bottom_item" @tap="toStore">
						<view class="bom_top_icon"><image src="https://wx.fujinyangche.com/nvrnetwork/images/user01.png"></image></view>
						<view class="title">店铺管理</view>
					</view>
					<view class="my_shop_wrap_bottom_item" bindtap="toRen">
						<view class="bom_top_icon"><image src="https://wx.fujinyangche.com/nvrnetwork/images/user02.png"></image></view>
						<view class="title">认证管理</view>
					</view>
				</view>
		    </view>
		</view>
		<!-- 营销活动 -->
		<view class="activity">
		    <view class="activity_lf">营销活动</view>
		    <view class="activity_rg">暂未开放<view class="iconfont more"></view></view>
		</view>
		<view class="shezhi">
			<view class="shezhi_wrap">
				<view class="shezhi_title">我的讯息</view>
				<view class="shezhi_list clear">
					<view class="shezhi_list_item" @tap="toFeedBack">
						<image src="https://wx.fujinyangche.com/nvrnetwork/images/fankui.png"></image>
						<view class="shezhi_list_title">留言反馈</view>
						<view class="shezhi_list_title_num">{{myNumber}}条</view>
					</view>
					<view class="shezhi_list_item" @tap="toMessage">
						<image src="https://wx.fujinyangche.com/nvrnetwork/images/message.png"></image>
						<view class="shezhi_list_title">消息中心</view>
						<view class="shezhi_list_title_num">{{messageNum}}条</view>
						<view class="isRead">{{isRead}}</view>
					</view>
					<view class="shezhi_list_item" @tap="toCollect">
						<image src="https://wx.fujinyangche.com/nvrnetwork/images/shoucang.png"></image>
						<view class="shezhi_list_title">我的收藏</view>
						<view class="shezhi_list_title_num">{{collectNum}}个</view>
					</view>
					<view class="shezhi_list_item" @tap="toHistory">
						<image src="https://wx.fujinyangche.com/nvrnetwork/images/history.png"></image>
						<view class="shezhi_list_title">浏览记录</view>
						<view class="shezhi_list_title_num">{{historyNum}}个</view>
					</view>
				</view>
			</view>
		</view>
		<view class="other">
			<view class="other_title clear" @tap="share">
			    <view class="other_title_lf">邀请好友入驻</view>
			    <view class="other_title_rg">邀请可得{{money}}元优惠券<view class="iconfont more"></view></view>
			</view>
			<view class="other_title clear" @tap="about">
			    <view class="other_title_lf">关于我们</view>
			    <view class="other_title_rg"><view class="iconfont more"></view></view>
			</view>
			<view class="other_title clear" @tap="help">
			      <view class="other_title_lf">帮助中心</view>
			      <view class="other_title_rg"><view class="iconfont more"></view></view>
			</view>
			<view class="other_title clear">
			    <view class="other_title_lf">客服电话</view>
			    <view class="other_title_rg" @tap="call">021-62419902<view class="iconfont more"></view></view>
			</view>
		</view>
	</view>
</template>

<script>
	let app = getApp();
	import api from "../../../../../api.js";
	export default {
		data() {
			return {
				token:app.globalData.token,//个人标识
				userInfo:null,
				cgNumber:0,//采购订单
				isEnter:0,//是否入驻
				myNumber:0,//留言反馈
				messageNum:0,//消息中心
				isRead:0,//未读消息
				collectNum:0,//我的收藏
				historyNum:0,//浏览记录
				money:60,
			}
		},
		mounted(){
			this.userInfo = uni.getStorageSync('userInfo');
			if (this.token) {
				// this.getData();
			}
		},
		methods: {
			//加载信息
			getData(){
				console.log('我登录了')
			},
			//跳转去登陆
			toLogin(){
				uni.navigateTo({
					url:'/pages/packageOne/login/login?params=3'
				})
			},
			//留言反馈
			toFeedBack(){
				this.$url('../../user/feedback/feedback',3);
			},
			//消息中心
			toMessage(){
				this.$url('../../user/message_center/message_list/message_list',3);
			},
			//我的收藏
			toCollect(){
				this.$url('../../user/my_collect/my_collect',3);
			},
			//浏览记录
			toHistory(){
				this.$url('../../user/history/history',3)
			},
			//邀请好友入驻
			share(){
				this.$url('../../user/share_friend/index/index',3)
			},
			//关于我们
			about(){
				uni.navigateTo({
					url:'../../user/about/about'
				})
			},
			//帮助中心
			help(){
				uni.navigateTo({
					url:'../../user/help/help'
				})
			},
			//拨打客服电话
			call(){
				uni.makePhoneCall({
					phoneNumber:'021-62419902'
				})
			}
			
		}
		
	}
</script>

<style scoped>
	.clear:after{
	  content: "";
	  display: block;
	  clear: both;
	}
	page{
	  width:100%;
	  height:100%;
	  background-color: #f7f7f7;
	}
	.header{
	  width:100%;
	  height:334rpx;
	  background:rgba(240,131,0,1);
	  position: relative;
	  overflow: hidden;
	}
	.header_top{
	  height:234rpx;
	  overflow: hidden;
	  border-bottom:1px solid #ffffff;
	  box-sizing: border-box;
	  position: relative;
	}
	.header_top_wrap{
	  width:100%;
	  padding:0 26rpx 0 30rpx;
	  box-sizing: border-box;
	  height:124rpx;
	  margin-top:80rpx;
	}
	.header_top_logo{
	  width:124rpx;
	  height:124rpx;
	  background:rgba(255,255,255,1);
	  border:1px solid rgba(254,124,29,1);
	  border-radius: 50%;
	  overflow: hidden;
	  float:left;
	}
	.header_top_logo image{
	  display: block;
	  width:100%;
	  height:100%;
	}
	.header_top_middle{
	  width:50%;
	  height:100%;
	  float:left;
	  margin-left: 16rpx;
	  overflow: hidden;
	}
	.header_top_middle_title{
	  width:350rpx;
	  overflow: hidden;
	  text-overflow: ellipsis;
	  white-space: nowrap;
	  font-size: 34rpx;
	  color:#ffffff;
	  font-weight: bold;
	  margin-top:8rpx;
	}
	.header_top_middle_ren{
	  width:100rpx;
	  height:36rpx;
	  background:rgba(0,0,0,0.14);
	  border-radius:16rpx;
	  font-size:20rpx;
	  color:rgba(255,255,255,1);
	  text-align: center;
	  line-height: 36rpx;
	  display: inline-block;
	  margin-left: 10rpx;
	}
	.header_top_middle_small{
	  font-size: 28rpx;
	  color:#ffffff;
	  margin-top:8rpx;
	  display: inline-block;
	}
	.xufei{
	  float:right;
	  width:140rpx;
	  height:54rpx;
	  background:rgba(255,255,255,1);
	  border-radius:28rpx;
	  text-align: center;
	  line-height: 54rpx;
	  color:#F08300;
	  font-size: 26rpx;
	  margin-right: 26rpx;
	  margin-top:36rpx;
	}
	.xufei_icon{
	  display: inline-block;
	  font-size: 26rpx;
	  margin-right: 8rpx;
	}
	.set{
	  font-size: 52rpx;
	  color:#ffffff;
	  position: absolute;
	  right:30rpx;
	  top:32rpx;
	}
	.header_bom{
	  width:100%;
	  height:98rpx;
	  padding:18rpx 0 20rpx 0;
	  box-sizing: border-box;
	}
	.discount{
	  width:50%;
	  text-align: center;
	  line-height: 60rpx;
	  font-size: 26rpx;
	  color:#ffffff;
	  overflow: hidden;
	  box-sizing: border-box;
	  display: inline-block;
	  border-right:1px solid rgba(245,245,245,0.5);
	}
	.dingdan{
	  border-right:none;
	}
	.discount_i{
	  font-size: 34rpx;
	  display: inline-block;
	  margin-right: 10rpx;
	}
	.my_shop{
	  width:100%;
	  height:260rpx;
	  padding:0 30rpx;
	  background-color: #ffffff;
	  box-sizing: border-box;
	}
	.my_shop_wrap{
	  width: 100%;
	  height:100%;
	  border-radius: 8rpx;
	  overflow: hidden;
	}
	.my_shop_title{
	  color:#222222;
	  font-size: 34rpx;
	  font-weight: bold;
	  margin-top:28rpx;
	  float:left;
	}
	.join_shop{
	  font-size: 24rpx;
	  color:#999999;
	  float:right;
	  margin-top:36rpx;
	}
	.shuang_you{
	  display: inline-block;
	  font-size: 26rpx;
	  margin-left: 8rpx;
	}
	.my_shop_wrap_bottom{
	  width: 100%;
	  /* height:92rpx; */
	  overflow: hidden;
	  margin-top:50rpx;
	  box-sizing: border-box;
	}
	.my_shop_wrap_bottom_item{
	  width:96rpx;
	  /* height:92rpx; */
	  display: inline-block;
	  text-align: center;
	  margin-right: 100rpx;
	}
	.bom_top_icon{
	  width:70rpx;
	  height:70rpx;
	  margin:0 auto;
	}
	.bom_top_icon image{
	  display: block;
	  width:100%;
	  height:100%;
	}
	.title{
	  font-size: 24rpx;
	  color:#666666;
	  margin-top:10rpx;
	}
	.activity{
	  width:100%;
	  height:100rpx;
	  line-height: 100rpx;
	  background-color: #ffffff;
	  padding:0 32rpx 0 30rpx;
	  box-sizing: border-box;
	  margin-top:20rpx;
	}
	.activity_lf{
	  font-size: 34rpx;
	  color:#222222;
	  font-weight: bold;
	  float:left;
	}
	.activity_rg{
	  float:right;
	  font-size: 26rpx;
	  /* color:#F08300; */
	  color:#999999;
	}
	.more{
	  display: inline-block;
	  color:#999999;
	  font-size: 26rpx;
	}
	.shezhi{
	  width: 100%;
	  margin-top:20rpx;
	  padding:0 30rpx;
	  box-sizing: border-box;
	  overflow: hidden;
	  background-color: #ffffff;
	}
	.shezhi_wrap{
	  width: 100%;
	  height:100%;
	  padding-bottom:40rpx;
	  overflow: hidden;
	}
	.shezhi_list{
	  width:100%;
	  margin-top:58rpx;
	  box-sizing: border-box;
	}
	.shezhi_title{
	  color:#222222;
	  font-size: 34rpx;
	  font-weight: bold;
	  margin-top:28rpx
	}
	.shezhi_list_item{
	  width:96rpx;
	  text-align: center;
	  font-size: 24rpx;
	  color:#666666;
	  float:left;
	  margin-right: 102rpx;
	  position: relative;
	} 
	.isRead{
	  width:28rpx;
	  height:28rpx;
	  border-radius: 50%;
	  background-color: #E11521;
	  text-align: center;
	  line-height: 28rpx;
	  font-size: 18rpx;
	  color:#ffffff;
	  position: absolute;
	  top:-6rpx;
	  right:16rpx;
	}
	.shezhi_list_item:nth-child(4n){
	  margin-right: 0;
	}
	.shezhi_list_title_num{
	  font-size: 20rpx;
	  color:#999999;
	  margin-top:4rpx;
	}
	.shezhi_list_item image{
	  display: block;
	  width:54rpx;
	  height:54rpx;
	  margin:0 auto;
	}
	.shezhi_list_title{
	  font-size: 24rpx;
	  color:#666666;
	  margin-top:10rpx;
	}
	.other{
	  width:100%;
	  background-color: #ffffff;
	  overflow: hidden;
	  margin-top:20rpx;
	}
	.other_title{
	  height:100rpx;
	  line-height: 100rpx;
	  border-bottom:1px solid #f2f2f2;
	  box-sizing: border-box;
	  padding:0 32rpx 0 30rpx;
	  position: relative;
	}
	.other_title_lf{
	  font-size: 30rpx;
	  color:#222222;
	  float:left;
	}
	.other_title_rg{
	  position: absolute;
	  right:30rpx;
	  color:#F08300;
	  font-size: 26rpx;
	}
	.masking{
	  width:100%;
	  height:100%;
	  background:rgba(0,0,0,0.5);
	  position: absolute;
	  top:0;
	  left:0;
	  z-index:100;
	  display: none;
	}
	.showMask{
	  display: block;
	}
	.delete_wrap{
	  width:600rpx;
	  height:260rpx;
	  background:rgba(255,255,255,1);
	  border-radius:10rpx;
	  position: fixed;
	  top:50%;
	  left:50%;
	  transform: translate(-50%,-50%);
	}
	.wrap_top{
	  font-size: 32rpx;
	  color:#000000;
	  font-weight: bold;
	  text-align: center;
	  height:152rpx;
	  line-height: 152rpx;
	  border-bottom:1px solid #F2F2F2;
	  box-sizing: border-box;
	}
	.wrap_bom_lf{
	  width:50%;
	  border-right: 1px solid #f2f2f2;
	  box-sizing: border-box;
	  font-size: 32rpx;
	  color:#222222;
	  font-weight: bold;
	  text-align: center;
	  line-height: 106rpx;
	  display: inline-block;
	}
	.confirm{
	  width:50%;
	  display: inline-block;
	  text-align: center;
	  line-height: 106rpx;
	  font-size: 32rpx;
	  color:#E77817;
	  font-weight: bold;
	}
	.contain{
	  position: relative;
	  padding-bottom: 50px;
	}
</style>
