<!-- 我的 -->
<template>
	<view class="content">
			<view style="width: 100%; height: 44px;"></view>
			<view class="top-ail">
				<view class="dix">
					<view class="touxiang">
						<image :src="baseUrl +user.partnerLogo" mode=""></image>
					</view>
					<view class="">
						<view class="t-title">{{user.partnerName}}</view>
					<!-- 	<view class="t-tel">157****1984</view> -->
					</view>
				</view>
				<!-- 三项 -->
			<!-- 	<view class="sanxiang">
					<view class="s-box">
						<view class="simg">
							<image src="../../static/detection/dcl.png" mode=""></image>
						</view>
						<view class="zc-text">待处理工单</view>
						<view class="lan-num">15</view>
					</view>
					<view class="s-box">
						<view class="simg">
							<image src="../../static/detection/ycl.png" mode=""></image>
						</view>
						<view class="zc-text">已处理工单</view>
						<view class="lan-num">15</view>
					</view>
					<view class="s-box" style="border: none;">
						<view class="simg">
							<image src="../../static/detection/shfw.png" mode=""></image>
						</view>
						<view class="zc-text">售后服务</view>
						<view class="lan-num">15</view>
					</view>
				</view> -->
				<view class="lan-box">
					<view class="hei-title">我的钱包</view>
					<view class="cont-box">
						<view class="c-left">
							<view class="c-bt">总收益（元）</view>
							<view class="c-lan">{{(myindex.amount|| 0 )/ 100}}</view>
						</view>
						<view class="c-right" @click="gowallet()">
							<view class="dix">
							<!-- 	<view class="l-icon">
									<image src="../../static/detection/qtx.png" mode=""></image>
								</view> -->
								<uni-icons type="wallet-filled" size="17" color="#0D2E8D"></uni-icons>
								<text class="lan-text">收益明细</text>
								<uni-icons type="right" color="#0D2E8D" size="16"></uni-icons>
							</view>
						</view>
					</view>
				<!-- 	<view class="cont-box">
						<view class="c-left">
							<view class="c-bt">总收益（元）</view>
							<view class="c-hei">{{myindex.totalRevenue / 100|| 0}}</view>
						</view>
						<view class="c-left" style="border-left:1px solid #D2DDFD; padding-left: 15px; ">
							<view class="c-bt">已提现（元）</view>
							<view class="c-hei">{{myindex.withdrawAmount / 100|| 0}}</view>
						</view>
					</view> -->
				</view>
				<!-- 店铺商铺 -->
				<view class="dian-box">
					<view class="l-left" @click="getdianpu()">
						<view class="dian-top">
							<view class="dix">
							<view class="d-icon">
									<image src="../../static/detection/dp.png" mode=""></image>
							</view>
							<view class="aa">店铺管理</view>
							</view>
							<view class="">
								<uni-icons type="right" color="#999999" size="16"></uni-icons>
							</view>
						</view>
						<view class="c-bt">管理、修改店铺信息</view>
					</view>
					<!-- <view class="c-left" style="padding-left: 10px;">
						<view class="dian-top">
							<view class="dix">
							<view class="d-icon">
									<image src="../../static/detection/shsm.png" mode=""></image>
							</view>
							<view class="aa">商户实名</view>
							</view>
							<view class="">
								<uni-icons type="right" color="#999999" size="16"></uni-icons>
							</view>
						</view>
						<view class="c-bt">当前账号未实名商户</view>
					</view> -->
				</view>
				<!--  -->
				<view class="ian-box">
					<view class="on-input" @click="safety()">
						<view class="dix">
							<view class="d-icon">
									<image src="../../static/detection/zhaq.png" mode=""></image>
							</view>
							<view class="aa">账户与安全</view>
						</view>
						<view class="">
							<uni-icons type="right" color="#999999" size="16"></uni-icons>
						</view>
					</view>
<!-- 					<view class="on-input">
						<view class="dix">
							<view class="d-icon">
									<image src="../../static/detection/yhk.png" mode=""></image>
							</view>
							<view class="aa">银行卡管理</view>
						</view>
						<view class="">
							<uni-icons type="right" color="#999999" size="16"></uni-icons>
						</view>
					</view> -->
					<view class="on-input" @click="tui()">
						<view class="dix">
							<view class="d-icon">
									<image src="../../static/detection/tc.png" mode=""></image>
							</view>
							<view class="aa">退出登录</view>
						</view>
						<view class="">
							<uni-icons type="right" color="#999999" size="16"></uni-icons>
						</view>
					</view>
				</view>
			</view>
			<uni-popup ref="alertDialog" type="dialog">
							<uni-popup-dialog :type="msgType" cancelText="关闭" confirmText="同意" title="通知" content="您确认要退出登录吗" @confirm="dialogConfirm"
								@close="dialogClose"></uni-popup-dialog>
						</uni-popup>
		
			
		<!-- 底部 -->
		<view style="width: 100%; height: 50px;"></view>
		<tabBar :msg="msg" ></tabBar>
		
	</view>
</template>

<script>
	import config from '@/config'
	import request from '../../utils/request';
	import tabBar from'../../components/tabBar/tabBar.vue'
	export default {
		data() {
			return {
				chuan:0,
				msgType: 'success',
				msg:'3',
				user:{},
				baseUrl:this.$baseUrl,
				partnerId:'',
				myindex:{}
			}
		},
		onLoad() {
			
		},
		onShow() {
			this.partnerId = uni.getStorageSync('partnerId')
			this.getindexmy()
		},
		components:{
			tabBar,
		},
		methods: {
			async getbottom(){
				let data = {
					partnerId:this.partnerId
				}
				let res = await request({
					url:'/appInspection/news/newMsgNum',
					method: 'get',
					params:data
				})	
				console.log('jitiao',res);
				if(res.code == 200){
					this.chuan = res.data
				}
			},
			async getindexmy(){
				let res = await request({
					url:'/partnerOwn/partner/accountInfo?partnerId='+this.partnerId,
					method: 'get',
				})
				this.myindex = res.data
				let ress = await request({
					url:'/partnerOwn/partner/shopInfo',
					method: 'get',
				})		
				this.user = ress.data
			},
			safety(){
				//修改密码页
				uni.navigateTo({
					url:"/pages/safety/safety"
				})
			},
			tui(){
				this.$refs.alertDialog.open()
				
			},
			dialogConfirm() {
					uni.clearStorageSync();
					uni.reLaunch({
						url:'/pages/Login/login'
					})	
						
						},
			dialogClose() {
				console.log('点击关闭')
			},
			gowallet(){
				uni.navigateTo({
					url:"/pages/my/my-wallet"
				})
			},
			getdianpu(){
				uni.navigateTo({
					url:"/pages/my/shoporder"
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.content {
		box-sizing: border-box;
		width: 100%;
		height: calc(100vh);
		background: linear-gradient(225deg, #EFF5FF 0%, rgba(255,255,255,0) 100%);
	}
	.c-top{
		width: 100%;
		// height: 283px;
		// background-color: cornflowerblue;
		// background: url("http://www.nuoyunr.com/lananRsc/shopBg.png") center no-repeat;
		// background-size:100% 100%;
	}
	.top-ail{
		width: 100%;
		box-sizing: border-box;
		padding: 20px;
	}
	.dix{
		display: flex;
		align-items: center;
	}
	.touxiang{
		width: 50px;
		height: 50px;
		border-radius: 50%;
		overflow: hidden;
		background-color: whitesmoke;
		margin-left: 10px;
		image{
			width: 100%;
			height: 100%;
		}
	}
	.t-title{
		font-size: 18px;
		font-weight: bold;
		color: #333333;
		margin-left: 15px;
	}
	.t-tel{
		font-size: 14px;
		font-weight: 400;
		color: #999999;
		margin-left: 15px;
	}
	.sanxiang{
		width: 100%;
		box-sizing: border-box;
		padding: 20px;
		background-color: white;
		border-radius: 8px;
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-top: 30px;
	}
	.lan-box{
		width: 100%;
		box-sizing: border-box;
		padding: 15px;
		background: linear-gradient(90deg, #EDF4FD 0%, #E1EFFF 100%);
		border-radius: 8px;
		margin: 10px auto;
	}
	.s-box{
		width: 33%;
		border-right: 1px solid #EEEEEE;
		text-align: center;
	}
	.simg{
		width: 26px;
		height: 26px;
		margin: 0 auto;
		image{
			width: 100%;
			height: 100%;
		}
	}
	.zc-text{
		font-size: 13px;
		font-weight: 400;
		color: #333333;
		margin: 5px auto;
	}
	.lan-num{
		font-size: 26px;
		font-weight: 600;
		color: #0D2E8D;
	}
	.hei-title{
		font-size: 16px;
		font-weight: 600;
		color: #333333;
	}
	.cont-box{
		margin-top: 10px;
		width: 100%;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	.c-left{
		width: 50%;
		box-sizing: border-box;
	}
	.l-left{
		width: 100%;
		box-sizing: border-box;
		// border-right: 1px solid #EEEEEE;
		// padding-right: 5px;
	}
	.c-bt{
		font-size: 14px;
		font-weight: 400;
		color: #666666;
		margin-bottom: 2px;
	}
	.c-lan{
		font-size: 25px;
		font-weight: 600;
		color: #0D2E8D;
	}
	.c-right{
		width: 122px;
		height: 35px;
		background: #FFFFFF;
		border-radius: 50px;
		display: flex;
		justify-content: center;
		align-items: center;
		color: #0D2E8D;
	}
	.l-icon{
		width: 15px;
		height: 15px;
		image{
			width: 100%;
			height: 100%;
		}
	}
	.lan-text{
		font-size: 14px;
		font-weight: 400;
		color: #0D2E8D;
		margin: 0px 2px;
	}
	.c-hei{
		font-size: 20px;
		font-weight: 600;
		color: #333333;
	}
	.dian-box{
		background-color: white;
		border-radius: 8px;
		box-sizing: border-box;
		width: 100%;
		padding: 15px;
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-bottom: 10px;
	}
	.ian-box{
		background-color: white;
		border-radius: 8px;
		box-sizing: border-box;
		width: 100%;
		padding: 15px;
	
		margin-bottom: 10px;
	}
	.dian-top{
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-bottom: 5px;
	}
	.d-icon{
		width: 16px;
		height: 16px;
		image{
			width: 100%;
			height: 100%;
		}
	}
	.aa{
		font-size: 16px;
		font-weight: 400;
		color: #333333;
		margin-left: 5px;
	}
	.on-input{
		width: 100%;
		display: flex;
		justify-content: space-between;
		align-items: center;
		box-sizing: border-box;
		border-bottom: 1px solid #EEEEEE;
		padding-bottom: 10px;
		margin-bottom: 10px;
	}
</style>
