<template>
	<view class="page">
		<u-navbar title="店铺管理" :border-bottom="false" :background="bgc" title-color='#000' back-icon-color="#000" title-size='36' height='50'></u-navbar>
        <view class="box">
        	<view class="shuju">
        		<view class="ddje">
        			<view class="shu">
        				全部店铺
        			</view>
        			<view class="sb">
        				{{listobj.all == null ? 0 : listobj.all}}
        			</view>
        		</view>
        		<text style="width: 1px;height: 60rpx;background: #979797;margin-top: 24rpx;"></text>
        		<view class="ddje">
        			<view class="shu">
        				我的店铺
        			</view>
        			<view class="sb">
        				{{listobj.current == null ? 0 : listobj.current}}
        			</view>
        		</view>
        		<text style="width: 1px;height: 60rpx;background: #979797;margin-top: 24rpx;"></text>
        		<view class="ddje">
        			<view class="shu">
        			下级店铺
        			</view>
        			<view class="sb">
        				{{listobj.children == null ? 0 : listobj.children}}
        			</view>
        		</view>
        	</view>
			
			<view class="tulist">
				<image src="https://api.ccttiot.com/smartmeter/img/static/uEe8bioY36T7Lj1W7Kmo" mode="" @click="btnshop(1)"></image>
				<image src="https://api.ccttiot.com/smartmeter/img/static/u8zYZnkgVcRu8YBO2Inj" mode="" @click="btnshop(2)"></image>
				<!-- <image src="https://api.ccttiot.com/smartmeter/img/static/u41CSZ4ADL7JvGJgsjdg" mode="" @click="btnshop(3)"></image> -->
				<image src="https://api.ccttiot.com/smartmeter/img/static/uWMlWM7Dw5CeiuCLBPvr" mode="" @click="btnshop(4)"></image>
				<image src="https://api.ccttiot.com/smartmeter/img/static/uaJ2Gl13fH3XJOUcaDsA" mode="" style="margin-right: 0rpx;" @click="btnshop(5)"></image>
				<!-- <image src="https://api.ccttiot.com/smartmeter/img/static/ugUDKiQ4dZUIjKv2xneY" mode="" style="margin-top: 48rpx;" @click="btnshop(6)"></image> -->
			</view>
        </view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
               listobj:{}
			}
		},
		onLoad() {
			this.getlist()
		},
		methods: {
			getlist(){
				this.$u.get('/agent/store/indexCount').then(res=>{
					if(res.code == 200){
						this.listobj = res.data
					}
				})
			},
            btnshop(num){
				if(num == 1){
					uni.navigateTo({
						url:'/pages/agentpages/shopguanli/myshop/index'
					})
				}else if(num == 2){
					uni.navigateTo({
						url:'/pages/agentpages/shopguanli/discipleshop/index'
					})
				}else if(num == 4){
					uni.navigateTo({
						url:'/pages/agentpages/shopguanli/setupshop/index'
					})
				}else if(num == 6){
					uni.navigateTo({
						url:'/pages/agentpages/shopguanli/member/index'
					})
				}else if(num ==5){
					uni.navigateTo({
						url:'/pages/income/index?tit=' + '店铺排名' + '&tits=' + '金额'
					})
				}
			}
		}
	}
</script>

<style lang="scss">
	/deep/ .u-title,
	/deep/ .uicon-nav-back {
		padding-bottom: 22rpx;
	}
	
	page {
		background: linear-gradient(180deg, #25CE88 0%, rgba(255, 255, 255, 0) 100%);
	}

	.page {
		width: 750rpx;
		position: fixed;
		top: 0;
		left: 0;
		.box{
			width: 750rpx;
			height: 1440rpx;
			background: #F4F5F7;
			border-radius: 0rpx 0rpx 0rpx 0rpx;
			padding-top: 48rpx;
			.tulist{
				width: 680rpx;
				height: 304rpx;
				background: #FFFFFF;
				border-radius: 24rpx 24rpx 24rpx 24rpx;
				margin: auto;
				margin-top: 40rpx;
				padding: 30rpx 50rpx;
				box-sizing: border-box;
				image{
					width: 96rpx;
					height: 98rpx;
					display: inline-block;
					margin-right: 60rpx;
				}
			}
			.shuju {
				display: flex;
				justify-content: space-between;
				padding: 40rpx 60rpx;
				box-sizing: border-box;
			    width: 680rpx;
			    height: 172rpx;
			    background: #FFFFFF;
			    border-radius: 24rpx 24rpx 24rpx 24rpx;
				margin: auto;
				.ddje {
					text-align: center;
			
					.shu {
						font-weight: 500;
						font-size: 28rpx;
						color: #3D3D3D;
					}
			
					.sb {
						margin-top: 20rpx;
						font-weight: 500;
						font-size: 40rpx;
						color: #3D3D3D;
					}
				}
			}
		}
	}
</style>